Skip to content

boards/esp32p4: Remove unnecessary CONFIG_ESPRESSIF_MERGE_BINS#18889

Open
JianyuWang0623 wants to merge 1 commit into
apache:masterfrom
JianyuWang0623:boards/esp32p4/remove-merge-bins
Open

boards/esp32p4: Remove unnecessary CONFIG_ESPRESSIF_MERGE_BINS#18889
JianyuWang0623 wants to merge 1 commit into
apache:masterfrom
JianyuWang0623:boards/esp32p4/remove-merge-bins

Conversation

@JianyuWang0623
Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Summary

ESP32-P4 boards use simple boot mode and do not have a separate
second-stage bootloader, so there is no need to merge multiple
binaries into a single padded image. The CONFIG_ESPRESSIF_MERGE_BINS
option causes the build to produce a 16 MB padded image solely for
unified flashing, which is unnecessary on these configs.

This patch removes CONFIG_ESPRESSIF_MERGE_BINS=y from the following
three esp32p4-function-ev-board defconfigs:

  • configs/ethernet/defconfig
  • configs/i2schar/defconfig
  • configs/spislv/defconfig

After the change, make flash writes only the actual firmware
(~380 KB) instead of the 16 MB padded image.

Impact

  • User: make flash is significantly faster on the affected
    configs (~55 s -> ~4.5 s).
  • Build: No more nuttx.merged.bin is produced for these
    configs; the flashed artifact is nuttx.bin directly.
  • Hardware: ESP32-P4-Function-EV-Board only. Other ESP chips
    (ESP32, ESP32-S3, ESP32-C3, etc.) that rely on a true second-stage
    bootloader are not touched.
  • Documentation / Security / Compatibility: None.

Testing

Host: Ubuntu Linux, x86_64
Board: ESP32-P4-Function-EV-Board

  1. Refreshed all three modified defconfigs with the upstream tool
    to make sure they are still normalized:

    $ ./tools/refresh.sh --silent esp32p4-function-ev-board:ethernet
      [1/1] Normalize esp32p4-function-ev-board:ethernet
    $ ./tools/refresh.sh --silent esp32p4-function-ev-board:i2schar
      [1/1] Normalize esp32p4-function-ev-board:i2schar
    $ ./tools/refresh.sh --silent esp32p4-function-ev-board:spislv
      [1/1] Normalize esp32p4-function-ev-board:spislv
    $ git status --short
    (no diff produced for any of the three defconfigs)
    
  2. Built and flashed each config; observed make flash writing only
    nuttx.bin (~380 KB) and the flashing time dropping from ~55 s
    to ~4.5 s. The boards boot normally and the corresponding
    functional tests (NSH, i2schar, spislv, ethernet ping) still
    pass.

ESP32-P4 uses simple boot mode without a separate bootloader,
so merging binaries into a single 16MB file is unnecessary.
Removing this option allows 'make flash' to write only the
actual firmware (~380KB) instead of a padded 16MB image,
reducing flash time from ~55s to ~4.5s.

Assisted-by: GitHubCopilot:claude-4.7-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
@github-actions github-actions Bot added Size: XS The size of the change in this PR is very small Board: risc-v labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: risc-v Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants