ESP32-C3-DevkitM-1 and ESP-PROG and Platformio and VSCODE (Win10) problems

joseMiguel
Posts: 22
Joined: Sun Oct 25, 2020 11:43 pm

ESP32-C3-DevkitM-1 and ESP-PROG and Platformio and VSCODE (Win10) problems

Postby joseMiguel » Wed Jun 14, 2023 1:30 pm

Hello,

I am trying to debug ESP32-C3-DevkitM-1 board with ESP-PROG debugger.
(I have already used built-in USB/JTAG interface, but i faced lot of problems with freertos, so i decided to go trough ESP-PROG)

1) I have burned the DIS_USB_JTAG fuse by typing :
>espefuse.py --port COM11 burn_efuse DIS_JTAG_USB 1

2) I have connected GPIO10 to +3.3V
and ESP-PROG to ESP32-C3-DevkitM-1

ESP-PROG <---------> ESP32-C3-DevkitM-1
(Pin 2) ESP_TMS <---------> (Pin 11 right side) MTMS
(Pin 4) ESP_TCK <---------> (Pin 9 right side) MTCK
(Pin 6) ESP_TDO <---------> (Pin 8 right side) MTDO
(Pin 8) ESP_TDI <---------> (Pin 10 right side) MTDI

remark :
in the schematic the ESP-PROG, ESP_TDO is an input and ESP_TDI is an output.

3) I have used the Zadig software (Dual RS232-HS (interface 0) replaced by WinUsb)

I have the following message in the DEBUG CONSOLE

Code: Select all

undefinedC:\Users\josem\.platformio\packages\toolchain-riscv32-esp\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\josem\espidf-Platformio-Projects\testProjet1\.pio\build\esp32-c3-devkitm-1\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-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 5000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Error: Unsupported DTM version: 14
Warn : target esp32c3 examination failed
Info : starting gdb server for esp32c3 on pipe
Info : accepting 'gdb' connection from pipe
Error: Target not examined yet
Error executing event gdb-attach on target esp32c3:

Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Error: error during select: Unknown error
Error: Unsupported xlen: -1
Error: Unknown target arch!
Error: Unsupported DTM version: 14
.pioinit:11: Error in sourced command file:
Remote communication error.  Target disconnected.: Success.
here below my platformio.ini file

Code: Select all


[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = espidf

upload_port = COM11
monitor_speed = 115200


debug_tool = esp-prog


; [debug_openocd]
; debug_server =
;     ${platformio.packages_dir}/tool-openocd-esp32/bin
;     -s
;     ${platformio.packages_dir}/tool-openocd-esp32/share/openocd/scripts/
;     -f
;     ${platformio.packages_dir}/tool-openocd-esp32/share/openocd/scripts/board/esp32c3-ftdi.cfg

; [debug]
; debug_server = 
;     ${platformio.packages_dir}\\toolchain-riscv32-esp\\bin
;     -singlerun
;     -if
;     JTAG
;     ;ftdi
;     -select
;     JTAG
;     -port
;     localhost:3333
;     -device
;     esp32c3

debug_init_break = tbreak app_main

Could you help me please,

Thank you in advance

kind regards

José Miguel
José Michel

joseMiguel
Posts: 22
Joined: Sun Oct 25, 2020 11:43 pm

Re: ESP32-C3-DevkitM-1 and ESP-PROG and Platformio and VSCODE (Win10) problems

Postby joseMiguel » Sat Dec 30, 2023 4:00 pm

Hello,

For those who want to use Platformio and the ESP_PROG debugger on Win10
I give your my platformio.ini who works

Code: Select all


[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = espidf

; Set optimization level and amount of debug information generated by the compiler
debug_build_flags = -O0 -ggdb3 -g3
; JMJ tests two lines below
build_flags = -D PIO_FRAMEWORK_MBED_RTOS_PRESENT
lib_ldf_mode = chain+

upload_port = COM11
monitor_speed = 115200


debug_tool = esp-prog

; fixed speed in kHz
debug_speed = 8000


[debug_openocd]
debug_server =
    ${platformio.packages_dir}/tool-openocd-esp32/bin
    -s
    ${platformio.packages_dir}/tool-openocd-esp32/share/openocd/scripts/
    -f
    ${platformio.packages_dir}/tool-openocd-esp32/share/openocd/scripts/board/esp32c3-ftdi.cfg
    -c 'usb_vid_pid 0x0403 0x6010'
    ;ftdi tdo_sample_edge falling

[debug]
debug_server = 
    ${platformio.packages_dir}\\toolchain-riscv32-esp\\bin
    -singlerun
    -if
    ;JTAG
    ftdi
    -select
    JTAG
    -port
    localhost:3333
    -device
    esp32c3

debug_init_break = tbreak app_main
Have a nice end of year

Regards

José Michel
José Michel

Who is online

Users browsing this forum: No registered users and 123 guests