mcuboot icon indicating copy to clipboard operation
mcuboot copied to clipboard

boot: espressif: iram_loader_seg overlapping with Zephyr app RAM

Open naNEQ opened this issue 10 months ago • 1 comments

I'm only referring to the esp32s3 SOC, but this might be relevant for other Espressif SOCs too.

The bootloader iram_loader_seg is defined to start from 0x403BA000 (which translates to 0x3FCCA000).

In Zephyr, starting from releases 3.7.0 and onwards, the DRAM section of the app finishes at 0x3FCD6400 (it used to be 0x3FCCA000 up until releases 3.6.0).

That creates a not allowed overlap, since "the app may use RAM for static allocations up to the start of iram_loader_seg" (link).

I suggest changing the memory allocation for the bootloader to (keeping the section sizes the same):

iram_seg (RWX) :                  org = 0x403BC400, len = 0xA000
iram_loader_seg (RWX) :      org = 0x403C6400, len = 0x6000
dram_seg (RW) :                   org = 0x3FCDC400, len = 0x9A00

naNEQ avatar Jan 28 '25 08:01 naNEQ

I'll take a look. It's on the plans improving this memory map acknowledge to the OSes.

almir-okato avatar Jan 30 '25 11:01 almir-okato

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

github-actions[bot] avatar Aug 12 '25 02:08 github-actions[bot]