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.
I need to store a constant at the end of the flash space and I've tried using
const long x1 __attribute__((at(0x1FFF8))) = 0x12345678; /* RO */
or
const long flash_key __attribute__((section(".ARM.__at_0x1FFF8"))) = 0x12345678;
However these do not work as I get an error saying that I'm exceeding the rom size.
Now if I try to store the constant at 0x1FFe0, this works fine, but when looking at the generated hex file, my constant is at 0x1FFe0, but keil seems to have placed some extra data afterwards.
This is likely the reason it failed when trying to store the constant at 0x1FFF8. (The extra keil generated data was being placed after the and of flash at 0x1ffff).
So is there any other way to do this without keil adding that extra data?
P.S. Thanks in advance
Get the linker to produce a map and find out where (what object file) the extra data is coming from and hopefully what it's name is.