Forum : ARM
Original Post
Post Information | Post |
---|---|
March 2, 2009 - 1:20pm
|
In my application I must save some parameters to FLASH to be able to restore function state after a power drop. How do I allocate one or more FLASH pages for this use? Must I make some changes to linker files (I'm new to STM32)? How would I for example allocate the following to a FLASH area? u32 params[10]; |
Hi,
You must read the PM0042 manual: STM32xxx Flash Programming, it´s all explain how to write in Flash.
And next, you must use pointers to allocate a Flash area...
Hi,
The 'clean' way to allocate to flash is to modify the linker script.
See the linker documentation for more information.
(you can find some inspiration in the definition of the Flash bank1 in the default linker script of the STR71x devices)
Using pointers also works but then the linker will not warn you if there are overlaps, so you must be careful with your allocating.
Best Regards,
Vincent