Page 1 of 1

Eclipse OpenOCD Fails to Program Device

Posted: Tue May 25, 2021 3:57 pm
by BrianP
I posted this in the hardware section as a reply to my comment regarding getting OpenOCD to work with ESP32-C3 but I guess it is buried due to the subject header.

I cannot get Openocd to program the device before debugging.

The command I use is

openocd -f interface/esp_usb_jtag.cfg -f board/esp32c3-builtin.cfg -c "program_esp blink.bin 0x10000 verify exit"

the response I get is

<path to scripts>\scripts/target/esp_common.cfg:101: Error: invalid command name "esp"
in procedure 'program_esp'
at file "C:\Users\bjpic\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\share\openocd\scripts/target/esp_common.cfg", line 101

Therefore, I have to select the run configuration, compile and program, switch over to the debug configuration, and debug. I don't know anything about OCD so I have no idea what this means. Looking at the script, however, it doesn't seem to mind that I am using an ESP32-C3. As near as I can tell, I am using the correct command per the documentation.

I am using the latest beta IDF (otherwise ESP32-C3 isn't properly supported)

Thanks for the help.

Re: Eclipse OpenOCD Fails to Program Device

Posted: Thu May 27, 2021 2:50 pm
by ESP_kondalkolipaka
Hi Brian,

Have you tried with the ESP-IDF OpenOCD debugging with Eclipse Plugin? If not, please check this https://github.com/espressif/idf-eclips ... bugging.md

Thanks

Re: Eclipse OpenOCD Fails to Program Device

Posted: Fri May 28, 2021 3:06 am
by ESP_kondalkolipaka
As it was reported here, adding it for reference
https://github.com/espressif/openocd-esp32/issues/158