gap in flash mem
Hi,
is it possible to define a "gap" in the flash memory that is not erased or set when downloading the program?
To be more specific: I've got an STM32F407, whose flash memory is divided into separate sectors with different sizes, starting with 4 small ones. As only whole sectors can be erased, I want to use two of these small ones (sector1 and sector2) for my configuration data that must be preserved between program updates. The first sector (sector0) must be used for the vector table, all others can be used for the rest of the program:
sector0: 0x08000000 - 0x08003FFF: vector table
sector1: 0x08004000 - 0x08007FFF: configuration, part1
sector2: 0x08008000 - 0x0800BFFF: configuration, part2
sector3..11: 0x0800C000 - 0x080FFFFF: rest of application
So, when I update the program, the loader must only erase and write sectors0 and sectors 3..11.
I've already managed to set this up in a memory map file by defining sector0 and sector3..11 as separate <MemorySegment>s and placing the program sections via section placement file. It compiles and the map file shows plausible addresses. But when I download the project to the target, I get the error message "The 0x08000000 - 0x0801F2FF load section does not fit the target description".
When I also define the gap (sector1 and sector2) as a third flash region, without placing program sections into it, I don't get this error but the gap is programmed with zeros instead of left alone.
So, what do I have to do to define the reserved sectors?
Thanks a lot!
Regards,
Bernhard
-
I also am having problems like this. I have searched everywhere but this is the only place that mentions the problem. I get "The 0x08000000 - 0x0800009B load section does not fit the target description".
Nowhere in my project/solution can I see 0x0800009B.
Please help.
Regards,
Simon
Please sign in to leave a comment.
Comments
1 comment