Debugging Firmware on RAK3172

Hi all,

I’m currently trying to debug firmware on a RAK3172 module and would appreciate any advice on the process. I’ve tried several methods, but they haven’t been successful so far. I’m using Linux, but I can also run on Windows if needed. I have a custom PCB with the RAK3172.

My best progress so far has been using VSCode with the Arduino and Cortex-Debug plugins, along with an external ST-Link V2 debugger.

Here are the relevant links for the tools I’m using:

However, with this setup, breakpoints aren’t recognized during debugging. I can step through the code line-by-line, but the debugger stops working after a few steps.

It’s been difficult to find debugging solutions specifically for the RAK3172. While there are resources for other RAK products, I haven’t found much that works for the RAK3172.

On a side note, I’m working on firmware that intermittently crashes (with no clear pattern). I have a LED connected to SWCLK, and I’ve noticed that when the firmware crashes, the LED turns on with about half its brightness, similar to when the device enters boot mode for firmware uploads. I need to debug the firmware to determine what causes the crash and why the device enters this state.

Any suggestions or insights would be greatly appreciated!

Thank you!

Mario

Hi,

Considering that RAK3172 is based on STM32 and you use it with low level code as you don’t mention RUI, did you check that page at STM32 manufacturer ?

Vincèn

Hi @vincen!

Thank you for your reply! I need to use RUI3 (along with the Arduino framework), but I am unable to get it to work in the STM32 IDE.

Thank you!

Mario

I used this guide from our R&D team once. It worked with our RAKDAP1.
How to use RAKDAP1 to debug RUI3 app.pdf (568.4 KB)

2 Likes

Another option, if you have a JLink, is the Ozone debugger

1 Like