Hello,
My code running on a STM32 with Keil v5 works fine. I'm trying to migrate to Keil V6.
The constant is the version of my software placed at the offset 0x1000 from the start of my application.
So I can check on the binary file if the value is correctly set.
On Keil V5, i have the following code which works fine :
const uint8_t version_major __attribute__((at(VERSION_MAJOR_ADDRESS))) = VERSION_MAJOR;
But it doesn't work on Keil V6 and throw me an error.
I already look here : https://developer.arm.com/documentation/100068/0616/Compiler-Source-Code-Compatibility/Language-extension-compatibility--attributes?lang=en#chr1398848377314__section_m2d_ggl_kkb
but It is mostly for variable, not constants.
I've tried many things, like :
const uint8_t version_major __attribute__((section(".ARM.VERSION_MAJOR_ADDRESS"))) = VERSION_MAJOR;
or
const uint8_t version_major __attribute__((section(".ARM.0x08001000"))) = VERSION_MAJOR;
I also tried thing to declare in the scatter file, but no success.
Still not working. Any idea please ?
Maybe?
const uint8_t version_major __attribute__ ((section(".ARM.__at_0X08001000UL"))) = VERSION_MAJOR;