I was reading up on the flash eeprom and best I can tell for the stm32f chips this is needed. micromouseusa.com/
Has Keil mdk5 not provided a simple function?
Along these lines?
LR_IROM1 0x08000000 0x00804000 { ; vector/reset ER_IROM1 0x08000000 0x08004000 { ; *.o (RESET, +First) *(InRoot$Sections) .ANY (+RO) } RW_IRAM1 0x08004000 0x08008000 { ; eeprom area .ANY (+RW +ZI) } }
LR_IROM2 0x08008000 0x08100000 { ER_IROM2 0x08008000 0x08100000 { ; remaining of code.. .ANY (+RO) } }
Hope this is more readable.
LR_IROM1 0x08000000 0x00804000 { ; vector/reset
ER_IROM1 0x08000000 0x08004000 { ;
*.o (RESET, +First)
*(InRoot$Sections)
.ANY (+RO)
}
RW_IRAM1 0x08004000 0x08004000 { ; eeprom area
.ANY (+RW +ZI)
LR_IROM2 0x08004000 0x08100000 {
ER_IROM2 0x08004000 0x08100000 { ; remaing of code..
This is something that you will understand best if you do it yourself. You should try to build with that scatter file and see what fails. You have a general idea of how to use the scatter file to do what you want to do, but have a few errors that you will go "why was I thinking that would work" once you figure them out.
One hint: +RW variables cannot go into flash. // this is actually more than 1 hint