ESP32-WROOM-32 problem when JTAG debugging with ESP-Prog

DaveW_NZ
Posts: 3
Joined: Sun Nov 10, 2019 1:18 am

ESP32-WROOM-32 problem when JTAG debugging with ESP-Prog

Postby DaveW_NZ » Sun Sep 12, 2021 4:10 am

Recommended to repost from https://community.platformio.org/t/esp3 ... prog/23419

Hi All

Last week I received an ESP-PROG to allow me to use JTAG debugging with my ESP32 Dev Board.

To test the ESP-PROG board I created a new Arduino project in PlatformIO, loaded the BLINK code and all worked as expected. Build, Upload, debug, breakpoints…

Now this weekend as I am working on my real project code I am getting the following error in the debugger.

Code: Select all

/builds/idf/crosstool-NG/.build/src/gdb-7.10/gdb/regcache.c:697: internal-error: 
regcache_raw_read_unsigned: Assertion `regnum >= 0 && regnum < regcache->descr->nr_raw_registers' failed.
A problem internal to GDB has been detected, further debugging may prove unreliable.
Quit this debugging session? 
When I close the project and open the BLINK test sketch it works fine. I have used the same PlateformIO.ini file for both the test BLINK and my project code.

Any suggestions on what I should be looking for here?

Thanks Dave

PlatformIO Core 5.1.1
Espressif32 3.3.1


VS Code Version: 1.60.0 (user setup)
Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff
Date: 2021-09-01T10:41:52.311Z
Electron: 13.1.8
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

PlatformIO.ini

Code: Select all

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
upload_port = com5
monitor_speed = 115200

; ESP-PROG JTAG
debug_tool = esp-prog 
debug_init_break = tbreak setup
board_debug.openocd_board = esp32-wrover-kit-1.8v.cfg
debug_speed = 12000
** note using the 1.8v cfg to fix the reboot loop problem with the GPIO12

DaveW_NZ
Posts: 3
Joined: Sun Nov 10, 2019 1:18 am

Re: ESP32-WROOM-32 problem when JTAG debugging with ESP-Prog

Postby DaveW_NZ » Thu Sep 16, 2021 10:13 am

No suggestions?

DaveW_NZ
Posts: 3
Joined: Sun Nov 10, 2019 1:18 am

Re: ESP32-WROOM-32 problem when JTAG debugging with ESP-Prog

Postby DaveW_NZ » Tue Sep 21, 2021 8:07 am

I actually found the fix, as below. I was removing PIO from VS Code but removing the directory did the trick.
Does this occur after a fresh reinstall too? To do that,

remove the PlatformIO extension from VSCode and close VSCode
remove the folder C:\Users\User\.platformio\
re-open VSCode, reinstall PlatformIO, restart VSCode after installation has finished
retry building the project first, then debugging.
Thanks Dave

Who is online

Users browsing this forum: No registered users and 61 guests