RAM loading on SDRAM #48242
Replies: 1 comment 1 reply
-
Hi @Sathishkumar-rk , If you want your Zephyr app to execute from somewhere other than flash, you need to configure the app to execute from that other memory. I suspect you built with the default CONFIG_CODE_FLEXSPI=y, which builds for flash. The app may be copied from flash to SDRAM, but when the app executes a branch instruction, the address will still be in flash, and it will jump back to flash and execute from there. You can build the code for SDRAM using CONFIG_CODE_SEMC=y. However, when I test with this, I see when z_bss_zero() is called in the startup code, it trashes the code memory in SDRAM. So it seems the linker settings for this RT1160 are not configured for CONFIG_CODE_SEMC=y, and allow the BSS section to overlap code in SDRAM. You can create an issue to report this, and it will be assigned to NXP. You can also link back to this discussion to detail the problem. Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @DerekSnell
I want to use the SDRAM for zephyr application running, below is detailed requirement for my project using mimxrt1160_evk_cm7.
MCUBoot will copy the latest image from primary or secondary slot based on image version using RAM Loading feature and then I want run the application from RAM location.
I was able to copy the content in SDRAM location (0x80020000) but while execution it still running from flash (expected behavior is running from SDRAM location).
Image details on slot-0 & slot-1:

Whenever I run the program it always run from slot-0 program, Is that I'm missing some setting in zephyr application or mcuboot?

MCUBoot configuration:
Beta Was this translation helpful? Give feedback.
All reactions