Debugging in Eclipse

rsimpsonbusa
Posts: 124
Joined: Tue May 17, 2016 8:12 pm

Debugging in Eclipse

Postby rsimpsonbusa » Tue Apr 25, 2017 12:04 am

Hi guys.

I am still struggling to have Eclipse work with the esp32 and openocd / gdb at least in OSX.

Setup:
OSX 10.11.6
OpenOcd from EspressIf
JTAG is a Flyswatter2
App to debug: Blinky

History: OpenOcd and xtensa gdb work directly as in a previous post (viewtopic.php?f=2&t=1720)

So far I been able to do the process "manually", meaning, one terminal has openocd and another the xtensa gdb.
Openocd starts Ok, then xtensa gdb starts Ok. Need to do a continue and the blink app blinks. Then I can stop it, set breakpoints, check variables, stack, etc.

Interfacing via Eclipse simply wont work.

It calls the same OpenOcd and xtensa gdb, but will not debug (openOcd is running and also xtensa-gdb). App is not running and there is no Resume button. If I Suspend it lists all the threads an the stops at the first thread, WHICH I HAVE NO IDEA what it is, but a simple j 0x40000xxxxx.

Matthias at https://www.matthias-jentsch.de/2017/02 ... d-openocd/ seems to have done it (Ubuntu) but since this is OSX. He sent some instruction regarding configuration of debugging but they were the same as mine.

If I force the Set the Program Counter at hex it goes to the app_main but it will not continue or advance the program counter and hence, no blinking.

Really weird.

Anybody?

Regards.

tedwood
Posts: 11
Joined: Thu Mar 16, 2017 2:02 pm

Re: Debugging in Eclipse

Postby tedwood » Tue Apr 25, 2017 2:29 pm

We couldn't get this to work using a pipe between OpenOCD and GDB.

The technique described here works for us on OSX - it uses the ARM OpenOCD Debugger plugin.

https://www.matthias-jentsch.de/2017/02 ... d-openocd/

rsimpsonbusa
Posts: 124
Joined: Tue May 17, 2016 8:12 pm

Re: Debugging in Eclipse

Postby rsimpsonbusa » Thu Apr 27, 2017 9:57 pm

Thanks did read it before and tried it. No joy :(

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: Debugging in Eclipse

Postby f.h-f.s. » Fri Apr 28, 2017 2:16 pm

the 0x4000xxxx points to a instruction/function you can dump the elf and see where it is pointing(xtensa-esp32-elf-objdump -x project.elf) or with flags -D -S if you want to see all assembly instructions.

When you run openocd & gdb with eclipse what output do you get?
Which arguments are given to openocd & gdb when started from eclipse.

I've got building with vscode in linux and windows running. Debugging too on linux. In windows vscode you can get it to work with msys2.
Way better than eclipse imo.
https://github.com/FHFS/esp-idf-VSCode-template.git

Who is online

Users browsing this forum: No registered users and 54 guests