ESP32 - Debugging using Eclipse [solved]

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby CalinB » Wed Aug 21, 2019 5:58 pm

The gdb response looks OK.
There must be something wrong on eclipse debug settings...
On step 6 from eclipse debug instructions, click "Browse" and select the xtensa-esp32-elf-gdb.exe on your PC

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby Atul_90 » Wed Aug 21, 2019 8:35 pm

CalinB wrote:
Wed Aug 21, 2019 5:58 pm
The gdb response looks OK.
There must be something wrong on eclipse debug settings...
On step 6 from eclipse debug instructions, click "Browse" and select the xtensa-esp32-elf-gdb.exe on your PC
Hi CalinB,

i have seleced the xtensa-esp32-elf-gdb.exe file in step 6 now when i debug on eclipse i have 2 breakpoints one in app_main() and another in the task its not stopping anywhere.

this was the response on command line when i started debugging on eclipse
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
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 : 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 : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
Info : Target halted. PRO_CPU: PC=0x400067E7 (active) APP_CPU: PC=0x400076DD
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400076DD
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 116 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 104 KB
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400076DD
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400076DD
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 116 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 104 KB
Info : Using flash size 108 KB
Info : Target halted. PRO_CPU: PC=0x400916EE (active) APP_CPU: PC=0x400076DD
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 116 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 104 KB
Info : Using flash size 120 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)
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 attached the eclipse status when debug is enabled,i am not able to see the variable in watch nor breakpoints are wroking.
so i am nor getting whether the program is starting a debug or not.

please help me in this issue,i am unable to debug the code using eclipse and wrover kit.

Regards
Atul
Attachments
eclipse-status.png
eclipse-status.png (84.51 KiB) Viewed 6265 times

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby CalinB » Fri Aug 23, 2019 9:20 am

That may be caused by some wrong environment variables or environment paths setup on Eclipse.

I was using Eclipse for build/debug software on ESP32 some time ago and i found it very hard and time consuming to set up a esp32 project on Eclipse.
Moving the project to a different PC is a headache too with eclipse because will have to go trough the setup process all over again on the new PC.
This were the main reasons why i droped eclipse and i moved to VsCode for build/debug ESP32 projects.
That's why i made the Esp32 VsCode project template and instructions i mentioned before on this thread.

I advice you to do the same. Move from Eclipse to VsCode or some other IDE and start coding instead spending time on setting up the IDE environment.
Eclipse is a good IDE for sw development but it just don't suit well for ESP32.

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby Atul_90 » Fri Aug 23, 2019 8:51 pm

CalinB wrote:
Fri Aug 23, 2019 9:20 am
That may be caused by some wrong environment variables or environment paths setup on Eclipse.

I was using Eclipse for build/debug software on ESP32 some time ago and i found it very hard and time consuming to set up a esp32 project on Eclipse.
Moving the project to a different PC is a headache too with eclipse because will have to go trough the setup process all over again on the new PC.
This were the main reasons why i droped eclipse and i moved to VsCode for build/debug ESP32 projects.
That's why i made the Esp32 VsCode project template and instructions i mentioned before on this thread.

I advice you to do the same. Move from Eclipse to VsCode or some other IDE and start coding instead spending time on setting up the IDE environment.
Eclipse is a good IDE for sw development but it just don't use it well for ESP32.
Hi Calin,

thanks for the suggestion..!!but eclipse is the requiement for me so have to go ahead wih this itself.

ok one last time i will trouble you sorry for that.

when i am pressing debug after setting all the variables and link on the command line i get some process status
in that it shows one error see the screenshot attached it is marked in red box, here it says program_esp32 faild couldnot find the path but that path is some jumbled without slash(/) and at the end its "hello_worluild" in this" hello_world" and "build" is mixed from where it taked this path or what might be the issue in this ? whereas the actual path
which contains bin file is : C:\msys32\home\ATUL\esp\esp-idf\examples\get-started\hello_world\build

and in step 8 of jtagImage debug says to add the path of bin file so i have added it as:mon program_esp32 ${workspace_loc:/hello_world/build/hello-world.bin}

my build directory location is :${workspace_loc:/hello_world}/
for rest environment variables i have attached its screenshot.

something is going wrong somwhere and i am unable to figure it out .. :(

Can you get in this whats going wrong ..!!

Regards
Atul
Attachments
env_variables.png
env_variables.png (69.87 KiB) Viewed 6221 times
commad_line_response_and_eclipse debug_responce.png
commad_line_response_and_eclipse debug_responce.png (139.74 KiB) Viewed 6227 times

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby CalinB » Sat Aug 24, 2019 8:36 am

Change the "/" to "\" on IDF_PATH variable on your settings.
I just made a new setup on eclipse to check...
I used https://dl.espressif.com/dl/esp-idf-tools-setup-1.2.exe to install the openocd.
The setup work OK...ish...
Here is my setup:

1.jpg
1.jpg (129.62 KiB) Viewed 6205 times
2.jpg
2.jpg (137.17 KiB) Viewed 6205 times
3.jpg
3.jpg (278.59 KiB) Viewed 6205 times

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

Re: ESP32 - Debugging using Eclipse [solved]

Postby Atul_90 » Sat Aug 24, 2019 8:23 pm

CalinB wrote:
Sat Aug 24, 2019 8:36 am
Change the "/" to "\" on IDF_PATH variable on your settings.
I just made a new setup on eclipse to check...
I used https://dl.espressif.com/dl/esp-idf-tools-setup-1.2.exe to install the openocd.
The setup work OK...ish...
Here is my setup:


1.jpg
2.jpg
3.jpg
Hi Calin,

thanks for the kind support,actually esp-idf-tool-installer doesent work on my system may be because it supports 64 bit processor mine is 32bit i will still try do replicate what yoy did.

Rgards
Atul

Who is online

Users browsing this forum: Bing [Bot] and 260 guests