I can't start debug mode in Espressif IDE

tankist
Posts: 14
Joined: Tue Feb 08, 2022 7:22 am

I can't start debug mode in Espressif IDE

Postby tankist » Thu Dec 07, 2023 10:15 am

I make a project in Espressif IDE from the scratch but use a pattern blink. Than I try to put my board ESP32-S3-Devkitc-1 into debug mode with onboard USB-JTAG. The process starts and I see the code uploads but the debug state is unexpected terminates.
Debug console log:

Code: Select all

Open On-Chip Debugger v0.12.0-esp32-20230921 (2023-09-21-13:40)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Flashing "blink/build/bootloader/bootloader.bin" at 0x0
** program_esp input args <0x0 verify> **
Info : esp_usb_jtag: serial (F4:12:FA:DF:2C:EC)
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : Set GDB target to 'esp32s3.cpu0'
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 46 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 111 KB
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Auto-detected flash bank 'esp32s3.cpu0.flash' size 8192 KB
Info : Using flash bank 'esp32s3.cpu0.flash' size 8192 KB
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 46 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 111 KB
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Auto-detected flash bank 'esp32s3.cpu1.flash' size 8192 KB
Info : Using flash bank 'esp32s3.cpu1.flash' size 8192 KB
** Programming Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Erased 24576 bytes in 469.968 ms
Info : PROF: Data transferred in 225.007 ms @ 106.663 KB/s
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Wrote 24576 bytes in 531.003 ms (data transfer time included)
** Programming Finished in 1953 ms **
** Verify Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Flash verified in 114.005 ms 
** Verify OK **
** Flashing done for bootloader/bootloader.bin in 2073 ms **
Flashing "blink/build/blink.bin" at 0x10000
** program_esp input args <0x10000 verify> **
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
** Programming Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Erased 233472 bytes in 2034.99 ms
Info : PROF: Data transferred in 2060.99 ms @ 110.626 KB/s
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Wrote 233472 bytes in 2429 ms (data transfer time included)
** Programming Finished in 4827 ms **
** Verify Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Flash verified in 228.001 ms 
** Verify OK **
** Flashing done for blink.bin in 5062 ms **
Flashing "blink/build/partition_table/partition-table.bin" at 0x8000
** program_esp input args <0x8000 verify> **
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
** Programming Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Erased 4096 bytes in 170.996 ms
Info : PROF: Data transferred in 48.994 ms @ 81.6426 KB/s
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Wrote 4096 bytes in 327 ms (data transfer time included)
** Programming Finished in 858 ms **
** Verify Started **
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : PROF: Flash verified in 104.998 ms 
** Verify OK **
** Flashing done for partition_table/partition-table.bin in 968 ms **
** Total programming time 8105 ms **
** Resetting Target **
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
0
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : [esp32s3.cpu0] Target halted, PC=0x4004883B, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] Target halted, PC=0x40043A3B, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : accepting 'gdb' connection on tcp/3333
Info : [esp32s3.cpu0] Target halted, PC=0x40378FA6, debug_reason=00000000
Info : [esp32s3.cpu1] Target halted, PC=0x40378FA6, debug_reason=00000000
Warn : No symbols for FreeRTOS!
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 46 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 111 KB
Info : Using flash bank 'esp32s3.cpu0.irom' size 112 KB
Info : [esp32s3.cpu0] Target halted, PC=0x4038E3B6, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3c020020, 46 KB
Info : Flash mapping 1: 0x20020 -> 0x42000020, 111 KB
Info : Using flash bank 'esp32s3.cpu0.drom' size 48 KB
Info : New GDB Connection: 1, Target esp32s3.cpu0, state: halted
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : [esp32s3.cpu0] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Debug controller was reset.
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x500000EF, debug_reason=00000000
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu1] requesting target halt and executing a soft reset
Info : [esp32s3.cpu0] Core was reset.
Info : [esp32s3.cpu0] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Debug controller was reset.
Info : [esp32s3.cpu1] Core was reset.
Info : [esp32s3.cpu1] Target halted, PC=0x40000400, debug_reason=00000000
Info : [esp32s3.cpu1] Reset cause (3) - (Software core reset)
Info : [esp32s3.cpu0] Reset cause (3) - (Software core reset)
Info : Detected FreeRTOS version: (10.4.3)
Info : dropped 'gdb' connection
shutdown command invoked
Product information info:

Code: Select all

* xtensa-esp-elf-gdb: GDB for Xtensa
  - 12.1_20221002 (recommended, installed)
* riscv32-esp-elf-gdb: GDB for RISC-V
  - 12.1_20221002 (recommended, installed)
* xtensa-esp32-elf: Toolchain for Xtensa (ESP32) based on GCC
  - esp-12.2.0_20230208 (recommended, installed)
* xtensa-esp32s2-elf: Toolchain for Xtensa (ESP32-S2) based on GCC
  - esp-12.2.0_20230208 (recommended, installed)
* xtensa-esp32s3-elf: Toolchain for Xtensa (ESP32-S3) based on GCC
  - esp-12.2.0_20230208 (recommended, installed)
* esp-clang: Toolchain for all Espressif chips based on clang (optional)
  - 15.0.0-23786128ae (recommended, installed)
* riscv32-esp-elf: Toolchain for 32-bit RISC-V based on GCC
  - esp-12.2.0_20230208 (recommended, installed)
* esp32ulp-elf: Toolchain for ESP32 ULP coprocessor
  - 2.35_20220830 (recommended, installed)
* cmake: CMake build system
  - 3.24.0 (recommended, installed)
  - 3.16.3 (supported)
* openocd-esp32: OpenOCD for ESP32
  - v0.12.0-esp32-20230921 (recommended, installed)
* ninja: Ninja build system
  - 1.10.2 (recommended, installed)
* idf-exe: IDF wrapper tool for Windows
  - 1.0.3 (recommended, installed)
* ccache: Ccache (compiler cache)
  - 4.8 (recommended, installed)
* dfu-util: dfu-util (Device Firmware Upgrade Utilities)
  - 0.11 (recommended, installed)
* esp-rom-elfs: ESP ROM ELFs
  - 20230320 (recommended, installed)

IDF_PATH: Espressif\frameworks\esp-idf-v5.1.2
IDF_PYTHON_ENV_PATH: Espressif\python_env\idf5.1_py3.11_env

Operating System: windows 10
Java Runtime Version: 20.0.2+9-78
Eclipse Version: 4.22.0.v20211124-1800
Eclipse CDT Version: 10.5.0.202109270023
IDF Eclipse Plugin Version: 2.4.0.202201280731
ESP-IDF v5.1.2-dirty
Python set for IDF_PYTHON_ENV: Python 3.11.3
Python declared in PATH variable: Python 3.11.3
Settings of the debud mode:
esp_05.png
esp_05.png (51.14 KiB) Viewed 4886 times
esp_04.png
esp_04.png (54.52 KiB) Viewed 4886 times
esp_03.png
esp_03.png (31.64 KiB) Viewed 4886 times

Could you tell me what is wrong?

tankist
Posts: 14
Joined: Tue Feb 08, 2022 7:22 am

Re: I can't start debug mode in Espressif IDE

Postby tankist » Fri Dec 08, 2023 7:14 am

The main problem was with a stupid string in "Debugger" -> "Startup" section:

Code: Select all

set remote hardware-watchpoint-limit {IDF_TARGET_CPU_WATCHPOINT_NUM}
I guess there is no information about IDF_TARGET_CPU_WATCHPOINT_NUM variable so debugger didn't work. I just removed the line and debug session has started.

Who is online

Users browsing this forum: No registered users and 70 guests