PIO Unified Debugger

Opss… I see that PIO will not install openOCD if you board is based BOSSAC. If we add “debugging” support directly to board, you will not have this issue.

Try to change in your config board = zero and press “Upload” button (also, don’t connect any boards). PIO will download OpenOCD for you.

Cool

Different error now:

Error: .pioinit:1: Error in sourced command file: Remote communication error. Target disconnected.: No error.

Please check PM here

We’ve just released new PIO Core+ v0.8.12 which improves debugging support for the MCUs that have locked flash (Freescale Kinetis, NXP LPC boards ). Could you test development version of NXP LPC?

  • pio update
  • pio platform uninstall nxplpc
  • pio platform install https://github.com/platformio/platform-nxplpc.git

Now, just use generic ARM mbed project and press “Debug” button.

Does it work?

I found following problem with mbed LPC1768:
When starting the debugger I get the message STARTING, after a while (~7s) i get the message EXITED and after another period (~13s) the debugger is in RUNNING mode. So I need to pause the debugger to set my breakpoints. But then it works.
So, after EXITING the debugger shouldn’t run immediately.

Sorry, after updating the nxplpc package it works, but a little slow. I’m using a very simple blinky with a counter and one variable watch, it need 5s per cycle. But yeah it works :grinning:

This is not a problem of PIO Core or even GDB. This issue is linked with on-board CMSIS-DAP interface. I have a few other boards based on CMSIS-DAP and they work very fast. Would be good if you contact with ARM mbed engineer and ask why this board is slow for debugging. Maybe, they will propose new bootloader/firmware.

P.S: Thanks a lot for the feedback. I’ll release NXP LPC development platform with a new mbed v5.4.5.

Any ideas on what it would take to get the debugger working with a Teensy 3.2? This board uses an external CPU to do an image upload via USB, not sure if additional pins for SWD are brought out, or if they can be used at all while the USB upload circuitry is in place.

See

It seems that Teensy 3.5/3.6 has debug pins.

1 Like

I am working with the LPCxpresso1549 (lpc1549)

It has the same debugger built into it as the other Xpresso boards.

Please consider for support and/or point me in direction of how I can help.

Thank you!

Please file a feature request here and we will explain how to enable debugging for LPCxpresso1549.

Thanks!

Is it possible to incude support for the Sodaq ExploRer board? It uses a SAMD21 microcontroller from Microchip.
I’m developing with it and I’m really missing having a debugger. I use platformio with the Atom text editor

Thanks!!

How are you going to debug this board? It does not have soldered SWD connector, not saying about debugging USB port via CMSIS-DAP.

You are correcct, there is an SWD chip but no pins soldered onto the board. The schematics show the TC2030-IDC-NL unit. According to the Sodaq documentation the board can be debugged using the MCU Reset, SWCLK, SWDIO pins on this unit. However, without solderable connectors it will be difficult to connect to debug it.

I may acquire a Sodaq ONE instead, as this has sodlered SWD pins which can be connected via a Segger J-Link EDU module.

Where did you find it? Could you point me?

Yes I can. Here is the source for where I found that it can be done on a Sodaq ONE: SODAQ ONE Debugging Possibilities - ONE - SODAQ Forum

You can also see proof of this in the PIN definitions on the Sodaq documentation as well:


I received one of these boards today. I still need to get a Segger J-Link EDU module though. Hopefully Platformio supports debugging on it.


Also, here is is a screenshot of the Sodaq ExpLoRer, showing the SWD (unsoldered).


The full schematic can be found at:
http://support.sodaq.com/wp-content/uploads/2016/11/Explorer_schematic_rev5b.pdf It would be good to find some way to connect this up to the Segger J-Link EDU module as well.

Done!

Could you try development version?

  1. Install PlatformIO IDE, we recommend for VSCode.
  2. Open PIO Home and navigate to Platforms > Installed
  3. Uninstall current “Atmel SAM”
  4. On the same page (PIO Home > Platforms > Installed), click on “Advanced Installation”
  5. Install https://github.com/platformio/platform-atmelsam.git
  6. Install JLink GDB Server and add it to environment PATH
  7. Open system terminal and check JLinkGDBServerCL.exe --version or JLinkGDBServer --version (depending on OS).
  8. If JLink Server is correctly installed, start debugging with PIO.

Does it work?

1 Like

Hey there! I just joined a course requiring us to work with an ATMega16. I would really like to use this debugging tool, but it doesn’t seem like there is support for this specific model. :slight_smile: It is listed as “mightycore16” as the board name.

Sorry for not linking anything, but I am not sure which link you want?

I would like to request support for it. Thanks in advance :slight_smile:

Please follow us on https://twitter.com/PlatformIO_Org for the news. We have AVR in our TODO list.

1 Like

How do I remove the debugger ?
I am trying to get a clean, minimum version that has nothing that will disappear in 30 days. currently the software is reporting 23 days to failure.

I have loaded a few sketches, and spend a few minutes a day seeing how this program works (very little success) and I cannot devote any time to a program that will automatically fail in 30 days without renewal