Bootloader/BootROM Cannot Execute App Code on SDRAM Address
Hello,
I am currently working on a bootloader code. I successfully managed to execute the app code by copying to the RAM address (0x20000000). However, whenever I try to copy the app code to SDRAM (0xC0000000) instead of RAM, bootloader never executes the app code.
In the linker script file of my app, I follow the same process with the "RAM Version" of the code: I used SDRAM address for all sectors (.data, .text, .bss...).
My jump code is basically like:
uint32_t app_sp = *((volatile uint32_t*)APP_SDRAM_ADDRESS);
uint32_t app_pc = *((volatile uint32_t*)(APP_SDRAM_ADDRESS + 4));
SCB->VTOR = APP_SDRAM_ADDRESS;
__set_MSP(app_sp);
((void (*)(void))app_pc)();
Thanks.
