Is start address format correct in HEX file?

Asked by Geo on 2019-09-03

I read FAQ 659617 "Start address for output .hex file"
New question is:
Are such HEX records (type 03), generated by arm-none-eabi-objcopy correct?

I see the same strange records in nRF SDK for Mesh .hex files
SDK package is available here (v3.1.0) https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK-for-Mesh/Download#infotabs

For example, in files
ELF_FILE=nrf5_SDK_forMesh_v310/bin/ospace/examples/dfu/dfu_nrf52840_xxAA_s140_6.1.0.elf
HEX_FILE=nrf5_SDK_forMesh_v310/bin/ospace/examples/dfu/dfu_nrf52840_xxAA_s140_6.1.0.hex
MAP_FILE=nrf5_SDK_forMesh_v310/bin/ospace/examples/dfu/dfu_nrf52840_xxAA_s140_6.1.0.map

Start address in HEX file:
    grep ^:......03 ${HEX_FILE}
    :040000033000BEE922

Start address in OBJ file:
    OBJDUMP=~/gcc-arm-none-eabi-8-2018-q4-major/bin/arm-none-eabi-objdump
    ${OBJDUMP} --syms ${ELF_FILE} | grep Reset_Handler
    0003bee8 g F .text 00000028 Reset_Handler

Start address in MAP file:
    grep -B1 -A1 Reset_Handler ${MAP_FILE}
     .text 0x0003bee8 0x3c examples/dfu/CMakeFiles/dfu_nrf52840_xxAA_s140_6.1.0.dir/C_/mesh/deps/nRF5_SDK_15.2.0_9412b96/modules/nrfx/mdk/gcc_startup_nrf52840.S.obj
                    0x0003bee8 Reset_Handler
                    0x0003bf10 NMI_Handler

Tool hexinfo.py from intelhex library shows HEX file like this:
    - file: 'nrf5SDKforMeshv310/bin/ospace/examples/dfu/dfu_nrf52840_xxAA_s140_6.1.0.hex'
      entry: 0x3000BEE9
      data:
      - { first: 0x00026000, last: 0x0003F05B, length: 0x0001905C }

You can see 4-byte start address 3000BEE9 in HEX file.
And correspondent start address 0x0003bee8 in ELF and MAP files.
The difference is obvious.
Is this byte-order correct in HEX file?

Thanks

Question information

Language:
English Edit question
Status:
Expired
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
2019-09-03
Last reply:
2019-09-19
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.