Hello to everyone!! I need some advices about scatter loading; In my application I have a scatter file to load a binary in external SDRAM (0xA0000000) by a bootloader; i would place some piece of
code in FLASH, but leave the mail LOAD REGION in SDRAM; According to ARM Linker Manual, chapter 8, I made up this file:
LR_ERAM1 0xA0000000 0x00100000 { ER_ERAM1 0xA0000000 0x00100000 { *.o (RESET, +First) *(InRoot$$Sections) } RW_IROM1 0x00000000 0x00010000 { ; RW data .ANY (+RO) } RW_ERAM1 0xA1000000 0x00010000 { ; RW data .ANY (+RW +ZI) } RW_IRAM1 0x10000000 0x00010000 { ; RW data .ANY (+RW +ZI) } }
One Load Region in SDRAM, more than one execution region in FLASH, SRAM and SDRAM. According with the linker documentation, RO region placed first and after RW and ZI. Soon as I put the FLASH region, with RO inside application HANGS; if I leave the RO inside the first ER_ERAM1 all is OK.
I have LPC1788 Cortex-M and KEIL uVision 4.72.
Any advice?
Pier and Per, those are realistic expansions of what I was thinking about; a sort of kernel loaded and run in FLASH/ROM, stored on SD card and IAP-ed when needed (update time) AND a second "layer" usually taken from SD card and stored at BOOT-time in EXT.SDRAM (INT SRAM if necessary for speed issues). Maybe first layer more a Bios than a Kernel, as noted. This requires a bit more time to be spent analyzing the structure of the code originally born to be loaded or flashed whole in a single region, in FLASH. I'll keep this thread updated soon as I'll have updates. Fell free to contribute!
Again, Thanks a lot to everyone, a great job is done in this forum.
Paolo.