# Boron debugging using Jlink

**URL:** <https://community.particle.io/t/boron-debugging-using-jlink/48725>\
**Category:** Troubleshooting\
**Tags:** boron\
**Created:** [March 27, 2019, 4:26pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725 "2019-03-27T16:26:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 27, 2019, 4:26pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/1 "2019-03-27T16:26:11Z")

</div>

Hi,

Anyone tried debugging boron using jlink swd?

thanks in advance

kk

---

<div class="post-metadata">

**Author:** ![gusgonnet](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gusgonnet/32/27491_2.png) [@gusgonnet](https://community.particle.io/u/gusgonnet)\
**Post date:** [March 27, 2019, 5:30pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/2 "2019-03-27T17:30:57Z")

</div>

Hi there and welcome to the community!  
is it the [Particle debugger](https://store.particle.io/products/particle-debugger) you are talking about?

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 27, 2019, 6:18pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/3 "2019-03-27T18:18:01Z")

</div>

Yes, it should be possible to debug Boron applications using the Segger J-Link in SWD mode.

We only have official instructions for the Particle Debugger (CMSIS-DAP) but the debug build files generated by Particle Workbench or gcc-arm should work the J-Link either with OpenOCD or with Segger Studio. But it will require some effort as there are no instructions for doing so at this time.

---

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 28, 2019, 5:53am UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/4 "2019-03-28T05:53:48Z")

</div>

No, I am looking a way to debug the Boron using a J-link

---

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 28, 2019, 5:58am UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/5 "2019-03-28T05:58:23Z")

</div>

Thanks rick,

Yes, I was trying a way to build a debug configuration with VS code studio for debugging via jlink, I see a way doing from this post [https://electronut.in/vscode-nrf52-dev/](https://electronut.in/vscode-nrf52-dev/) but not yet seceded, I will keep posting if I have any break through.

regards  
KK

---

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 28, 2019, 11:06am UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/6 "2019-03-28T11:06:14Z")

</div>

I have added new debug configuration

 ![01](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/5/2/523d927263ad71b5eafea40a2afc1498b08c178c.png)

When I run the debug I get the following error “Failed to launch undefined GDB Server: Error: spawn JLinkGDBServerCL.exe ENOENT”  
 ![02](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/c/5/c59786bea428a3847c958fcf8a7771af8ee8103a.png)

Its clear the VC code is not able to get the path for JLINK GDB executables, but not sure how to feed it.

---

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 28, 2019, 12:33pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/7 "2019-03-28T12:33:57Z")

</div>

There is break through, I am able to attach attacheh the JLink debugger and load the binary, following settings are missing in workspace.json and launch.json files which enables to debug via jlink.

 ![03](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/7/9/791d360c5bfc9b8ab4b49ec6f7440b03ad6746af.png)

 ![04](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/e/c/ec9347775e1d0a857008225e00e18eb165026b6a.png)

But I still have issue in stepping through the code, after loading the binary I am struck at startup\_nrf52840.S.

 ![05](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/c/2/c246b4b1e1145640217260509ea3140fcbc7d75e.png)

[Reference] [https://marcelball.ca/projects/cortex-debug/cortex-debug-launch-configurations/](https://marcelball.ca/projects/cortex-debug/cortex-debug-launch-configurations/)

---

<div class="post-metadata">

**Author:** ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)\
**Post date:** [March 28, 2019, 2:41pm UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/8 "2019-03-28T14:41:02Z")

</div>

You need to add:

```auto
"rtos": "FreeRTOS"

```

to launch.json in order to be able to step into FreeRTOS code. I’m not positive that’s the failure you’re seeing, but it could be.

---

<div class="post-metadata">

**Author:** ![kk2mkk](https://avatars.discourse-cdn.com/v4/letter/k/b487fb/32.png) [@kk2mkk](https://community.particle.io/u/kk2mkk)\
**Post date:** [March 29, 2019, 9:19am UTC](https://community.particle.io/t/boron-debugging-using-jlink/48725/9 "2019-03-29T09:19:48Z")

</div>

After adding ‘rtos’, its not even hitting at startup\_nrf52840.S.
