4 Ozone

4.1 Ozone debugConnection failed,

prompt:
alt text

You need to add the flash driver and XML configuration file as with JLink, so that Ozone supports the SF32LB55X chip;.

C:\Program Files\SEGGER\Ozone\Devices\SiFli\SF32LB55X****.elf
C:\Program Files\SEGGER\Ozone\JLinkDevices.xml

4.2 How to single-step debug Lcpu with Ozone or Keil

1, The default connect of JLink will connect to HCPU, allowing direct debugging of HCPU. To debug LCPU, execute SDK\tools\segger\jlink_lcpu_a0.bat in the Windows CMD command window;, Executing this batch process actually executes a few commands inside \tools\segger\jlink_lcpu_a0.jlink;:

w4 0x4004f000 1
connect
w4 0x40070000 0 
exit

You can also directly enter these two commands sequentially in the JLink window to switch to LCPU;.
alt text

2, Now, using Ozone as an example, demonstrate single-step running of LCPU by first creating a new project;
alt text

3, Select debug chip, If not found,Need to be in C:\Program Files\SEGGER\Ozone\JLinkDevices.xml Add 55x chip model configuration 和C:\Program Files\SEGGER\Ozone\Devices\SiFli\SF32LB55X_*****.elf 四个flash烧录文件
alt text

4, Select the JLink device connected to the PC. If not found, check the JLink connection and JLink power supply;
5, Select the one you compiledlcpu的
.axf文件,如果是watch_demo工程,路径会在

\release\example\rom_bin\lcpu_general_ble_img\lcpu_general_551.axf

alt text

6,Choose the Do no set option for the next step, then finish;
alt text

7, Attach并且halt Program 就是让jlink连接到lcpu,并停在当前运行的PC指针, Attch并且Running Program就是让jlink连接到lcpu,并且开始从当前PC继续运行程序,
alt text

8,After clicking the run program arrow icon, you can see that LCPU can already run in single steps, and breakpoints can be added to view stack information and register status;.
alt text

4.3 OzoneConnection lost issue occurred

Often, after being connected for a while, the following Target Connection Lost dialog box appears, and then the connection is lost;
alt text

If you encounter the above problem, please change the version of Ozone to Ozone_Windows_V320d_x64.zip, which has been tested to be very stable;。

4.4 Ozone enables RTThread RTOS online debugging

Copy the \sdk\tools\segger\RtThreadOSPlugin.js file to the installation directory of Ozone;:
C:\Program Files\SEGGER\Ozone\Plugins\OS\RtThreadOSPlugin.js
And open this file, follow the steps below, you can use Ozone to switch RTThread threads online for viewing and debugging;。
alt text

After Ozone is connected, and Project.SetOSPlugin(“RtThreadOSPlugin”); is enabled, the scene is as follows;:
alt text

4.5 OzoneRedefine file path

When the path of the burned bin is not locally compiled, debugging with Ozone will prompt File not find, unable to locate the corresponding C source code, thus unable to perform line-by-line tracking to locate the issue;。
alt text

解决方法:
鼠标右键该文件,Locate File到对应文件,就能定位到该c源文件,也可以采用 Project.AddPathSubstitute命令重定位路径,实际是需要参考Qzone的手册