I am using LPC 4337 cortex M4. It has two memory banks, FLASH A and FLASH B. I have FLASH B full and need to move a part of my application from FLASH B to FLASH A. I figured the following so far:
1. use the _attribute_((section(".sectionname"))) for the functions/variables I want to relocate to FLASH A.
2. Go to the the flashaplacement.xml file and add the section under Memory segment FLASHA as follows:
<MemorySegment name="FLASHA" >
<ProgramSection alignment="4" load="Yes" name=".sectionname" />
Is this correct? There is another application in FLASH A and I hope this does not interfere with that application, as that application is separate than the one I will be relocating.
I am a beginner, so please bear any mistakes I made.
Also, I see all the segment names in the flash placement.xml files correspond to actual physical memory units like SRAM1 SRAM2 AHBSRAM1 and FLASHA and FLASHB.
Can I add my own segment eg: MySgement and then add the section under this segment so that it remains separate from code of the other application? I will have to provide the start and end address of the segment in the memory map file, but is it allowed to declare multiple segments inside the same FLASH memory until you make sure that total of all segments does not exceed the size of FLASH?
Please sign in to leave a comment.