How to config sct file in Keil MDK to store user data in a section of STM32's flash?
I want to store my software version and data at a pointed section of STM32's Flash.I have tried to config the stc file in keil mdk,but it seems not working.So could anyone help me to find which step not right,thanks.
1. I set in keil to use user configured stc file;
2. I set the sct file like this:
;Add 0x0x0801B000 start address,2k=0x800 length to define as myram section to store user data
3.I define MYRAM as __attribute__((section("myram"))):
4.I use MYRAM to define user data const variable:
then i rebuild this program and download the hex to STM32G4,but the sct file defined style
variable could not be found at MYRAM section at 0x0801B000;
But when I use the style liking attribute at + address,it is useful;
So the attribute at + address method is useful,but if I want to define another const variable behind the UserData_BlockValue2, I have to calculate the address because of the length of UserData_BlockValue2, this seems a little tedious.
I want to know is it possible to use sct file to define a section of flash to store my const variables Value1,Value2,Valu3...and so on,these variables' address are automaticlly in turn loacted at the section? Thanks.
