乐鑫技术交流
直播中

甘满盛

7年用户 1246经验值
擅长:386660
私信 关注
[问答]

使用ESP32-MINI-U模组无法builtin JTAG调试怎么解决?

使用同样的代码和工程配置挂载合宙9.9元的开发板JTAG是可以的,环境使用的是Espressif-IDE 2.5
现在工程PCB使用的是ESP32-C3-MINI-U模组
观察硬件差异只有合宙9.9元的开发板的FLASH是外置的
ESP32-C3-MINI-U模组是片内FLASH
在工程中已经关闭了内存保护,但模组还是挂不上JTAG,日志如下:
大概能看出来是openocd对flash的操作有什么问题

Open On-Chip Debugger  v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Flashing C:/Espressif/frameworks/esp-idf-v4.4/workspace/BMS76952_4S/build/partition_table/partition-table.bin at 0x8000
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40101104
Info : starting gdb server for esp32c3 on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : [0] Found 8 triggers
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Error: Failed to get flash size!
Error: Failed to get flash size!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Failed to find bank 'esp32c3.flash'!
** Flashing Failed **
-1
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Warn : No symbols for FreeRTOS!
Error: Failed to get flash maps (4294967295)!
Warn : Failed to get flash mappings (-4)!
Error: Failed to get flash size!
Error: Failed to get flash size!
Error: Failed to probe flash, size 0 KB
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
shutdown command invoked
                     

回帖(1)

洒下墨色

2024-6-14 17:09:17
由于ESP32-MINI-U模组没有内置JTAG调试接口,您需要使用其他方法进行调试。以下是一些建议:

1. 使用ESP-Prog调试器:ESP-Prog是一款专为ESP32设计的调试器,可以通过USB连接到您的计算机。您可以使用它进行JTAG调试。

2. 使用UART调试:虽然这不是JTAG调试,但您可以使用UART(通用异步收发传输器)进行基本的调试。您需要将ESP32-MINI-U模组的TX和RX引脚连接到计算机的串行端口,然后使用串行通信工具(如PuTTY、Minicom等)查看调试信息。

3. 使用Espressif的ESP-IDF框架:ESP-IDF提供了一套完整的开发环境,包括调试工具。您可以使用它来编译、烧录和调试您的程序。

4. 检查您的配置:确保您的Espressif-IDE 2.5环境配置正确,包括烧录器、串行端口等设置。此外,检查您的OpenOCD版本是否与ESP32-C3-MINI-U模组兼容。

5. 更新固件:尝试更新ESP32-C3-MINI-U模组的固件,以解决可能的兼容性问题。


举报

更多回帖

发帖
×
20
完善资料,
赚取积分