Step debugging SoftDevice and device OS code using Particle Workbench and custom device OS location

Long time Particle user. Just started using Particle Workbench. I’m trying to get a Particle Boron up and running in Particle Workbench with a Particle debugger connection.

I’m using DeviceOS_v3.1.0 and trying to use the Debugging 3rd Generation Hardware guide on the Particle website that uses TinkerBreak App.

I’m trying to use the debug interface to start stepping through the initialization code, however when the Boron halts on reset after being flash, the debug console shows Unknown Source beside the program counter, with Paused on Entry listed at the top.

Presumably, this means that I’m somewhere in the nordic SoftDevice section. Is that code not available to step-debug through?

Can I load the symbols/.lst file for the SoftDevice portion of memory and set a breakpoint in it?

Next question:

What is the best way to set a breakpoint on deviceOS initialization?

I think ultimately what I want to be able to do is to set a breakpoint in the device OS init function (first non-bootloader function called) so that I can step through the deviceOS init code and see why my user app is never getting called.

My theory on the best way to do this is:

  • Copy the version of DeviceOS I want to use for build into my project directory
  • Configure Custom Device OSLocation in the project settings (see screenshot)
  • Open 3.1.0\system\src\main.cpp and click next to app_setup_and_loop(void) to place a breakpoint at that location
  • hit ctrl-shift-p to bring up command pallette, run “Particle: clean application for debug (local)”
  • open “Run and Debug” tab of workbench
  • click on the green arrow
  • wait 15 minutes for debug version of device OS to be built locally
  • eventually once the OS finishes its build process,

When I tried this I found that after 15 minutes of waiting the debugger is still breaking on a source code file in the original particle deviceOS location (instead of the one that is included in my project directory and is configured as the `Customer DeviceOS Location

How do I change the Particle: compile application for debug (local) command to use the version of device OS configured as per Custom Device OSLocation settings?

If not this, then what is the recommended way of using custom device OS location during local debug/build process?

1 Like