arm-none-eabi-objcopy.exe generates wrong intel hex file

Bug #1595152 reported by ubogensperger
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
New
Undecided
Thomas Preud'homme

Bug Description

When calling

arm-none-eabi-objcopy in.elf -O ihex out.hex

the resulting intel hex file contains records of type 2 ("Extended Segment Address"). This is inappropriate for the linar address space of the ARM architecture. Some tools don't process hex files containing these records.

Instead records of type 4 (="Extended Linear Address") should be generated.

Example for wrong out.hex:

:10FFC000B81A00200048004080B582B000AF396008
:10FFD0000146F971BA717B71FA7913461B019B1ABC
:10FFE0009B00664A1344184600213C2201F03FF969
:10FFF000FB79012B28D0022B4DD0FA795F491346AB
:020000021000EC <-- Error
:100000001B019B1A9B000B445D4A5A60FA795B49BD
:1000100013461B019B1A9B000B445A4A1A60FA793B
:10002000564913461B019B1A9B000B443033202278
:100030009A80FA79514913461B019B1A9B000B4485
:10004000303310221A804DE0FA794C4913461B01D7

Desired output:

:20FFC000B81A00200048004080B582B000AF39600146F971BA717B71FA7913461B019B1A93
:20FFE0009B00664A1344184600213C2201F03FF9FB79012B28D0022B4DD0FA795F49134603
:020000040001F9
:200000001B019B1A9B000B445D4A5A60FA795B4913461B019B1A9B000B445A4A1A60FA7908
:20002000564913461B019B1A9B000B44303320229A80FA79514913461B019B1A9B000B442D
:20004000303310221A804DE0FA794C4913461B019B1A9B000B444C4A5A60FA79474913467C

---

Version: GNU objcopy (GNU Tools for ARM Embedded Processors) 2.24
Host: Microsoft Windows 8.1

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

Hi Ubogensperger,

I believe you are experiencing the same issue as described by Panos in [1]. If that is so, you are the second person reporting the problem. I will open an internal ticket to look at this but I cannot give you any timeline of when this could be fixed. Could you give us an example input file for us to reproduce the issue? If not, would you be willing to test a patch to solve the issue?

[1] https://answers.launchpad.net/gcc-arm-embedded/+question/294402 comment #4

Best regards.

Changed in gcc-arm-embedded:
assignee: nobody → Thomas Preud'homme (thomas-preudhomme)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.