jtag调试错误

doublecat
Posts: 7
Joined: Tue Mar 02, 2021 6:30 am

jtag调试错误

Postby doublecat » Mon Aug 02, 2021 3:56 am

参照文档https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/jtag-debugging/index.html
----------------------------------------------------------------------------------------
gdb错误信息:
(gdb) target remote :3333
Remote debugging using :3333
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Remote replied unexpectedly to 'vMustReplyEmpty': timeout
--------------------------------------------------------------------------------------
openocd信息:
Info : accepting 'gdb' connection on tcp/3333
Warn : No symbols for FreeRTOS!
Error: timed out while waiting for target halted / 4 - 2
Info : esp32.cpu0: Target halted, PC=0x4000C2DD, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Error: xtensa_wait_algorithm: not halted 0, pc 0x4000c2dd, ps 0x60025
Error: Failed to wait algorithm (-302)!
Error: Algorithm run failed (-302)!
Info : Flash mapping 0: 0x0 -> 0x81f1b8, 0 KB
......
Info : Flash mapping 1461: 0x0 -> 0x0, 0 KB
Segmentation fault
-------------------------------------------------------------------------------------------------
串口信息:
......
rst:0x10 (RTCWDT_RTC_RESET),boot:0x37 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x37 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x27 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x27 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
-----------------------------------------------------------------------------------------------------------------
SDK版本:
esp-idf 4.3
openocd v0.10.0-esp32-20210721
仿真器:ESP Prog

Flash映射错误,难道是分区表有问题??

doublecat
Posts: 7
Joined: Tue Mar 02, 2021 6:30 am

Re: jtag调试错误

Postby doublecat » Mon Aug 02, 2021 4:24 am

重复了一遍操作流程:
1. 链接好USB口,包括esp开发板和esp prog
2. 开发板应该启动了app,由于本屁烧的是hello-world,所以串口一直hello,world!
3. 启动openocd和gdb,程序会自动停下来等待调试

以前,本屁会先让开发板复位处于一个等待状态,然后在调试时出现了前面描述的错误.

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: jtag调试错误

Postby ESP_Gargamel » Mon Aug 02, 2021 8:58 am

这是解决了还是没?从前面的 log 看,似乎没有程序烧进去。
你先确保 openocd 正确了,再 gdb。
可以一个窗口 idf.py openocd,另一个窗口 idf.py gdbtui 或者 idf.py gdbgui。

doublecat
Posts: 7
Joined: Tue Mar 02, 2021 6:30 am

Re: jtag调试错误

Postby doublecat » Fri Aug 06, 2021 12:54 pm

烧进去了,应该是班子状态不对

Who is online

Users browsing this forum: No registered users and 93 guests