Debug Particle Argon with Segger Embedded Studio

Particle Argon is build on NRF52840 chip. So ideally the Nordic recommended SES IDE should be able to use for Argon too.

You can see the guide for getting it here.

There were many articles and guide that will tells you how to connect Particle Argon using vscode/particle workbench. There are also many articles of showing how to use Segger Embedded studio for Nordic NRF52 development. but i did not find any article describing step by step procedure to debug Particle Argon using Particle debugger in SES.

What you need for this tutorial.

  1. Particle Argon kit – get it from here
  2. Particle Debugger – get it from here
  3. Nordic recommenced SES – get it from here [For nordic NRF52 chip you can find the free license from the same link]
  4. Particle workbench – get it from here [You need this for getting the openocd Configurations used by particle]

Software Installations.

  1. First Install Particle workbench. The installer will install all the necessary toolchains too.
  2. Install the SES and register the license.

Configure SES to use particle debugger.

  1. First Open SES and create a Sample project. [Menu>File>New Project]
  2. Follow the images to setup and configure.

Now right click on the project and go to options.

Put the GDB server Command Line as follows:

/Users/sam/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/bin/openocd -f /Users/sam/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/share/openocd/scripts/interface/cmsis-dap.cfg -f /Users/sam/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/share/openocd/scripts/target/nrf52-particle.cfg -c "adapter_khz 1000" -c "transport select swd"

NOTE : For me the particle installed the openocd tool chain in the directory “/Users/sam/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0”. For you it may be different. Please check it once if your particle installed the toolchains in this directory or not and use the directory appropriately.

 

Special Note : You can actually download the openocd directly from web and use it directly if you want to use the latest version of openocd. Keep in mind that the nrf52-particle.cfg is not available in the openocd direct download and in that case you can just copy this file from particle open repro or get it from the particle workbench paths.

 

For Windows i have tried to use the directly openocd from openocd.org and it worked with the SES with following GDB command line option.

/Users/sam/Downloads/xPacks/openocd/0.10.0-13/bin/openocd -f interface/cmsis-dap.cfg -f target/nrf52-particle.cfg

Please feel free to leave any comments or questions.

Leave a Reply