Error getting started debugging

Andrew12345
Posts: 2
Joined: Sat Aug 17, 2019 8:34 pm

Error getting started debugging

Postby Andrew12345 » Wed Aug 21, 2019 7:14 pm

Hi,

I'm trying to follow the debugging example here: https://docs.espressif.com/projects/esp ... ugger.html

I'm using a segger J-Link. I don't think it makes a difference, but I'm using this ESP32 module: https://www.shenzhen2u.com/NodeMCU-32S

I loaded the example blink binary (only change in blink IO pin number), and the LED blinks just fine. I then ran

Code: Select all

openocd -f interface/jlink.cfg -f board/esp-wroom-32.cfg -l errorlog.txt
In another terminal window, I ran

Code: Select all

xtensa-esp32-elf-gdb build/blink.elf -x gdbinit
, and get output:

Code: Select all

GNU gdb (crosstool-NG esp32-2019r1) 8.1.0.20180627-git
Copyright (C) 2018 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=xtensa-esp32-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"...
Reading symbols from build/blink.elf...done.
gdbinit:1: Error in sourced command file:
Remote connection closed
(gdb) 
The openOCD error log reads:

Code: Select all

adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Feb  2 2018 18:12:40
Info : Hardware version: 10.10
Info : VTarget = 3.322 V
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : clock speed 20000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
Error: cpu0: esp32_fetch_all_regs (line 268): DSR (00000088) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_fetch_all_regs (line 268): DSR (00000088) indicates DIR instruction generated an overrun!
Info : Target halted. PRO_CPU: PC=0x400E2FA2 (active)    APP_CPU: PC=0x00000000 
Error: cpu0: xtensa_write_memory (line 802): DSR (8000CC13) indicates DIR instruction generated an exception!
Warn : esp32: Failed writing 4 bytes at address 0x3ff5f064, data - a1, 3a, d8, 50, 00, 00, 00, 00
Error: Failed to write ESP32_TIMG0WDT_PROTECT (-4)!
Info : Detected debug stubs @ 3ffb284c on core0 of target 'esp32'
Error: cpu0: xtensa_read_memory (line 695): DSR (00000088) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 5892 bytes at address 0x40090000
Error: no working area available, can't alloc space for stub code!
Error: Failed to load stub (-308)!
Error: Algorithm run failed (-308)!
Error: Failed to run flasher stub (-308)!
Warn : Failed to get flash mappings (-308)!
Error: cpu0: xtensa_write_memory (line 802): DSR (0000008C) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 802): DSR (0000008C) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 512 bytes at address 0x40090000, data - 40, 00, f0, 3f, 44, 00, f0, 3f
Error: Failed to write stub section!
Error: Failed to load stub (-4)!
Error: Algorithm run failed (-4)!
Error: Failed to run flasher stub (-4)!
Error: cpu0: xtensa_write_memory (line 802): DSR (0000008C) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 802): DSR (0000008C) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 512 bytes at address 0x40090000, data - 40, 00, f0, 3f, 44, 00, f0, 3f
Error: Failed to write stub section!
Error: Failed to load stub (-4)!
Error: Algorithm run failed (-4)!
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
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : xtensa_poll: Target offline
Error: xtensa_poll: Target failure
Polling target esp32 failed, trying to reexamine
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
shutdown command invoked
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()

Any help getting debugging to work would be appreciated.

Thank you!

Who is online

Users browsing this forum: No registered users and 147 guests