This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
In the linker command file I'm using I found the comment:
Contiguous SARAM memory blocks can be combined
if required to create a larger memory block.
Can I do the same with FLASH blocks? I.e., can I put the following line in the linker command file:
FLASHHG : origin = 0x300000, length = 0x010000 /* on-chip FLASH */
and then use that block to allocate code and const data sections?
Btw., it appears to work, but I want to make sure it is safe to do so. For example, I'm not sure whether it is a problem when a two-word instruction crosses a FLASH block boundary.
Thanks in advance
Johannes
Yup, you can. On the flash side, the thing to keep in mind is a sector is the smallest amount of flash that can be erased at a time. Thus you may want to partition your code such that code you upgrade (or don't upgrade) aligns to a sector.
On the SARAM side, the thing to remember is the SARAM blocks are single access. So it is best to partition code into a different physical SARAM block than data that code is accessing - this will improve performance.
-Lori