Debuging in Eclipse

Hi …

I’m using Eclipse and want to debug with PIO but it did not work. When I want to start debugging I can see that a build is performed, that succeeds, then there is longer break where nothing happens then I get a error

Error in services launch sequence
Timed out trying to launch GDB.

Whats wrong here?!

My Eclipse Version:
IDE for C/C++ Developers
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
OS: Linux, v.4.4.0-119-generic, x86_64 / gtk 3.18.9

PIO Versions:
julian@DevVm64-04:~$ pio update
Updating tool-scons @ 2.20501.4 [Up-to-date]
Updating tool-unity @ 1.20403.0 [Up-to-date]
Updating contrib-pysite @ 0.2.0 [Up-to-date]
Updating contrib-piohome @ 0.9.5 [Up-to-date]
Updating tool-pioplus @ 1.1.7 [Up-to-date]

Platform Manager
Platform Atmel AVR
Updating atmelavr @ 1.8.1 [Up-to-date]
Updating toolchain-atmelavr @ 1.40902.0 [Up-to-date]

Platform Native
Updating native @ 1.1.1 [Up-to-date]

Platform ST STM32
Updating ststm32 @ 4.1.0 [Up-to-date]
Updating tool-stm32duino @ 1.0.0 [Up-to-date]
Updating framework-arduinoststm32 @ 2.1.180219 [Up-to-date]
Updating toolchain-gccarmnoneeabi @ 1.70201.0 [Up-to-date]
Updating tool-stlink @ 1.10400.0 [Up-to-date]
Updating tool-openocd @ 1.1000.4 [Up-to-date]
Updating framework-spl @ 1.10201.0 [Up-to-date]
Updating framework-stm32cube @ 1.1.0 [Up-to-date]
Updating framework-mbed @ 4.50707.0 [Up-to-date]

Library Manager
julian@DevVm64-04:~$ pio upgrade
You’re up-to-date!
PlatformIO 3.5.3a9 is currently the newest version available.

Could you share your platformio.ini?

As requested …
platform = ststm32
board = nucleo_f103rb
framework = stm32cube
lib_ldf_mode = deep+
build_flags = -Icfg -DUSE_FULL_LL_DRIVER
upload_protocol = jlink
debug_tool = jlink

Has someone a hint for me?

Does it work with VSCode? A professional collaborative platform for embedded development · PlatformIO

Well … in VS Code the debugger starts and I can do single steps but there are the following problems:

  • The debugger cant be stopped because it gets automatically restarted all the time
  • It seams not to be possible to add structs to the watch list to keep a eye on peripherals (e.g. GPIOA) and type casting does not help at all.
  • The watched values can’t be displayed as hex values … and it’s annoying to convert 4577864 to a hex mask with the calculator to figure out which bit has been set.
  • Atom performs better but can’t display hex values either …

I’m using Ubuntu 16.04LTS 64Bit, my system gets updated frequently, VS Code and Atom are up to date as well pio. Currently I’m working on a nucleo-F103RE and the stlink is re flashed as J-Link (also up to date).

When using the GnuArmEclipse plugin things are working as expected … pio would be more attractive to go with as it is a generic solution for all mcu’s i might to or have used so far.

Ping …

My trail expires in some days … any news on debugging with eclipse?
You sell this as supported … from my pint of view it isn’t and for now I see no reason to pay for a account :frowning:
But I would if this works … or if there is support to get it working.

Regarding the option to use VS Code … any progress or news here?

br J.

See Finally, PIO Unified Debugger comes to VSCode! - #3 by Brendan_Dower

Now, I don’t see any sense in Eclipse.

Well never the less you are still promoting the support. Anyway … I can’t try the update for VSCode anymore as my trail has expiered before it has been released.

Please re-login! I’ve just reset your trial. Thanks!

Long time no see :wink:

So finally I’m convinced … debugging in vscode works now at least for me pretty well. As Ice-T stated during a Body Count concert …

Their’s always room form improvement!

Can’t believe that I quote Ice-T in this context but he really said this … he was talking about Moshpit’s but imho that does not make that difference :slight_smile:

What I wold like to see is …

  • Some kind of highlighting when a peripheral register changes and it’s content. Eclipse does this whenever the debugs halt’s the target by showing the deltas compared to the last the the target was halted.

  • Being able to switch to a hexadecimal view for a given variable. As far I have got it right this is a common vscode issue which might be solved be a upcoming vscode release. So lets wait a while and see how this turns out.

  • pio has support for the native environment, but the new pio project wizard in vscode does not offer native as board although it would work. To test this out I have created such a native project and opened it in vscode. I was able to compile it but the executable cant be started in vscode or debugged. In the terminal it war working so I know thet the core is working well. If you ask yourself why this might be needed … Well, from time to time I want to try things out in the host while creating a new algorithm and do some tests with if by using much debug output and so on. In eclipse I have always created a native C project and was ready to go in seconds … once done I moved the code to my embedded project and sometimes deleted the test project right away. In fact thats not needed with pio as a new project for the embedded target is also ready very fast, but I wan’t to mention this point anyway … at least to report my finding :wink:

  • Surprisingly nothing more for now. :wink:

Actually I seriously thinking about leaving eclipse behind and use vscode from now on, and I think I will buy a enthusiast pio account as this what I am :smiley:

br J.