However, the gdbinit file in home\khoil has exact content as the one in D:\esp32\workspace\scan. So even if I remove the one in "khoil" folder, it probably wont fix the problem with gdb connection, right?
Thanks,
Problem: Setting up JTAG debugger for ESP32
Re: Problem: Setting up JTAG debugger for ESP32
Try removing the one in home directory, and rename the one in project directory from .gdbinit to gdbinit (remove leading dot so the file is not automatically loaded).
Then run xtensa-esp32-elf-gdb build/yourproject.elf -x gdbinit (ELF file before the gdbinit).
Then run xtensa-esp32-elf-gdb build/yourproject.elf -x gdbinit (ELF file before the gdbinit).
Re: Problem: Setting up JTAG debugger for ESP32
I did what you said and I think it works now.
Code: Select all
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 7.10
Copyright (C) 2015 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=i686-host_pc-mingw32 --target=xtensa-esp32-el f".
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/scan.elf...done.
warning: File "D:\esp32\workspace\scan\.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path D:\esp32\workspace\scan\.gdbinit
line to your configuration file "C:\msys32\home\khoil/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "C:\msys32\home\khoil/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
0x40131b3e in esp_pm_impl_waiti ()
at C:/msys32/home/khoil/esp/esp-idf/components/esp32/pm_esp32.c:474
474 asm("waiti 0");
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
Hardware assisted breakpoint 1 at 0x400d2aa0: file D:/esp32/workspace/scan/main/ scan.c, line 117.
Target halted. PRO_CPU: PC=0x400D2AA0 (active) APP_CPU: PC=0x40131B3E
[New Thread 1073462756]
[New Thread 1073460856]
[New Thread 1073465412]
[New Thread 1073453148]
[New Thread 1073412772]
[New Thread 1073413628]
[New Thread 1073454280]
[Switching to Thread 1073458824]
Temporary breakpoint 1, app_main () at D:/esp32/workspace/scan/main/scan.c:117
117 {
(gdb)
Re: Problem: Setting up JTAG debugger for ESP32
Hi esp_igrr,
So it is great that I am able to make the gdb works in the terminal. However, I followed the instruction from
https://docs.espressif.com/projects/esp ... er-eclipse
After I setup the gdb in Eclipse, I did the following steps:
1. I ran mingw32, and typed
Eclipse stucks at "Launching Scan: 87%"
I think GDB is not set up correctly in Eclipse.
Could you help me with this as well?
Thank you
So it is great that I am able to make the gdb works in the terminal. However, I followed the instruction from
https://docs.espressif.com/projects/esp ... er-eclipse
After I setup the gdb in Eclipse, I did the following steps:
1. I ran mingw32, and typed
Code: Select all
bin/openocd -s share/openocd/scripts -f interface/ftdi/tumpa.cfg -f board/esp-wroom-32.cfg
Code: Select all
Open On-Chip Debugger 0.10.0-dev (2018-09-20-12:54)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
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 : Target halted. PRO_CPU: PC=0x40131B3E (active) APP_CPU: PC=0x40131B3E
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : accepting 'gdb' connection on tcp/3333
Info : Target halted. PRO_CPU: PC=0x4009175E (active) APP_CPU: PC=0x40131B3E
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 83 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 394 KB
Info : Target halted. PRO_CPU: PC=0x4009175E (active) APP_CPU: PC=0x40131B3E
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Info : Target halted. PRO_CPU: PC=0x4009175E (active) APP_CPU: PC=0x40131B3E
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 83 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 394 KB
Info : Using flash size 396 KB
Info : Target halted. PRO_CPU: PC=0x4009175E (active) APP_CPU: PC=0x40131B3E
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 83 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 394 KB
Info : Using flash size 84 KB
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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
Info : Detected debug stubs @ 3ffb3900 on core0 of target 'esp32'
I think GDB is not set up correctly in Eclipse.
Could you help me with this as well?
Thank you
Re: Problem: Setting up JTAG debugger for ESP32
Hi,
Could someone help me with this please? I spent days to figure out why esp32-thing and tumpa wont work with eclipse but work fine on terminal using openocd and gdb.
After I followed this instruction
https://docs.espressif.com/projects/esp ... ugger.html
I ran the debugger while openOCD up and running, I got "launching scan" stuck at 87%
Thanks
Could someone help me with this please? I spent days to figure out why esp32-thing and tumpa wont work with eclipse but work fine on terminal using openocd and gdb.
After I followed this instruction
https://docs.espressif.com/projects/esp ... ugger.html
I ran the debugger while openOCD up and running, I got "launching scan" stuck at 87%
Thanks
Who is online
Users browsing this forum: No registered users and 110 guests