Hello,
I need to relocate code (folders with .c, .h files and .a files) in my project.
I readed the exampels but they are only for single funktions or variabels, so the don't fit.
I have BOARD SDRAM, BOARD FLASH (SPIFI Flash) and LPC54608.
I need to place Code(.text .data … ) in BOARD FLASH (lma) and load this code in external BOARD SDRAM (vma).
To test it I created a .c/.h file with a function. There result a test2.o file with .text (68byte) and .data (1Kbyte), everything in this file should go to SPIFI Flash and to runtime the .data should be loaded in SDRAM (vma).
With “Managed Linker Script -> Extra linker script input sections”
*test2.o(.text*) BOARD FLASH .text
put the linker the .text of the test2.o in BOARD_FLASH. And it works.
But with
*test2.o(.data*) BOARD SDRAM .data
it doesn’t work. The Linker put the *test2.o(.data*) in the LPC546008 internal Flash and load it in BOARD SDRAM.
Memory region Used Size Region Size %age Used
PROGRAM_FLASH: 11864 B 512 KB 2.26%
BOARD_FLASH: 68 B 16 MB 0.00%
SRAM_UPPER: 8476 B 160 KB 5.17%
SRAMX: 0 GB 32 KB 0.00%
USB_RAM: 0 GB 8 KB 0.00%
BOARD_SDRAM: 1 KB 16 MB 0.01%
Is there a possibility in “Properties->Managed Linker Script -> Extra linker script input sections” to tell the linker that he have to place *test2.o(.data*) in BOARD FLASH(lma) and load this in BOARD SDRAM?
If possible, I would like to avoid writing my own linker script.