Running OpenOCD on ESP32-P4-Function-EV-Board
Posted: Sat Sep 21, 2024 5:48 pm
Hi there,
I am starting with ESP-32-P4, copied the simple "hello_world" example, and tried to debug it (I work on windows).
Buiding, flashing and running monitor works fine, so my USB Comport is setup properly, but no matter how I try to launch OpenOCD I always have same message:
After reading in some documentaiton (sparse, very very sparse), I found that :
I have the following output:
(BTW, the documentation states to use a function called ""
May someone give me a hint on how to use OpenOCD with this board?
Kind regards
Juan
I am starting with ESP-32-P4, copied the simple "hello_world" example, and tried to debug it (I work on windows).
Buiding, flashing and running monitor works fine, so my USB Comport is setup properly, but no matter how I try to launch OpenOCD I always have same message:
Code: Select all
C:\Espressif\frameworks\esp-idf-v5.3.1>openocd -f board/esp32p4-builtin.cfg
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
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
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not find or open device!
C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\share\openocd\scripts/target/esp_common.cfg:9: Error:
at file "C:\Espressif\tools\openocd-esp32\v0.12.0-esp32-20240318\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 9
Error: [esp32p4.hp.cpu] Unsupported DTM version: -1
Error: [esp32p4.hp.cpu] Could not identify target type.
So, next step, lets check the status of these GPIOs in vanilla hello_world code, adding the following lines to my code:USB-JTAG: GPIO24 and GPIO25 are used by USB-JTAG by default. If they are reconfigured to operate as normal GPIOs, USB-JTAG functionality will be disabled.
Code: Select all
gpio_dump_io_configuration(stdout, (1ULL << 24) | (1ULL << 25));
That I understand "IOMUX, default behaviour" (I May be wrong)================IO DUMP Start================
IO[24] -
Pullup: 0, Pulldown: 0, DriveCap: 3
InputEn: 0, OutputEn: 0, OpenDrain: 0
FuncSel: 0 (IOMUX)
SleepSelEn: 0
IO[25] -
Pullup: 0, Pulldown: 0, DriveCap: 3
InputEn: 0, OutputEn: 0, OpenDrain: 0
FuncSel: 0 (IOMUX)
SleepSelEn: 0
=================IO DUMP End==================
This is esp32p4 chip with 2 CPU core(s), , silicon revision v0.1, 2MB external flash
Minimum free heap size: 610312 bytes
(BTW, the documentation states to use a function called ""
that seems to not exists.gpio_dump_all_io_configuration(stdout, SOC_GPIO_VALID_GPIO_MASK);
May someone give me a hint on how to use OpenOCD with this board?
Kind regards
Juan