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.
Hello I am using STM32F030K6 microcontroller and I want to put a constant in a fixed address of flash memory. I arrive to do it using following attribute
unsigned int const Type_Value __attribute__((at(0X08007FF0))) = K_MODELLO ;
I modified the ROM1 page so that the scattered file became as follow:
; ************************************************************* ; *** Scatter-Loading Description File generated by uVision *** ; ************************************************************* LR_IROM1 0x08000000 0x00007FF0 { ; load region size_region ER_IROM1 0x08000000 0x00007FF0 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x20000000 0x00001000 { ; RW data .ANY (+RW +ZI) } }
It works, but if I try to move the constant in the address 0X08000000 , starting ROM1 from 0X08000008, it doesn't work, I mean that probably the linker overwrite with my constant, some part of the code. Does anyone can help me to understand why I cannot place my constant at 0X08000000 address? Thnaks in advance
Thanks Pier for your reply. I'll do this. B/R