Splitting Code Among Multiple Memory Areas
Hello,
STM34F4xx don’t have EEPROM but it can be emulated according to Application Note “AN3969”.
However, we need to use some of the Flash; recommended are sectors 2 and 3.
However, after this we need to tell the linker to use all flash for code (text) except sectors 2 and 3.
How do I tell the linker to “bridge” the two areas together?
I think it would be in "arm-gcc-link.ld" around here:
MEMORY
{
rom (rx) : ORIGIN = 0x08000000, LENGTH = 0x00008000
rom1 (rx) : ORIGIN = 0x08010000, LENGTH = 0x000F0000
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00020000
ram1 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x00010000
}
SECTIONS
{
.text :
{
*(.text .text.* .gnu.linkonce.t.*)
*(.glue_7t) *(.glue_7)
*(.rodata .rodata* .gnu.linkonce.r.*)
} >> rom | rom1
...
}
In some TI compiler/linker I saw this:
SECTIONS
{
.text: { *(.text) } >> P_MEM1 | P_MEM2 | P_MEM3 | P_MEM4
}
but it doesn't seem to work with GNU tools for ARM.
Thanks,
Cat
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Cat C for more information if necessary.