Skip to content

[Bug] [bsp][esp32-c3] Prebuilt bootloader and app image refuse ESP32-C3 v1.x chips #11991

Closed

Description

@anamarija-j

RT-Thread Version

v5.3.0 and master cbadbdf

Affected area

Board Support Package (BSP)

Hardware/BSP vendor

ESP32

Architecture

RISC-V

Board and hardware details

ESP32-C3 board, chip revision v1.1 (ROM esp32c3-eco7-20230720), bsp/ESP/ESP32_C3

Develop Toolchain

GCC

Describe the bug

On an ESP32-C3 with chip revision v1.1 the ESP32_C3 BSP does not boot. esptool refuses to flash:

A fatal error occurred: builtin_imgs/bootloader.bin requires chip revision 3 or higher (this chip is revision 1). Use --force to flash anyway.

With --force the bootloader starts, then stops before it reads the partition table:

I (32) boot: ESP-IDF v5.0-dev-5148-g259c1776e9-dirty 2nd stage bootloader
I (32) boot: chip revision: V101
E (36) boot_comm: This chip is revision 1 but the application is configured for minimum revision 3. Can't run.

Cause:

  • builtin_imgs/bootloader.bin only sets the old min_chip_rev field (3); min_chip_rev_full is 0. This ESP-IDF v5.0-dev bootloader compares the old field with the minor revision, and v1.1 has minor revision 1.
  • SConstruct only sets image.min_rev = 3, so rtthread.bin has the same problem. esptool also uses the old field when max_rev_full is 0.
  • Master has the same bootloader.bin and the same SConstruct line.

The application itself runs on v1.1: with only the header fields changed, the same build boots and runs.

Other additional context:

Workaround, tested on the v1.1 board with v5.3.0:

  • SConstruct: image.min_rev = 0, image.min_rev_full = 3, image.max_rev_full = 199 (v0.3 to v1.99, the same range as ESP-IDF).
  • builtin_imgs/bootloader.bin: the same three header fields (byte 14, bytes 15-16, bytes 17-18), then the SHA-256 at the end recomputed. The checksum only covers the segments.

Suggested fix: set the full revision fields in SConstruct as above, and rebuild builtin_imgs/bootloader.bin with a current ESP-IDF release, which checks the full fields. Patching the old binary is only a workaround: with the old field at 0 it would also start the app on v0.0 to v0.2 chips, although the app is linked for the v0.3 ROM.

Other additional context

No response

Activity

  1. added
    bugThis PR/issue is a bug in the current code.
    on Nov 5, 2026
  2. github-actions commented on Nov 5, 2026

    @github-actions

    如需认领并处理此 Issue,请评论 /claim。

    To claim and work on this issue, comment /claim.

  3. BernardXiong commented on Nov 6, 2026

    @BernardXiong
    Member

    已确认 master 上 bsp/ESP/ESP32_C3/SConstruct 仍然只设置 image.min_rev = 3,没有写 min_rev_full / max_rev_full;builtin_imgs/bootloader.bin 也是旧镜像。报告中的分析成立:v1.1 芯片的 minor revision 是 1,旧字段比较会拒绝启动。

    这是 BSP 专属问题(还涉及重建二进制 bootloader),不属于内核/组件通用缺陷,因此没有从这里提交修复。建议按报告中的方案修改 SConstruct 的完整版本字段,并用当前 ESP-IDF 重新生成 builtin_imgs/bootloader.bin;仅改旧字段会留下 v0.0~v0.2 的兼容性缺口。


    Confirmed that bsp/ESP/ESP32_C3/SConstruct on master still sets only image.min_rev = 3 and does not set min_rev_full / max_rev_full; builtin_imgs/bootloader.bin is also the old image. The analysis holds: a v1.1 chip reports minor revision 1, and the old-field comparison rejects it.

    This is BSP-specific (and also requires rebuilding the binary bootloader), not a generic kernel/component defect, so no fix is submitted from here. Recommend setting the full revision fields in SConstruct as described and rebuilding builtin_imgs/bootloader.bin with a current ESP-IDF; patching only the old field would leave the v0.0–v0.2 compatibility gap.

  4. cms19859230182-lang commented on Nov 9, 2026

    @cms19859230182-lang
    Contributor

    /claim

    已提交修复 PR:#12013
    分支 fix/esp32c3-chip-rev-full。
    SConstruct 写入完整版本字段;builtin bootloader 头字段同步更新并重算 SHA(IDF 重建因缺 cmake 未做)。本地 scons 通过。未烧板。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: RISC-VBSP related with risc-vBSPBSP: ESP32BSP related with ESPbugThis PR/issue is a bug in the current code.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions