The output format cannot handle multiple address spaces

Technical Note 42505

Targets:
AVR

Component:
Linker

Updated:
5/18/2011 1:46 PM

Introduction

While linking there can be an issue for multiple memory spaces in Motorola and Intel-hex file(s).

Message

Error[e133]: The output format motorola cannot handle multiple address spaces. Use format variants (-y -O) to specify which address space is wanted.

Background

Output formats that do not support more than one memory space like Motorola and Intel-hex might require up to one output file per memory space. This causes no problems if you are only producing output to one memory space (flash), but if you also are placing objects in eeprom or an external rom in data memory space, the output format cannot represent this, and the linker will issue the above error.

Solution1

When using only one output format for example motorola, you need to have one output file per memory space.

  • To limit the output to flash memory Use the XLINK option -y .

    Enable the option Project > Options > Linker > Extra options > "Use command line options" and write
    -y(CODE).
  • To produce output for the other memory space(s), you must generate one output file per memory space. Use the XLINK option -O for this purpose.

    For example, if you are using the eeprom space and the motorola format, then enable the option Project > Options > Linker > Extra options > "Use command line options" and write
    -Omotorola,(XDATA)=eeprom.a90

    Check the example: Motorola-example.zip.

Solution2

When using an extra output format, for example ubrof8 and Intel-standard you can not use the option "Extra Output" for the Intel-standard if you also are placing objects in eeprom .

The solution is:

  • Be sure that the option "Extra Output" is disabled.
  • To generate the output file for the ubrof8. Enable the option Project> Options> Linker>Output. Click on "other" then choose 'Ubrof8 (forced)' from the drop-down menu.
  • To generate the output for the Intel-standard format you need to have one output file per memory space. To limit the output to flash memory Enable the option Project> Options> Linker> Extra options >>"Use command line options" and write
    -Ointel-standard,(CODE)=flash.hex
    To produce output for the other memory space for example the eeprom space, enable the option Project> Options> Linker> Extra options >>"Use command line options" and write
    -Ointel-standard,(XDATA)=eeprom.hex

    Check the example: Intel-standard-example.zip.

 

All product names are trademarks or registered trademarks of their respective owners.

Related Tech Notes

© IAR Systems 1995-2016 - All rights reserved.