2022-11-13 08:42 AM
2022-11-13 11:02 AM
volatile place it after init into RAM , but optimizer maybe too use compression for data, then you see it only after uncompress into RAM...
2022-11-13 09:09 AM
I believe you may find the answer by looking at .map or .list file. I'm not fluent in .ld scripts but what you did looks strange to me. I would simply declare a memory area like FLASX, then tell the linker to put a particular constant into it by using attribute / section. Also, to ensure that the object will be emitted even if it is not referenced, you should use .keep in .ld file.
2022-11-13 10:48 AM
Initiaized or not is not relevant for optimizer. Not used is removed...
Too const can be used/optimized directly as define and not struct usw.
2022-11-13 10:59 AM
That is why I used volatile (And I'm currently using -o3). But I have used these variables.
2022-11-13 11:02 AM
volatile place it after init into RAM , but optimizer maybe too use compression for data, then you see it only after uncompress into RAM...
2022-11-13 06:42 PM
You are true, when I added volatile it is in ram not in ro section.