Particle workbench debugging

So tell me how is a person supposed to debug these devices and their firmware without a debugger?

Notice the big red flag ‘END OF LIFE’

You can use most CMSIS-DAP debuggers. This tutorial shows how to use the NanoDAP. The kind that also support USB drive mode are the most compatible with the Particle Debugger.

1 Like

So to be clear…I cannot do any debugging via the USB connection and Workbench. Is this correct?
I guess what I am really asking is the Particle Argon processor being used does not have a debugger built into it that can be reached via the USB?

Correct. You need an external JTAG/SWD debugger for all Particle devices, both Gen 2 (STM32) and Gen 3 (nRF52). No Particle devices are able to run gdb over the MCU USB connection, mainly because both MCUs really halt the entire CPU for debugging, which would also halt an integrated debugger.

2 Likes

Is there some US link for this debugger or one similar that you know would work? (ie Digikey, Mouser)
The only link I see for the one you mentioned is aliExpress…

Sorry for the confusion…I am new to Particle and it is way different than MSP430 (USB-FETFlash) or STM32(STLINK-V3)

For instance…You said nRF52…would this work?

Wrong debugger…My bad…that shows STM32 /STM8

Yes, that Seeed debugger emulates a ST-LINK/V2 debugger. It should work with Gen 2 devices (STM32, Photon, P1, Electron, E Series) for both code flashing and debugging.

It will not work with Gen 3 devices (nRF52, Argon, Boron, B Series, Tracker).

So what will work with Gen 3? I do a search on your nanoDAP part you recommend and even aliExpress shows it is no longer available?

I am confused as to how ppl debug their code using your hardware if no debuggers are available to purchase?

I am coming from the STM32 / MSP430 world where there are many hardware interrupts going on and you need to step through your code to understand where the issues are.

Just look for any CMSIS-DAP debugger with support for OpenOCD and nRF52.

For example, this one. I haven’t tested this specific one, because as you noticed they come and go all the time. However the specs are correct and if you look at the pinout of the debug connector it’s the same as the NanoDAP so it will probably work.

In reality, few people actually use a source level debugger for Particle development. It’s a pain to set up and use, and the low-level stuff is handled by Device OS. Most of the bugs you will encounter will be garden-variety application-level C++ bugs that can be debugged using serial print commands.

Also beware that code that uses BLE cannot be debugged on nRF52. The reason is that the Bluetooth radio stack actually runs in software (nRF52 soft device). When the debugger halts the MCU, it also stops the radio from working, and basically every falls apart from there.

1 Like

If you are still looking for a Particle Debugger, Mouser currently have some in stock.