2023-05-06 07:10 AM - edited 2023-11-20 06:16 AM
Hi, I have an ELF file modified to write to the main memory address 0x08004000 instead of 0x08000000. Please find the screenshot below and the ELF file in the attachment.
But instead of writing to 0x08004000 it constantly writes to 0x08000000. Why is this happening?
Solved! Go to Solution.
2023-05-09 11:56 PM - edited 2023-11-20 06:17 AM
Hi @bob S, there is a tab named Open file in the IDE by which I had opened it.
2023-05-10 03:31 AM
Hi @yo3hcv, thanks for pointing it out. I will try this fix.
2023-05-10 05:42 AM - edited 2023-11-20 06:17 AM
This fix solved my issue. Now I can see the updated address in the program header
@Community member @bob S can we point this to STMicroelectronics such that they can fix them in the future release?
2023-05-10 05:54 AM
The linker scripts are very sensitive to ordering and interpretation.
Not sure I've seen it do the behaviour here, but I tend to lead with the FLASH address.
ST's implementation is a bit haphazard and could have been executed so much better. The crew at Arduino seem more clueful. And Keil/RealView have always been much better with the issues.
+1 for identifying the issue here correctly.
2023-05-10 05:59 AM
I've been here over a decade, it's like swimming up a waterfall..
The code generator is capable of replicating a lot of junky and broken code. Just get the confidence to see whats wrong and excise it from your own project.
2023-05-10 06:04 AM
@mattias norlander please flag this to the relevant team(s) need to define the FLASH / RO memory region first. Defaulting to 0x08000000 somewhere. Even in a single / linear pass sense it should be recognizing addresses explicitly provided over defaults, and before it's encountered any content.
2023-05-10 06:43 AM
@Community member sure