Solved
Checking if first time run since flashing
My program writes to flash but needs to know if it has been run before since the chip was re-programmed. I've set up a section in the flash memory that gets written to by the program
FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 1024K
.option :
{
. = ALIGN(4);
_s_my_option = .;
*(.my_option)
. = ALIGN(4) ;
_e_my_option = .;
} >FLASH2This appears as expected in the load map.
I've then setup an array in this section in the main program
const char initoptions[256]__attribute__ ((section (".option"))) ={0xFF};but this doesn't appear in the map and is not getting written when I reflash the chip.
What am I missing?
Thanks
