Hi all,
Having trouble getting PIO Unified Debugger to work.
Environment: VS Code on Win 10
Hardware: ESP_WROVER_KIT V4.1 (integrated FTDI debug probe)
Basic setup (debug interface configuration) seems to be correct, as I am able to debug an Arduino project (e.g. arduino-wifiscan example).
However, trying to debug any espidf project (e.g. espidf-blink) gdb crashes:
TERMINAL output is:
PIO Plus (https pioplus.com) v1.4.10
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: espidf)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 > Espressif ESP-WROVER-KIT
SYSTEM: ESP32 240MHz 320KB RAM (4MB Flash)
DEBUG: CURRENT(ftdi) ON-BOARD(ftdi) EXTERNAL(esp-prog, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny)
Library Dependency Finder -> http bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 0 compatible libraries
Scanning dependencies...
No dependencies
Compiling .pioenvs\esp-wrover-kit\src\main.o
Linking .pioenvs\esp-wrover-kit\firmware.elf
Building .pioenvs\esp-wrover-kit\firmware.bin
Retrieving maximum program size .pioenvs\esp-wrover-kit\firmware.elf
Checking size .pioenvs\esp-wrover-kit\firmware.elf
Memory Usage -> http bit.ly/pio-memory-usage
DATA: [ ] 4.0% (used 12956 bytes from 327680 bytes)
PROGRAM: [= ] 13.3% (used 139136 bytes from 1048576 bytes)
DEBUGGING-CONSOLE output is:
Reading symbols from c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/firmware.elf...
done.
PlatformIO Unified Debugger > http bit.ly/pio-debug
PlatformIO: Initializing remote target...
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
http openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 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 : Target halted. PRO_CPU: PC=0x400D07AF (active) APP_CPU: PC=0x400E0F22
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : accepting 'gdb' connection from pipe
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400E0F22
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
xTaskCreate (pvCreatedTask=0x0, uxPriority=5, pvParameters=0x0, usStackDepth=768, pcName=0x3f400e88 "\210\016@?k_task", pvTaskCode=0x400d077c <blink_task>) at C:/Users/Hildebrand.BE/.platformio/packages/framework-espidf/components/freertos/include/freertos/task.h:438
438 return xTaskCreatePinnedToCore( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pvCreatedTask, tskNO_AFFINITY );
Not implemented stop reason (assuming exception): undefined
Hardware assisted breakpoint 1 at 0x400d07af: file src\main.c, line 43.
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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
auto erase enabled
Info : Use core0 of target 'esp32'
auto erase enabled
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
wrote 24576 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/bootloader.bin in 1.141461s (21.026 KiB/s)
wrote 24576 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/bootloader.bin in 1.141461s (21.026 KiB/s)
** Programming Finished **
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
read 20704 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/bootloader.bin and flash bank 0 at offset 0x00001000 in 0.358398s (56.414 KiB/s)
contents match
read 20704 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/bootloader.bin and flash bank 0 at offset 0x00001000 in 0.358398s (56.414 KiB/s)
** Verified OK **
contents match
** Verified 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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
auto erase enabled
auto erase enabled
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
wrote 4096 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/partitions.bin in 0.637191s (6.278 KiB/s)
wrote 4096 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/partitions.bin in 0.637191s (6.278 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Programming Finished **
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E0
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E0
read 3072 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/partitions.bin and flash bank 0 at offset 0x00008000 in 0.265933s (11.281 KiB/s)
contents match
read 3072 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/partitions.bin and flash bank 0 at offset 0x00008000 in 0.265933s (11.281 KiB/s)
contents match
** Verified OK **
** Verified 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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu1: Current bits set: BreakIn BreakOut RunStallIn
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
** Programming Started **
auto erase enabled
auto erase enabled
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076E2
Info : Use core0 of target 'esp32'
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
wrote 143360 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/firmware.bin in 2.909716s (48.115 KiB/s)
wrote 143360 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/firmware.bin in 2.909716s (48.115 KiB/s)
** Programming Finished **
** Verify Started **
Info : Use core0 of target 'esp32'
** Programming Finished **
** Verify Started **
Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400076DD
read 139280 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/firmware.bin and flash bank 0 at offset 0x00010000 in 0.711024s (191.295 KiB/s)
contents match
read 139280 bytes from file c:/Users/Hildebrand.BE/Documents/PlatformIO/Projects/181008-155725-espidf-blink/.pioenvs/esp-wrover-kit/firmware.bin and flash bank 0 at offset 0x00010000 in 0.711024s (191.295 KiB/s)
** Verified OK **
contents match
** Verified 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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = thb app_main`
Info : Target halted. PRO_CPU: PC=0x400D07AF (active) APP_CPU: PC=0x400E0F22
Target halted. PRO_CPU: PC=0x400D07AF (active) APP_CPU: PC=0x400E0F22
[New Thread 1073510428]
[New Thread 1073508528]
[New Thread 1073513084]
[New Thread 1073500736]
[New Thread 1073497468]
[New Thread 1073499264]
[New Thread 1073501868]
[Switching to Thread 1073506412]
Temporary breakpoint
1, app_main () at src\main.c:43
43 xTaskCreate(&blink_task, "blink_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL);
/builds/idf/crosstool-NG/.build/src/gdb-7.10/gdb/inline-frame.c:171: internal-error: inline_frame_this_id: Assertion `!frame_id_eq (*this_id, outer_frame_id)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session?
(y or n) [answered Y; input not from terminal]
This is a bug, please report it.
For instructions, see:
<http www.gnu.org/software/gdb/bugs/>.
/builds/idf/crosstool-NG/.build/src/gdb-7.10/gdb/inline-frame.c:171: internal-error: inline_frame_this_id: Assertion `!frame_id_eq (*this_id, outer_frame_id)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB?
(y or n) [answered Y; input not from terminal]