ESP32 - Debugging using Eclipse [solved]

salomonreinach
Posts: 18
Joined: Tue Jan 08, 2019 11:57 am

ESP32 - Debugging using Eclipse [solved]

Postby salomonreinach » Fri Feb 01, 2019 2:27 pm

Hi all,

I'm trying to debug my code using Eclipse, I followed the espressif tuto : https://docs.espressif.com/projects/esp ... er-eclipse . I did exactly the same but when I'm launching the debugger I have the following problem :

Code: Select all

Error in final launch sequence:

Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: Connexion terminée par expiration du délai d'attente.
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: Connexion terminée par expiration du délai d'attente.
localhost:3333: Connexion terminée par expiration du délai d'attente.
Does anyone know why I have this message ?

I'm using Eclipse IDE for C/C++ Developers Version: 2018-12 (4.10.0) with an Olimex-arm-ocd-usb-h and a JTAG cable.

Thank for your time :)
Attachments
Capture du 2019-02-01 15-23-20.png
Capture du 2019-02-01 15-23-20.png (76.17 KiB) Viewed 16067 times

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP32 - Debugging using Eclipse

Postby ESP_igrr » Sat Feb 02, 2019 3:51 am

At the time when Eclipse reports this error, what output do you get from OpenOCD?

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: ESP32 - Debugging using Eclipse

Postby CalinB » Sat Feb 02, 2019 7:27 am

Start the GDB first using command:

Code: Select all

openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Then start the debugging session on eclipse

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ESP32 - Debugging using Eclipse

Postby Ritesh » Sat Feb 02, 2019 1:46 pm

CalinB wrote:
Sat Feb 02, 2019 7:27 am
Start the GDB first using command:

Code: Select all

openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Then start the debugging session on eclipse
ESP_igrr has asked like what output you are getting into OpenOCD console output while facing this issue. So that we can have idea like what can be issue into your case.
Regards,
Ritesh Prajapati

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: ESP32 - Debugging using Eclipse

Postby CalinB » Mon Feb 04, 2019 5:11 am

Ritesh wrote:
Sat Feb 02, 2019 1:46 pm
ESP_igrr has asked like what output you are getting into OpenOCD console output while facing this issue. So that we can have idea like what can be issue into your case.

I was giving a solution to @salomonreinach problem on my post.
Please read the posts and posters name before reply :D

salomonreinach
Posts: 18
Joined: Tue Jan 08, 2019 11:57 am

Re: ESP32 - Debugging using Eclipse

Postby salomonreinach » Mon Feb 04, 2019 11:55 am

Thank you for your answers and sorry for replying only now,

I also try using the command line, and I have the following error :

Code: Select all

xtensa-esp32-elf-gdb -x gdbinit build/hello.elf


GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 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=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/bookinou.elf...done.
gdbinit.txt:1: Error in sourced command file:
:3333: Connexion terminée par expiration du délai d'attente. (means the connexion ended because it exceed the wainting time)
(gdb)
I created the gdbinit document as it is written in the esspresif tuto :

Code: Select all

target remote :3333
set remote hardware-watchpoint-limit 2
mon reset halt
flushregs
thb app_main
c
Attachments
Capture du 2019-02-04 12-49-05.png
Capture du 2019-02-04 12-49-05.png (126.44 KiB) Viewed 15924 times

salomonreinach
Posts: 18
Joined: Tue Jan 08, 2019 11:57 am

Re: ESP32 - Debugging using Eclipse

Postby salomonreinach » Mon Feb 04, 2019 12:47 pm

CalinB wrote:
Mon Feb 04, 2019 5:11 am
Ritesh wrote:
Sat Feb 02, 2019 1:46 pm
ESP_igrr has asked like what output you are getting into OpenOCD console output while facing this issue. So that we can have idea like what can be issue into your case.

I was giving a solution to @salomonreinach problem on my post.
Please read the posts and posters name before reply :D
Thank you it works with your solution :D

Atul_90
Posts: 9
Joined: Sun Jul 14, 2019 3:33 pm

Re: ESP32 - Debugging using Eclipse

Postby Atul_90 » Sun Aug 11, 2019 5:29 pm

CalinB wrote:
Sat Feb 02, 2019 7:27 am
Start the GDB first using command:

Code: Select all

openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Then start the debugging session on eclipse
hi i am new to this,i want to debug my application in elipse.you have given command to start the gdb
where this command needs to to be entered..?
i am trying but it on command line but it says openocd command cannot be found

please help..!

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: ESP32 - Debugging using Eclipse [solved]

Postby CalinB » Tue Aug 13, 2019 7:38 pm

The command should be entered on command line.
The paths to gdb and openocd should be set on system environment variables.

As a alternative solution to eclipse, you can try Visual Studio Code.

Here is a quick start guide for debugging esp32 on VsCode:
https://github.com/botofancalin/Esp32_debug_template

Atul_90
Posts: 9
Joined: Sun Jul 14, 2019 3:33 pm

Re: ESP32 - Debugging using Eclipse [solved]

Postby Atul_90 » Sun Aug 18, 2019 9:54 pm

CalinB wrote:
Tue Aug 13, 2019 7:38 pm
The command should be entered on command line.
The paths to gdb and openocd should be set on system environment variables.

As a alternative solution to eclipse, you can try Visual Studio Code.
Here is a quick start guide for debugging esp32 on VsCode:
https://github.com/botofancalin/Esp32_debug_template
Hi calinB,

thanks for the response..!

i have gone through the link you have mentioned,and done all steps,i am able to detect the COM port next step is using IDE,
i m using eclipse IDE in that i am unable to debug the code,
i am starting the openocd then go to IDE and i press debug on eclipse
i am getting this respose on the command linementiond below:

Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
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 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
Info : esp32: Core 0 was reset (pwrstat=0x1F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400

i have set up the settings mentioned here:https://docs.espressif.com/projects/esp ... ml#eclipse

but i get the above menioned response on the command line.what might b going wrong in this..?

Regards
Atul

Who is online

Users browsing this forum: No registered users and 92 guests