Skip to content

ESP32-S3 write_flash fails with 0105 checksum/invalid message error on v5.3.0, works fine on v4.8.1 (ESPTOOL-1363) #1178

Closed

Description

@vitorfr77

Operating System

Windows 11

Esptool Version

v5.3.0

Python Version

using the standalone esptool.exe binary bundled with Arduino ESP32 core 3.3.10 (not running from Python source)

Chip Description

ESP32-S3 (QFN56, revision v0.2), 16MB flash, 8MB embedded PSRAM, quad flash mode

Device Description

DevKitC

Hardware Configuration

No response

How is Esptool Run

Arduino IDE with esp32 core 3.3.10 (which calls the bundled esptool v5.3.0 via a new flasher.exe wrapper), and also reproduced by calling esptool.exe v5.3.0 directly from the command line, bypassing the wrapper.

Full Esptool Command Line that Was Run

esptool.exe --chip esp32s3 --port COM6 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin

Esptool Output

esptool v5.3.0
Serial port COM6:
Connecting....
Connected to ESP32-S3 on COM6:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
MAC:                10:51:db:84:5b:ac

Uploading stub flasher...

A fatal error occurred: Failed to write to target RAM (result was 0107: Checksum error)
Failed uploading: uploading error: exit status 2

More Information

I systematically ruled out the following as causes (none changed the failure pattern):

3 different USB cables
Multiple USB ports (including different PCs)
USB-serial driver reinstall + Windows COM port latency timer setting
A Bluetooth SPP virtual COM port briefly sharing COM6 (confirmed not the same COM6 in use during failures)
Power delivery (different ports/machines)
Baud rate (115200, 460800, 9600)
Compression on/off (-z vs -u)

flash_id and other read-only ROM commands work correctly and return valid data every time — only write_flash operations fail.
Downgrading to esptool v4.8.1 and running the exact same command against the exact same binary files on the exact same hardware/port/cable completes successfully with no errors.
I suspect this may be related to the new default flasher stub (esp-flasher-stub) introduced in v5.3.0, the new USB VID:PID-based transport detection, or the improved flash chip connection verification (SFDP register check) — all changed in this release — but I haven't dug into the esptool source to pinpoint which.

Other Steps to Reproduce

Attempt to flash any application image (bootloader + partition table + boot_app0 + app binary) to this specific ESP32-S3 (revision v0.2) board using esptool v5.3.0. Full --trace logs are available if useful for debugging — happy to share on request.

I Have Read the Troubleshooting Guide

  • I confirm I have read the troubleshooting guide.

Activity

  1. github-actions commented on Jul 15, 2026

    @github-actions

    Hi @vitorfr77! Please be aware that (1) the following suggestions are generated by a bot and haven't been fact-checked by Espressif Systems, (2) burning eFuses and enabling security features are irreversible operations and can damage your ESP32 device. We hope that this message will help you until an Espressif Engineer looks at your issue.


    Thank you for the detailed report — this is a well-documented issue. Here's what the knowledge sources can tell us, along with some recommended next steps.

    What's Happening

    The error Failed to write to target RAM (result was 0107: Checksum error) occurs during the stub flasher upload phase — before any actual flash writing begins. This is consistent with your observation that read-only ROM commands work fine but write_flash fails.

    The knowledge sources confirm that esptool v5.3.0 introduced a significant change: [esptool v5.3.0]

    flasher stub: Use esp-flasher-stub as the default flasher stub

    This means the stub being uploaded to RAM in v5.3.0 is different from the one in v4.8.1, which aligns with your regression observation.

    Recommended Workarounds to Try

    1. Disable the stub loader (most direct test)

    Run esptool with --no-stub to bypass the new flasher stub entirely and use the ROM bootloader directly:

    esptool.exe --chip esp32s3 --port COM6 --baud 115200 --before default_reset --after hard_reset --no-stub write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 bootloader.bin 0x8000 partitions.bin 0xe000 boot_app0.bin 0x10000 firmware.bin

    This will confirm whether the new esp-flasher-stub is the root cause. [Flasher Stub]

    2. Increase timeout values

    The 0107: Checksum error during RAM write can sometimes be caused by unstable serial communication during larger data transfers (like uploading the stub). Try increasing timeouts via a configuration file — specifically the timeout and mem_end_rom_timeout values. [Troubleshooting]

    3. Try a different USB-to-Serial adapter or eliminate USB hubs

    Even though you've tried multiple cables and ports, the knowledge sources specifically recommend: [Troubleshooting]

    • Updating or changing USB-to-Serial drivers
    • Using a different USB-to-Serial adapter
    • Eliminating USB hubs and using a shorter, shielded cable

    Where to Report

    Since the failure occurs inside the stub upload (stub behaviour), the appropriate place to report this is the esp-flasher-stub issue tracker: https://github.com/espressif/esp-flasher-stub/issues [Flasher Stub]

    The knowledge sources specifically note:

    If a problem appears only with the default stub but disappears when falling back to the legacy stub, please report it in the esp-flasher-stub issue tracker so the new stub can be fixed before legacy support is removed.

    Please share your --trace logs there — they will be very helpful for the maintainers to diagnose the issue with the new stub on ESP32-S3 revision v0.2.

  2. changed the title [-]ESP32-S3 write_flash fails with 0105 checksum/invalid message error on v5.3.0, works fine on v4.8.1[/-] [+]ESP32-S3 write_flash fails with 0105 checksum/invalid message error on v5.3.0, works fine on v4.8.1 (ESPTOOL-1363)[/+] on Jul 15, 2026
  3. vitorfr77 commented on Jul 15, 2026

    @vitorfr77
    Author

    Thanks for the analysis! I've opened a report on the esp-flasher-stub tracker as suggested, with full details and reproduction steps: espressif/esp-flasher-stub#94
    Leaving this issue open for now in case it's useful to keep tracking from the esptool side, but happy to have it closed/consolidated if maintainers prefer to keep discussion only on the flasher-stub repo.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions