UART Debbuging

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

UART Debbuging

Postby rasheedaasir » Wed Nov 22, 2017 7:23 am

Hello
I am using ESP32 Wrover kit and am having problem in debugging.

$ xtensa-esp32-elf-gdb -x gdbinit build/blink.elf
GNU gdb (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 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-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:
:3333: The system tried to join a drive to a directory on a joined drive.
(gdb)

I have tried all possible ways to debug but its not working
Thanks

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: UART Debbuging

Postby ESP_Sprite » Wed Nov 22, 2017 10:16 am

Do you have openocd running? You didn't post your gdbinit but the reference to '3333' implies gdb tries to connect to OpenOCD (and fails).

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

Re: UART Debbuging

Postby rasheedaasir » Wed Nov 22, 2017 11:46 am

Here is my gdb init file
target remote :3333
mon reset halt
thb app_main
x $a1=0
c

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

Re: UART Debbuging

Postby rasheedaasir » Wed Nov 22, 2017 11:51 am

Yes my opencd is working.
$ ./esp32/openocd-esp32/bin/openocd.exe -s esp32/openocd-esp32/share/openocd/scripts -f esp32/openocd-esp32/share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg -f esp32/openocd-esp32/share/openocd/scripts/board/esp32-wrover.cfg
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
force hard breakpoints
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 : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
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=0x400D0D84 (active) APP_CPU: PC=0x00000000
esp32: target state: halted


Here is my gdbinit script

target remote :3333
mon reset halt
thb app_main
x $a1=0
c

Thanks

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: UART Debbuging

Postby ESP_Sprite » Thu Nov 23, 2017 9:14 am

Your 'target remote' command is off. Try changing it to 'target remote localhost:3333'.

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

Re: UART Debbuging

Postby rasheedaasir » Thu Nov 23, 2017 1:07 pm

Hello,
Thanks again for looking into the issue.
As per your direction I have changed it to

target remote localhost:3333
mon reset halt
thb app_main
x $a1=0
c
even after that it was not working.

$ xtensa-esp32-elf-gdb -x gdbinit build/blink.elf
GNU gdb (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 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/blink.elf...done.
gdbinit:1: Error in sourced command file:
localhost:3333: The system tried to join a drive to a directory on a joined driv e.
(gdb)

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: UART Debbuging

Postby ESP_Sprite » Thu Nov 23, 2017 2:58 pm

Do you have a firewall or something that may be interfering with the connection?

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

Re: UART Debbuging

Postby rasheedaasir » Fri Nov 24, 2017 8:22 am

Hello,
Even I have tried that by making firewall disable but even after that it was not working.
Is it working fine with linux ? , as currently am using windows I will switch to linux if it is working fine with this OS.
Thanks.

ESP_Sprite
Posts: 9761
Joined: Thu Nov 26, 2015 4:08 am

Re: UART Debbuging

Postby ESP_Sprite » Fri Nov 24, 2017 8:33 am

Hmm, mysterious, not sure what else it would be. Yes, OpenOCD/GDB should work fine under Linux.

rasheedaasir
Posts: 7
Joined: Wed Nov 22, 2017 7:20 am

Re: UART Debbuging

Postby rasheedaasir » Fri Nov 24, 2017 10:28 am

Hello,
Thank you very much for all your response ESP32_Sprit.
It literally helps us moving in positive direction.
Is it possible for you guys to provide VM for linux with all the environment and tools running as it will save lots of time.
As am working on open source Bacnet Stack (by Steve Karg). And am planning to incorporate this library with ESP32 so that we can use this device for Building Automation. I am already done with the Bacnet Stack but from last couple of days am struggling with the JTAG debugging of ESP32 WROVER Kit . I would highly appreciate if we will get a copy of VM.
Thanks .

Who is online

Users browsing this forum: Google [Bot] and 122 guests