Hello,
I have a linker with extension .ld (is the format of the linker using the GCC Compiler (GNU)) and I want to translate it to the scatter linker with extension .sct.
I have some doubts in the translation. Firstly, in the creation of the memory sections. In my linker I have the following memory description:
MEMORY { FLASH_1(rx) : ORIGIN = 0x08000000, LENGTH = 1K
FLASH_2(rx) : ORIGIN = 0x08000400, LENGTH = 1K
FLASH_3 (rx) : ORIGIN = 0x08000800, LENGTH = 254K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K }
My translation to the scatter format is the following:
LR_FLASH1 0x08000000 0x00000400 { ER_FLASH1 0x08000000 0x00000400 {
.ANY (+RO) }
RW_RAM 0x20000000 0x00004000 {
.ANY (+RW +ZI) } }
LR_FLASH2 0x08000400 0x00000400 { ER_FLASH2 0x08000400 0x00000400 {
.ANY (+RO) } }
LR_FLASH3 0x08000400 0x0003F800 { ER_FLASH3 0x08000400 0x0003F800 {
Is this description correct? Where have I to put the *(InRoot$$Sections)? Any information or comment about this will be appreciated.
Thank you very much.
Sorry, here is my source code:
Definition of the memory in .ld linker: MEMORY { FLASH_BOOTLOADER (rx): ORIGIN = 0x08000000, LENGTH = 1K FLASH_UPDATER (rx) : ORIGIN = 0x08000400, LENGTH = 1K FLASH_APP (rx) : ORIGIN = 0x08000800, LENGTH = 254K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K } Translation for the .sct linker: LR_FLASH1 0x08000000 0x00000400 { ER_FLASH1 0x08000000 0x00000400 { .ANY (+RO) } RW_RAM 0x20000000 0x00004000 { .ANY (+RW +ZI) } } LR_FLASH2 0x08000400 0x00000400 { ER_FLASH2 0x08000400 0x00000400 { .ANY (+RO) } } LR_FLASH3 0x08000400 0x0003F800 { ER_FLASH3 0x08000400 0x0003F800 { .ANY (+RO) } }