-
Notifications
You must be signed in to change notification settings - Fork 138
Troubleshooting FAQ
OpenOCD log looks like below.
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'
No debug adapter is connected.
Check that debug adapter USB device is present in the system.
OS | Actions |
---|---|
Windows | Go to Device Dispatcher and check that device is detected by the system. |
Linux | Use lsusb to list all connected USB devices. Make sure that you configured udev rules for the device |
MacOS | TBD |
Debug adapter's driver was installed incorrecly.
https://github.com/espressif/openocd-esp32/issues/174
OS | Actions |
---|---|
Windows | Install driver using IDF Tools Installer |
Linux | n/a |
MacOS | n/a |
OpenOCD log looks like below.
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
JTAG wires are connected improperly.
Check JTAG wires are connection.
Application reconfigured JTAG pins for some other purpose (e.g. SPI or SDMMC).
If possible make your application using other pins.
JTAG wires are too long.
Try to use shorter wires for JTAG.
OpenOCD log at startup looks like below.
WARNING: ESP flash support is disabled!
WARNING: ESP flash support is disabled!
Flash support is disabled becasue it has not been implemented for that chip yet.
Flash FW over UART.
Flash support is disabled via OpenOCD command line by option -c 'set ESP_FLASH_SIZE 0'
.
Flash FW over UART.
GDB output looks like below.
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read+;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+
OpenOCD becomes unrespnosive due to:
- slow communication with target
- high verbosity of its debug output (enabled with
-d3
)
Possible solutions:
- Increase GDB remote timeout.
- Increase debug adapter speed by adding
-c adapter_khz XXX
at the end of OpenOCD command line or change it in config file
TBD
OpenOCD log like below.
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
Flasher stub fails when memory protection is enabled.
Need to reset chip after OpenOCD is run and before GDB connects to it or disable memory protetion in project settings
OpenOCD log at startup looks like below.
Error: Failed to get max trace block size!
Error: Failed to init cmd ctx (-4)!
For Espressif RISCV chips you need to reset target after OpenOCD is connected in order to trigger apptrace control info transfer from target to OpenOCD. It is done by invoking special syscall when apptrace is initialized on the target during startup.
Reset chip after OpenOCD is connected.
OpenOCD log after target HW reset looks like below.
Error: esp_usb_jtag: usb sent only 0 out of 31 bytes.
Error: missing data from bitq interface
Error: esp_usb_jtag: usb sent only 0 out of 50 bytes.
Error: missing data from bitq interface
Error: Failed to exec JTAG queue!
Error: Failed to read debug stubs address location (-104)!
Is by 9e06f3e commit.
OpenOCD log looks like below when flash is accessed (e.g. upon GDB connect).
Error: esp_usb_jtag: usb sent only 0 out of 31 bytes.
Error: missing data from bitq interface
Error: esp_usb_jtag: usb sent only 0 out of 50 bytes.
Error: missing data from bitq interface
Error: Failed to exec JTAG queue!
Error: Failed to read debug stubs address location (-104)!
This is known issue.
Workaround is to use external JTAG adapter or run OpenOCD with disabled flash support with option -c 'set ESP_FLASH_SIZE 0'
.
This is kbown issue of rev3 silicon. https://github.com/espressif/esp-idf/issues/7836