Skip to content

esp32C3 debug error get flash size error (IDFGH-16575) (OCD-1260) #381

@18506711722

Description

@18506711722

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.5.1

Espressif SoC revision.

ESP32-C3 (QFN32) (revision v0.4)

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

None

Development Kit.

custom board

Power Supply used.

USB

What is the expected behavior?

使用VSCODE 通过USB jtag对ESP32C3进行debug调试

What is the actual behavior?

调试报错 无法获取esp32C3的flash size

Steps to reproduce.

使用vscode usb jtag 调试ESP32C3显示错误无法获取flash size
相同环境使用ESP32S3完美运行

Debug Logs.

Open On-Chip Debugger v0.12.0-esp32-20250707 (2025-07-06-17:44)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

Open On-Chip Debugger v0.12.0-esp32-20250707 (2025-07-06-17:44)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

debug_level: 2

Info : esp_usb_jtag: VID set to 0x303a and PID t
o 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000

WARNING!!! OpenOCD binary version (Open On-Chip Debugger v0.12.0-esp32-
20250707 (2025-07-06-17:44)) doesn't match the .cfg file version (v0.12.0-esp32-20240318)

Info : Listening on port 6666 for tcl con
nections
Info : Listening on port 4444 for telnet connections

Info : esp_usb_jtag: serial (B4:3A:45:5A:0D:2C)

Info : esp_usb_jtag: Device found. Ba
se speed 40000KHz, div range 1 to 255

Info : clock speed 40000 kHz

Warn : DEPRECATED: auto-selecting transport "jtag". Use 'transport select jtag' to suppress this message.

Info : JTAG tap: esp32c3.cpu tap/d
evice found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)

Info : [esp32c3] datacount=2 pro
gbufsize=16

Info : [esp32c3] Examined RISC-V core; found 1 harts

Info : [esp32c3]  XLEN=32, misa=0x40101104
Info : [esp32c3] Examination succeed

Info : [esp32c3] starting gdb server on 3333
Info : Listening on port 3333 for gdb con
nections

Info : accepting 'tcl' connection on tcp/6666
Info : dropped 'tcl' connection

Info : accepting 'tcl' connection on tcp/6666

ready

Flashing "c:/workspace/esp32/sca
n/build/bootloader/bootloader.bin" at 0x0
** program_esp input args <0x0 verify> **

Info : JTAG tap: esp32c3.cpu 
tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)

Info : [esp32c3] Reset cause (3) - (Software core reset)

** Programming Started **

Info : [esp32c3] Target halted, PC=0x4038048A, debug_reason=00000001

Info : [esp32c3] Found 8 triggers

Warn : Failed to get flash maps (-9)!
Warn 
❌ : Failed to read flash size!
Warn : Failed to get flash mappings (-4)!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Failed to find bank 'esp32c3.flash'!

** Flashing Failed **
-1

[/OpenOCD]
[Flash]
Failed to flash the device (JTag), please try again [got response: '-1', expecting: '0']

Diagnostic report archive.

No response

More Information.

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions