-
Notifications
You must be signed in to change notification settings - Fork 147
Description
I have been trying to get openocd functioning on the C3 for a couple of weeks now without success. Sometimes it will work for a little while and then it fails and nothing I do can revive it. So I built openocd-esp32 from source as of 10/22 to ensure I have the very latest version.
I am running nothing besides openocd from source and riscv32-esp-elf-gdb. The 'target remote :3333" command fails to execute. That is because openocd is failing to work properly.....
jonsmirl@ares:~/aosp/openocd-esp32$ ./src/openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210902-15-g78ea2222 (2021-10-22-19:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Warn : No symbols for FreeRTOS!
Error: Hart is not halted!
Error: Failed to wait algorithm (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to run flasher stub (-4)!
Warn : Failed to get flash mappings (-4)!
Error: Abstract command ended in error 'exception' (abstractcs=0x10001302)
Error: Timed out after 5s waiting for busy to go low (abstractcs=0x10001302). Increase the timeout with riscv set_command_timeout_sec.
Error: Failed to write stub section!
Error: Failed to run flasher stub (-4)!
Error: Abstract command ended in error 'exception' (abstractcs=0x10001302)
Error: Timed out after 5s waiting for busy to go low (abstractcs=0x10001302). Increase the timeout with riscv set_command_timeout_sec.
Error: Failed to write stub section!
Error: Failed to run flasher stub (-4)!
Error: Failed to probe flash, size 0 KB
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
jonsmirl@ares:~/aosp/connectedhomeip/examples/lighting-app/esp32$ riscv32-esp-elf-gdb
GNU gdb (crosstool-NG esp-2021r2) 9.2.90.20200913-git
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=riscv32-esp-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) set target :3333
Ambiguous set command "target :3333": target-async, target-charset, target-file-system-kind, target-wide-charset.
(gdb) target remote :3333
Remote debugging using :3333
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Remote communication error. Target disconnected.: Connection reset by peer.
(gdb) target remote :3333
Remote debugging using :3333
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Remote communication error. Target disconnected.: Connection reset by peer.
(gdb) quit