Hi everyone!
First thanks for your ideas and support.
I am having troubles using the ESP-Prog for debugging.
In a simple blinking project worked one time (I didn’t try again) using the ESP-Prog and an ESP DevKit C.
I am using simple cables to connect GND and the 4 signals for debugging, not 3V3.
My project its composed of several files and libraries and unfortunately I didn’t have the ESP-Prog at the beginning, so i am using it for first time now.
The DEBUG CONSOLE spits SEVERAL lines that I don’t understand and are quite confusing, at least for me.
Here its almost all of the CONSOLE
undefinedC:\Users\jtantera\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from d:\Codigo\ESP32_Smart_iQ\ESP32_IMUCal_BTSerial\.pio\build\upesy_wrover\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20220411 (2022-04-11-08:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
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.
DEPRECATED! use 'adapter speed' not 'adapter_khz'
adapter speed: 500 kHz
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 500 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 : starting gdb server for esp32.cpu0 on pipe
Info : accepting 'gdb' connection from pipe
Info : esp32.cpu0: Target halted, PC=0x40009081, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400076DD, debug_reason=00000000
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 105 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 713 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 8192 KB
Info : Using flash bank 'esp32.cpu0.flash' size 8192 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 105 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 713 KB
Info : Using flash bank 'esp32.cpu0.irom' size 716 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 105 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 713 KB
Info : Using flash bank 'esp32.cpu0.drom' size 108 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
Warn : negative reply, retrying
0x40009081 in ?? ()
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: 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.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
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 105 KB
Info : Flash mapping 1: 0x30020 -> 0x400d0020, 713 KB
Flash mapping 0: 0x10020 -> 0x3f400020, 105 KB
Flash mapping 1: 0x30020 -> 0x400d0020, 713 KB
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 8192 KB
Info : Using flash bank 'esp32.cpu1.flash' size 8192 KB
** Programming Started **
Auto-detected flash bank 'esp32.cpu1.flash' size 8192 KB
Using flash bank 'esp32.cpu1.flash' size 8192 KB
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 733.074 ms @ 27.2824 KB/s
PROF: Data transferred in 733.074 ms @ 27.2824 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Programming Finished **
** Verify Started **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** 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)
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: 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.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=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 156.784 ms @ 25.5128 KB/s
PROF: Data transferred in 156.784 ms @ 25.5128 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** 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)
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: 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.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=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 296.005 ms @ 27.0266 KB/s
PROF: Data transferred in 296.005 ms @ 27.0266 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** 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)
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: 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.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=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
Info : PROF: Data transferred in 34148.8 ms @ 27.6437 KB/s
PROF: Data transferred in 34148.8 ms @ 27.6437 KB/s
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x4009260E, debug_reason=00000001
** 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)
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: 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.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
Temporary breakpoint 1 at 0x400d4360: file src/main.cpp, line 98.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak setup`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Note: automatically using hardware breakpoints for read-only addresses.
Info : esp32.cpu0: Target halted, PC=0x40009073, debug_reason=00000000
esp32.cpu0: Target halted, PC=0x40009073, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400076E0, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x400076E0, debug_reason=00000000
Program
received signal SIGINT, Interrupt.
0x40009073 in ?? ()
pio_reset_run_target
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
Cannot execute this command while the target is running.
Use the "interrupt" command to stop the target
and then try again.
The platformio.ini:
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
monitor_speed = 115200
upload_speed = 921000
lib_deps =
bblanchon/ArduinoJson@^6.19.4
finani/ICM42688@^1.0.0
stm32duino/STM32duino ST25DV@^1.1.0
adapter_speed = 20000
debug_speed = 500
upload_protocol = esp-prog
debug_tool = esp-prog
debug_init_break = tbreak setup
Near the end I paused the debugging and started again, and then stop it because never gets to the break point.
I believe that the problem it’s the memory map, I am setting something wrong and never get the right address, but I am quite new in this.
Any comment its welcome.
Thanks