Skip to content

arch/risc-v: update MCUboot slot sizes on Espressif devices#18757

Merged
acassis merged 2 commits into
apache:masterfrom
fdcavalcanti:feature/update-mcuboot-slots
Apr 19, 2026
Merged

arch/risc-v: update MCUboot slot sizes on Espressif devices#18757
acassis merged 2 commits into
apache:masterfrom
fdcavalcanti:feature/update-mcuboot-slots

Conversation

@fdcavalcanti
Copy link
Copy Markdown
Contributor

Summary

RISC-V Espressif Kconfig defaults for MCUboot OTA layout are updated to use slot size 0x150000 (~1.4MB), with secondary slot offset 0x170000, scratch at 0x2C0000, storage MTD at 0x300000, and matching documentation updates on the ESP32-C3, ESP32-C6, and ESP32-H2 platform pages.

  • arch/risc-v: update MCUBoot slot size and offsets

Increase image slot size from ~1MB to ~1.4MB to allow more features by default.
Solves issues when enabling debug features would extrapolate the slot size.

  • documentation: update ESP32-C3|C6|H2 flash allocation table

Update the user documentation for flash allocation when using MCUboot.

Reason for this change: image size is getting to close to 1MB and may not fit the slot when some features such as Wi-Fi are enabled.

Impact

Impact on user: No.

Impact on build: Yes, avoids bad image build when too many features are enabled along MCUboot.

Impact on hardware: ESP32-C3|C6|H2|P4.

Impact on documentation: Yes, updates the documentation for flash allocation when using MCUboot.

Impact on security: No.

Impact on compatibility: No.

Testing

Building

  • ./tools/configure.sh esp32c6-devkitc:mcuboot_update_agent
  • Enable DEBUG_ASSERTIONS and DEBUG_FEATURES
  • make bootloader
  • make ESPTOOL_BINDIR=./

Results

  • Before change:
    Build would failure when imgtool was invoked because the image size was bigger than the MCUboot slot.
Usage: imgtool sign [OPTIONS] INFILE OUTFILE
Try 'imgtool sign -h' for help.

Error: Image size (0x10a894) + trailer (0x630) exceeds requested size 0x100000
make: *** [tools/Unix.mk:575: nuttx] Error 2
  • After changes:
    Build succeeds.

Increase image slot size from ~1MB to ~1.4MB to allow more features by default.
Solves issues when enabling debug features would extrapolate the slot size.

Signed-off-by: Filipe Cavalcanti <[email protected]>
Update the user documentation for flash allocation when using MCUboot.

Signed-off-by: Filipe Cavalcanti <[email protected]>
@fdcavalcanti fdcavalcanti changed the title Feature/update mcuboot slots arch/risc-v: update MCUboot slot sizes on Espressif devices Apr 17, 2026
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: M The size of the change in this PR is medium labels Apr 17, 2026
@acassis acassis merged commit fc00377 into apache:master Apr 19, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants