Almost all of Silicon Labs Starter/Development Kits include an onboard J-Link debugger, which is great to not only debug and flash your embedded application, but also to run SystemView.
SystemView as you probably know is the tool to record and analyze your Micrium OS Kernel events in real time.
However, the onboard J-Link can be slow depending on the rate of kernel events that your embedded application is creating. Overflow events occur when the SystemView buffer on your embedded target is full.
In this blog I'm gonna discuss the basic steps to prevent overflows and then I will describe the ultimate way to prevent overflows.
1. Increase the buffer size to store the events:
Open the configuration file SEGGER_SYSVIEW_Conf.h and set the buffer size to 4096 as shown below:
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 4096
2. In case you are running Simplicity Studio, close Simplicity Studio and let SystemView run by itself.
3. In case you are running Probe, close Probe and let SystemView run by itself.
4. Open the configuration file os_cfg_trace.h and decrease the number of events by disabling the following features:
#define OS_CFG_TRACE_API_ENTER_EN DEF_DISABLED #define OS_CFG_TRACE_API_EXIT_EN DEF_DISABLED
5. If you are still having overflows after making the changes above, then the ultimate way to prevent overflows is to buy a much faster External J-Link from SEGGER: https://www.segger.com/products/debug-probes/j-link/
Most of our Starter Kits have a Debug Connector that you can use to connect the external J-Link.
The following section describes how to connect your external J-Link to a Silicon Labs Starter Kit.
1. First you need to configure your Starter Kit to reroute the debugging circuitry to the external debug connector.
Open Simplicity Studio, select your Starter Kit, locate the section Debug Mode: MCU and then press the link Change as shown in the image below:
2. You may be asked to download an adapter firmware image. If so, press the button Yes.
3. The default Debug Mode is called MCU which means that your debugger is the Onboard J-Link.
4. Select from the drop-down the option IN which means that your debugger is an External J-Link as shown in the image below:
5. Connect your external J-Link to the debug connector on your Silicon Labs Starter Kit.
Depending on your kit, it may be one of the ones shown below.
The J-Link 19-pin 0.05" Cortex-M Debug Connector shown in Figure 3 may require a J-Link 19-pin Cortex-M Adapter available from SEGGER.
On the other hand, the standard 20-pin 0.1" JTAG Debug Connector shown in Figure 4 does not require any adapters and can be connected directly to your external J-Link.
For more information on how to configure your Starter Kit in the appropriate debugging mode, please consult your Starter Kit's User's Guide, the section On-Board Debugger, Debug Modes.
SystemView Installer: https://www.segger.com/downloads/free-utilities/#SystemView
SystemView User's Manual: https://www.segger.com/downloads/free-utilities/#Manuals
J-Link Debug Probes: https://www.segger.com/products/debug-probes/j-link/
J-Link 19-pin Cortex-M Adapter: https://www.segger.com/products/debug-probes/j-link/accessories/adapters/19-pin-cortex-m-adapter/