I've seen mention, but not an implementation on how one can copy a program to run from SDRAM at runtime? The custom bord were using has a hardware flash with Flash / FlexSPI, causing it to run very slowly, how can we copy the program to SDRAM at runtime so we can execute quicker? This is just a temporary solution for a small amount of hardware devices until the hardware flash / FlexSPI is resolved.
Thank you!
Solved! Go to Solution.
Please follow the steps so the image is executed on SDRAM. The image is stored on flash but it is moved to SDRAM to be executed.
1. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script and check Link application to RAM.
2. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU C Compiler > Preprocessor and add defined symbol SKIP_SYSCLK_INIT=1.
3. In Project > Properties > C/C++ Build > MCU settings, delete Flash, and modify BOARD_SDRAM to start at 0x80002000 with size 0x1dfe000. Move BOARD_SDRAM to first position to make it default.
4. Build the image.
The image must have DCD so the SDRAM is already initialized at the moment the ROM boot copies the code to be executed to SDRAM.
Best regards,
Omar
Please follow the steps so the image is executed on SDRAM. The image is stored on flash but it is moved to SDRAM to be executed.
1. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script and check Link application to RAM.
2. Select Project > Properties - C/C++ Build > Settings > Tool Settings > MCU C Compiler > Preprocessor and add defined symbol SKIP_SYSCLK_INIT=1.
3. In Project > Properties > C/C++ Build > MCU settings, delete Flash, and modify BOARD_SDRAM to start at 0x80002000 with size 0x1dfe000. Move BOARD_SDRAM to first position to make it default.
4. Build the image.
The image must have DCD so the SDRAM is already initialized at the moment the ROM boot copies the code to be executed to SDRAM.
Best regards,
Omar