ESP32 + esp-prog = no debug cursor

Hello everybody,

I am trying to debug an esp32+arduino code and it is failing on me.

The board is an esp-wrover-kit.

Looks like it is doing its thing correctly, but it does not break on setup(). I can pause and run but it never shows the debug cursor.

#include <Arduino.h>
unsigned long int now;
void setup(){
Serial.begin(115200);
}
void loop(){
now = millis();
log_i(“%d”, now);
delay(100);
}

PlatformIO Unified Debugger → Redirecting...
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target…
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
adapter speed: 20000 kHz

WARNING: boards/esp32-wrover.cfg is deprecated, and may be removed in a future release.
If your board is ESP32-WROVER-KIT, use board/esp32-wrover-kit-1.8v.cfg instead.
adapter speed: 3000 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 3000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] Target halted, PC=0x40009406, debug_reason=00000000
Info : [esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000
Info : starting gdb server for esp32.cpu0 on pipe
Info : accepting ‘gdb’ connection from pipe
Warn : No symbols for FreeRTOS!
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Set GDB target to ‘esp32.cpu0’
Info : Flash mapping 0: 0x10020 → 0x3f400020, 204 KB
Info : Flash mapping 1: 0x50020 → 0x400d0020, 575 KB
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Auto-detected flash bank ‘esp32.cpu0.flash’ size 4096 KB
Info : Using flash bank ‘esp32.cpu0.flash’ size 4096 KB
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Flash mapping 0: 0x10020 → 0x3f400020, 204 KB
Info : Flash mapping 1: 0x50020 → 0x400d0020, 575 KB
Info : Using flash bank ‘esp32.cpu0.irom’ size 576 KB
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Flash mapping 0: 0x10020 → 0x3f400020, 204 KB
Info : Flash mapping 1: 0x50020 → 0x400d0020, 575 KB
Info : Using flash bank ‘esp32.cpu0.drom’ size 208 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
0x40009406 in ?? ()
Error: FreeRTOS maximum used priority is unreasonably big, not proceeding: 170
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] requesting target halt and executing a soft reset
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
[esp32.cpu0] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Debug controller was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
Info : [esp32.cpu1] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Core was reset.
[esp32.cpu1] requesting target halt and executing a soft reset
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Debug controller was reset.
Info : [esp32.cpu1] Core was reset.
[esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Debug controller was reset.
[esp32.cpu1] Core was reset.
Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Flash mapping 0: 0x10020 → 0x3f400020, 204 KB
Info : Flash mapping 1: 0x50020 → 0x400d0020, 575 KB
Flash mapping 0: 0x10020 → 0x3f400020, 204 KB
Flash mapping 1: 0x50020 → 0x400d0020, 575 KB
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : Auto-detected flash bank ‘esp32.cpu1.flash’ size 4096 KB
Info : Using flash bank ‘esp32.cpu1.flash’ size 4096 KB
** Programming Started **
Auto-detected flash bank ‘esp32.cpu1.flash’ size 4096 KB
Using flash bank ‘esp32.cpu1.flash’ size 4096 KB
** Programming Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Erased 20480 bytes in 427.76 ms
PROF: Erased 20480 bytes in 427.76 ms
Info : PROF: Data transferred in 153.185 ms @ 130.561 KB/s
PROF: Data transferred in 153.185 ms @ 130.561 KB/s
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Wrote 20480 bytes in 478.029 ms (data transfer time included)
PROF: Wrote 20480 bytes in 478.029 ms (data transfer time included)
** Programming Finished in 1580 ms **
** Programming Finished in 1580 ms **
** Verify Started **
** Verify Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Flash verified in 183.056 ms
** Verify OK **
PROF: Flash verified in 183.056 ms
** Verify OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] requesting target halt and executing a soft reset
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
[esp32.cpu0] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Debug controller was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
Info : [esp32.cpu1] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Core was reset.
[esp32.cpu1] requesting target halt and executing a soft reset
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Debug controller was reset.
Info : [esp32.cpu1] Core was reset.
[esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Debug controller was reset.
[esp32.cpu1] Core was reset.
Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Erased 4096 bytes in 226.122 ms
PROF: Erased 4096 bytes in 226.122 ms
Info : PROF: Data transferred in 35.637 ms @ 112.243 KB/s
PROF: Data transferred in 35.637 ms @ 112.243 KB/s
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Wrote 4096 bytes in 339.259 ms (data transfer time included)
PROF: Wrote 4096 bytes in 339.259 ms (data transfer time included)
** Programming Finished in 898 ms **
** Programming Finished in 898 ms **
** Verify Started **
** Verify Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Flash verified in 172.107 ms
PROF: Flash verified in 172.107 ms
** Verify OK **
** Verify OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] requesting target halt and executing a soft reset
[esp32.cpu0] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Debug controller was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
Info : [esp32.cpu1] requesting target halt and executing a soft reset
[esp32.cpu1] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Debug controller was reset.
Info : [esp32.cpu1] Core was reset.
[esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Debug controller was reset.
[esp32.cpu1] Core was reset.
Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Erased 8192 bytes in 292.406 ms
PROF: Erased 8192 bytes in 292.406 ms
Info : PROF: Data transferred in 61.782 ms @ 129.488 KB/s
PROF: Data transferred in 61.782 ms @ 129.488 KB/s
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Wrote 8192 bytes in 361.837 ms (data transfer time included)
PROF: Wrote 8192 bytes in 361.837 ms (data transfer time included)
** Programming Finished in 984 ms **
** Programming Finished in 984 ms **
** Verify Started **
** Verify Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Flash verified in 176.582 ms
PROF: Flash verified in 176.582 ms
** Verify OK **
** Verify OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] requesting target halt and executing a soft reset
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
[esp32.cpu0] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Debug controller was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
Info : [esp32.cpu1] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Core was reset.
[esp32.cpu1] requesting target halt and executing a soft reset
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Debug controller was reset.
[esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Core was reset.
[esp32.cpu1] Debug controller was reset.
[esp32.cpu1] Core was reset.
Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Erased 892928 bytes in 4112.69 ms
PROF: Erased 892928 bytes in 4112.69 ms
Info : PROF: Data transferred in 6326.48 ms @ 137.833 KB/s
PROF: Data transferred in 6326.48 ms @ 137.833 KB/s
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Wrote 892928 bytes in 6731.91 ms (data transfer time included)
** Programming Finished in 11188 ms **
** Verify Started **
PROF: Wrote 892928 bytes in 6731.91 ms (data transfer time included)
** Programming Finished in 11188 ms **
** Verify Started **
Info : [esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
[esp32.cpu0] Target halted, PC=0x40092612, debug_reason=00000001
Info : PROF: Flash verified in 626.977 ms
PROF: Flash verified in 626.977 ms
** Verify OK **
** Verify OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32.cpu0] requesting target halt and executing a soft reset
[esp32.cpu0] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Debug controller was reset.
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Debug controller was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x500000CF, debug_reason=00000000
Info : [esp32.cpu1] requesting target halt and executing a soft reset
[esp32.cpu1] requesting target halt and executing a soft reset
Info : [esp32.cpu0] Core was reset.
[esp32.cpu0] Core was reset.
Info : [esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32.cpu1] Debug controller was reset.
Info : [esp32.cpu1] Core was reset.
[esp32.cpu1] Debug controller was reset.
[esp32.cpu1] Core was reset.
Info : [esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Temporary breakpoint 1 at 0x4015b9e0: file src/main.cpp, line 17.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to debug_init_break = tbreak setup
PlatformIO: More configuration options → Redirecting...
Note: automatically using hardware breakpoints for read-only addresses.

Pressed pause:

Info : [esp32.cpu0] Target halted, PC=0x40009034, debug_reason=00000000
Info : Set GDB target to ‘esp32.cpu0’
[esp32.cpu0] Target halted, PC=0x40009034, debug_reason=00000000
Set GDB target to ‘esp32.cpu0’
Info : [esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000
Error: FreeRTOS maximum used priority is unreasonably big, not proceeding: 170

Program
received signal SIGINT, Interrupt.
0x40009034 in ?? ()

Continue and pause a few times:

Program
received signal SIGINT, Interrupt.
0x4000939b in ?? ()
Info : [esp32.cpu0] Target halted, PC=0x400093DD, debug_reason=00000000
Info : Set GDB target to ‘esp32.cpu0’
[esp32.cpu0] Target halted, PC=0x400093DD, debug_reason=00000000
Set GDB target to ‘esp32.cpu0’
Info : [esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x400076DD, debug_reason=00000000
Error: FreeRTOS maximum used priority is unreasonably big, not proceeding: 170

Program
received signal SIGINT, Interrupt.
0x400093dd in ?? ()
Info : [esp32.cpu0] Target halted, PC=0x40009049, debug_reason=00000000
Info : Set GDB target to ‘esp32.cpu0’
[esp32.cpu0] Target halted, PC=0x40009049, debug_reason=00000000
Set GDB target to ‘esp32.cpu0’
Info : [esp32.cpu1] Target halted, PC=0x400076E2, debug_reason=00000000
[esp32.cpu1] Target halted, PC=0x400076E2, debug_reason=00000000
Error: FreeRTOS maximum used priority is unreasonably big, not proceeding: 170

Program
received signal SIGINT, Interrupt.
0x40009049 in ?? ()

The variable ‘now’ is never changing between runs.

Adding a breakpoint inside loop() does not make it break.

platformio.ini

[env:nodemcu-32s]
platform = espressif32
board = esp-wrover-kit
board_build.partitions = ota-littlefs.csv
board_build.filesystem = littlefs
framework = arduino
debug_tool = esp-prog
debug_speed = 3000
debug_init_break = tbreak setup
upload_protocol = esp-prog
upload_speed = 3000
monitor_speed = 115200
monitor_port = COM7

I am able to step through the code with ´idf.py openocd gdbgui´ with another project, so the hardware seems to be fine.

What can I do to improve it?

Thank you.