We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I've noticed that there is a difference in the "Image Entry Point" address between the ".axf ->Header " display (or .axf ->Symbol Table" display) and the linker output file using the "--list" linker option.
The linker output file shows 0x00002af4 but also 0x00002af5 and the other displays from the IDE .axf view shows 0x00002af5
I saw that difference (one byte offset) also with other functions and not only with e image entry point.
What would be the cause for that? i.e. why thge linker "Memory Map of the image" has this offset?
Thanks,Ronen
Hi Ronen
This is a legacy of Arm. The address of all instructtions will be at least half-word (16-bit) aligned, and so the least significant bit of every instruction address will be 0b0. This bit can be reused to encode that this address is for a Thumb instruction. Some processors supported 'Arm' (32-bit only code) and 'Thumb' (mixed) code, and so this was important. All Cortex-M processors are Thumb only, and so this is slightly meaningless. You will notice debuggers etc obfuscate this.
Regards, Ronan
Thanks Ronan,
Just for double checking - so Thumb instruction uses '0' as lsb and Arm uses '1' as lsb?
Thumb uses 1. All Cortex-M instructions are Thumb, so you will always see this 'extra' bit.
Thanks Ronan, go it now finally :-).