Debugging nRF9160 Zephyr applications with Ozone

Originally published at: Debugging nRF9160 Zephyr applications with Ozone - Golioth

Ozone is a free graphical debugger for embedded firmware from SEGGER. It’s a powerful tool that can give you deep visibility into what’s happening in your embedded system. It’s especially useful when debugging nRF9160 Zephyr apps. Sorting out multiple threads and multi image builds can be tough, but this is the tool you want. In our previous post Taking the next step: Debugging with SEGGER Ozone and SystemView on Zephyr, Chris Gammell wrote about how to set up a SEGGER Ozone project to debug a Zephyr app running on the i.MX RT1060 Evaluation Kit. It’s a great general introduction to debugging a Zephyr app in Ozone and profiling the RTOS runtime behavior SystemView. When I was trying to set up a similar Ozone project for debugging the Nordic nRF9160 SIP, I ran into a few snags along the way. Today, I’ll share what I’ve learned! In this article, I’ll walk through how to: Configure a nRF9160 Zephyr app for thread-aware debugging Create an Ozone project for nRF9160 with the New Project Wizard Modify the Ozone project to support debugging nRF9160 multi-image builds Hardware Configuration In the examples that follow, I’ll be using the Nordic nRF9160 DK board. This development kit from Nordic has a SEGGER J-Link OB debugger built into the board, so an external J-Link debugger is not required to follow-along with the examples.   Thread-awareness support in Zephyr In a typical Zephyr app built using the Golioth Zephyr SDK, there will be multiple threads. For instance, one for the app’s main loop, one for the Golioth system client, and others for the UART shell, logging subsystem, network management, etc. SEGGER provides a Zephyr RTOS plugin for Ozone that…

1 Like