简体   繁体   中英

Reserving flash location for EEPROM emulation STM32F4

I want to emulate EEPROM in sectors 2 and 3 to keep erase time low (small 16kb sectors). My question is how to go about reserving this flash space to prevent compiler from placing program code in these sectors?

Can anyone point me to info on this I haven't found anything that makes sense so far?

Thanks

From Application Note AN3969 , the best approach would be, as you have said is to use Sectors 0-3 since they are only 16kB.

My question is how to go about reserving this flash space to prevent compiler from placing program code in these sectors?

In your linker file (*.ld) declare the start of your Flash to be at the beginning of Sector 4 so that the Linker places your code beginning at that address eg.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM