I am trying to save data to non volatile memory in STM32F4. Here's my scatter file:
LR_IROM1 0x08000000 0x00080000 { ; load region size_region
ER_IROM1 0x08000000 0x00080000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
A 0x20000000 UNINIT 0x00000100 { ;no init section
*(.noinit)
}
RW_IRAM2 0x20000100 0x0000FFF0 { ;all other rw data
.ANY(+RW +ZI)
}
ER_IROM2 0x08008000 UNINIT 0x00000FFF {
*(nom_base)
}
}
The section nom_base supposes to be in flash memory, i am sure the address is right but it doesn't do anything. The section no_init is working but it only survives the resets, if I power off the board, then the value is lost. I only want to save 4 variables status, or one or two.
Can you help me telling me what Im doing wrong?
User contributions licensed under CC BY-SA 3.0