Debugging Tools Environment Configuration Guide

This section describes how to download and configure the debugging tools.

1 Trace32

1.1 Trace32 Download and Configuration

1.1.1 Download Trace32

You can download it directly from the Lauterbach official website, as shown below. Select the ARM version simarm.zip. The free version has limitations on online debugging and script length. SiFli’s full MCU series currently only uses the offline debugging functionality.

alt text

Lauterbach offline debugging tool download link: Simulator for ARM/CORTEX/XSCALE simarm.zip

1.1.2 Configuration

Extract the downloaded archive to the SiFli-SDK\tools\crash_dump_analyser\ directory, then copy the contents of the patch folder in this directory into the extracted simarm directory, as shown below:

alt text

1.1.3 Running Trace32

This software requires no installation. Double-click the t32marm.exe executable in the simarm directory to open Trace32.

2 Ozone

2.1 Ozone Download and Configuration

2.1.1 Download Ozone

You can download it directly from the SEGGER official website. For Windows systems, select the Windows version.

alt text

SEGGER online debugging tool download link: Ozone - The J-Link Debugger Windows 64-bit Installer

Note: Ozone and J-Link versions above V7.6 will check for counterfeit J-Link debuggers. For learning purposes, you can use Ozone_Windows_V320d_x64.exe and JLink_Windows_V758a_x86_64.exe.

2.1.2 Configure Device, MCU Peripheral Registers, and RT-Thread OS Script

A. Replace the Ozone configuration file C:\Users\yourname\AppData\Roaming\SEGGER\JLinkDevices\JLinkDevices.xml with SiFli-SDK\tools\flash\jlink_drv\JLinkDevices.xml. Additionally, create a SiFli directory under C:\Users\yourname\AppData\Roaming\SEGGER\JLinkDevices\Devices\, and copy all contents from the subdirectories of SiFli-SDK-i\tools\flash\jlink_drv into the created SiFli folder. The corresponding directories and files are as follows:

alt text

The J-Link flash driver correspondence can be found in the JLinkDevices.xml file:

<Device>
    <ChipInfo Vendor="SiFli" Name="SF32LB52X_NOR" Core="JLINK_CORE_CORTEX_M33" WorkRAMAddr="0x20000000" WorkRAMSize="0x60000" />
    <FlashBankInfo Name="Internal Flash1" BaseAddr="0x10000000" MaxSize="0x8000000"  Loader="Devices/SiFli/SF32LB52X_INT_FLASH1.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
    <FlashBankInfo Name="External Flash2" BaseAddr="0x12000000" MaxSize="0x8000000" Loader="Devices/SiFli/SF32LB52X_EXT_FLASH2.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>

B. Copy all contents from the subdirectories of SiFli-SDK\tools\svd_external to C:\Program Files\SEGGER\Ozone\Config\Peripherals.

C. Copy SiFli-SDK\tools\segger\RtThreadOSPlugin.js to C:\Program Files\SEGGER\Ozone\Plugins\OS\. The corresponding directories and files are as follows:

alt text

After configuring items A/B/C, open Ozone and you will be able to select the desired Devices and MCU peripheral registers:

alt text

After configuring the MCU peripheral registers and RT-Thread OS script, enter the Ozone interface to view the corresponding MCU peripheral registers and OS threads:

alt text