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?
Make sure your external memory buses, and devices are all properly configured in the reset path, prior to calling __main(). Review startup_yourcpu.s
Thank You Pier. The devices are properly configured; actually I am able tu run the application if ALL the code is bootloaded and executed in external SDRAM and the scatter file doesn't include the FLASH REGION (RW_IROM1 0x0). Now I would to bootload the whole application in external SDRAM, with the root region in SDRAM (LR_ERAM1 0xA0000000 0x00100000) but execute some modules in the internal FLASH (RW_IROM1 0x00000000 0x00010000). I suppose this can be done, and I can compile without errors or warnings but the application doesn't run. I am asking if it's possible to do this operation, load on external and execute on the internal (FLASH) and what are the additional requirements. Moreover, actually I am not able to debug the application loaded on the external SDRAM.
Thanks a lot. Paolo.
i gotta make some code for a servo motor.
what is the best project u use a servo motor for? can u send me idea and code plz.
Since _you_ gotta make some code, I would think it a bit strange to send you code. Wouldn't your teacher be a bit upset if you hand in someone else's code?
There are an infinite number of projects that could make use of servo motors. Maybe turning a potentiometer, like the volume control on an analog amplifier. Or aiming a spotlight or web camera. If the servo motor is strong enough, you could have it handle the window shutters. Or aim a squirt gun and hunt your cat :p
Yeah! damn right!
Per, what do You think about my question? Is the situation clear enough?
Have a nice day!
View all questions in Keil forum