The output format cannot handle multiple address spaces

Technical Note 42505

Architectures:

AVR

Component:

linker

Updated:

2018/5/31 9:14

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.

很抱歉,该页面尚未翻译成中文。

如果您有任何问题,请联系我们的中国团队

We do no longer support Internet Explorer. To get the best experience of iar.com, we recommend upgrading to a modern browser such as Chrome or Edge.