Reserving a portion of flash memory
Hi,
I am using an STM32F407 chip which has a total of 11 sectors. Now I want to reserve sectors 2 and 3 to be able to store some settings in those sectors. Therefore I need to tell the linker to map the code to sectors 0,1 and 4...11. My solution to this problem was to place a 'dummy' program section in the section-placement xml file as per below:
<Root name="Flash Section Placement">
<MemorySegment name="FLASH" >
<ProgramSection name=".vectors" load="Yes" />
<ProgramSection name=".dummy" load="Yes" start="Sector 2 start" size="Size of the 2 sectors" />
<ProgramSection name=".text" load="Yes" />
</MemorySegment>
<MemorySegment name="SRAM" >
<ProgramSection name=".stack" load="No" />
</MemorySegment>
</Root>
While this seems to work I want to know if this causes any issues?
Thanks
Please sign in to leave a comment.
Comments
0 comments