This document holds information about how S32 Design Studio and S32Debugger probe or PE Micro Debug probe can be used to debug applications running on NXP’s S32 family processors from the operating system perspective using OSEK Kernel awareness.
Abbreviation |
Description |
OSEK |
Open Systems and their Interfaces for Automotive Electronics is a standard developed in the automotive industry to define a common architecture for embedded Real-Time Operating Systems (RTOS). |
NXP RTOS |
NXP Real Time Operating System compliant with OSEK specification |
ORTI |
OSEK Run Time Interface. ORTI file is generated based on NXP RTOS configuration |
*.ort / *.orti |
OSEK system builder ORTI file extension |
MSI |
Microsoft Software Installer |
OSEK Kernel awareness within S32 Design Studio allows you to debug your application from the operating system perspective.
ORTI is a specification that enables OS awareness for external debuggers (e.g NXP S32 Debugger, Lauterbach T32, PEmicro's debug probe).
Most OSEK system builders are able to extract all necessary information of the OS component into a text file, called “ORTI file”.
The basic workflow for setting up and managing OSEK OS Awareness projects in S32 Design Studio remains consistent across both single-core and multi-core projects, irrespective of the debug probe used. The focus will be on the universal steps that are described in single-core projects case. For OSEK OS Awareness multi-core projects and for projects utilizing PE Micro debug probes, only the specific considerations will be highlighted.
OSEK OS Awareness support in S32 Design Studio is available for:
OSEK OS Awareness support is available only on Windows.
Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a single-core example project for S32R418AA Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.
!Note: For this example project, NXP RTOS SysGen requires Java Runtime Environment OpenJDK-JRE 11.0.11 installed on your computer. The OpenJDK-JRE can be downloaded from the following URL (please search with exact keyword "jre-11.0.11-x64 MSI" or “jdk-11.0.11-x64 MSI” for correct version): https://developers.redhat.com/products/openjdk/download
Using the installer (MSI) is recommended because it creates the
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK registry entry.
JAVA_HOME environment variable must be set to point to location of Java Runtime Environment.
For example: JAVA_HOME=C:\Program Files\RedHat\java-11-openjdk-jre-11.0.11-1 (Please choose correct path for your machine).
Error or unexpected behavior may occur if the version of Java is different than 11.0.11 when NXP RTOS SysGen is executed (steps that are described Chapter III – “Generating Configuration”).
If Java version is not found in the HKEY_LOCAL_MACHINE (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft) a warning is reported.
Before running the example, a configuration needs to be generated. First, go to Project Explorer View in S32 Design Studio and select the current project.
Right click and select the "S32 Configuration Tool" menu then click "Open Peripherals".
Click on the "Update Code" button.
Click on Select directory under "Generate" field to select the directory which contains example project (E.g.: D:\WorkspaceS32DS\RTOS_example_S32R418AA_SC1_M7) then click on Generate Configuration.
Click "Update Code" again.
Select the project in the S32 Design Studio Workspace and click on Build. Clicking this button will start the build using the preset build type.
Click on Debug Configurations
Setup the Debug Probe Connection for the project. Select either USB or Ethernet, depending upon your hardware setup. If USB is selected, the COM port for the S32 Debug Probe will automatically be detected (unless not connected or more than one probe is connected). If Ethernet is selected, then enter either the hostname (fsl + last 6 digits of MAC address) or IP address. See
‘S32_Debug_Probe_User_Guide.pdf’
({S32DS_installation_directory}/S32DS/tools/S32Debugger/Debugger/Docs/S32_Debug_Probe_User_Guid e.pdf) for more details on the setup of the S32 Debug Probe.
From the OS Awareness tab select “OSEK” from the OS dropdown list. Browse and select from local system or Workspace the required *.ort file Click the Debug button.
Navigate to go to Window -> Show View -> Other… and select the OS Details Browser view
Using the OS Details Browser view, Design Studio can display information about the tasks status on the target.
In the “Tasks” tab from the OS Details Browser view you can see information about the operating system (the number of tasks, current task states, system objects):
Switch to the “Implementation” tab to see more detailed information gathered from the .ort file:
Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a multi-core example project for S32Z270 Cortex-R52 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.
Environment OpenJDK-JRE 1.8 installed on your computer. The OpenJDK-JRE can be downloaded from the following URL (please search with exact keyword "jdk-8u372-x86 MSI" for correct version): https://developers.redhat.com/products/openjdk/download - Using the JDK 1.8 installer (MSI) is recommended.
Boards: S32Z27X-DC PCB 50588 RevA1 SCH RevB (DC2)
Silicon chip: P32Z270ADCK0MJFT P65C ATTJ2151A (E2). (21x21, 594 BGA) Debug Probe: S32 Debug Probe
Boards: S32Z270-DC PCB 50912 RevA SCH RevA (DC1)
Silicon chip: S32Z270ADCK0MJET (17x17, 400 BGA)
Debug Probe: S32 Debug Probe
Go to File -> New -> S32DS Project From Example and select one of the existing multi-core S32 Design Studio Sample applications delivered with the NXP RTOS or import your own S32 Design Studio project.
The steps for generating configuration must be performed for all projects:
RTOS_example_S32Z270_SC1_multi_instance_R52_0_0,
RTOS_example_S32Z270_SC1_multi_instance_R52_0_1,
RTOS_example_S32Z270_SC1_multi_instance_R52_0_2, RTOS_example_S32Z270_SC1_multi_instance_R52_0_3.
Before running, you must build all projects: RTOS_example_S32Z270_SC1_multi_instance_R52_0_0,
RTOS_example_S32Z270_SC1_multi_instance_R52_0_1,
RTOS_example_S32Z270_SC1_multi_instance_R52_0_2, RTOS_example_S32Z270_SC1_multi_instance_R52_0_3.
Click on Debug Configurations.
Click the initial core under S32 Debugger in Debug configurations menu. Setup the Debug Probe Connection.
Loading the ORTI file must be done for all the project configurations:
From the Debug Configuration menu, click on Launch Group for S32 Debugger. Check all the cores that you want to debug. Click the Debug button.
Compared with single core projects, when debugging multi core projects you can switch between the debugging sessions and information from all debugged cores
The information displayed in Implementation tab is the same as in single-core projects case, but you can switch between the debugged cores
Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a single-core example project for S32K396 Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.
SW32K396 RTOS version 0.9.0 BETA
Mini-module: XS32K396-BGA-DC PCB 54614 RevX1 SCH RevA
Silicon: Chip P32K396EHMJBS OP40E QAD2222F
Select the desired project from the list of examples delivered with PE Micro Debug probe support or import your own S32 Design Studio project and click finish For this How To Guide, RTOS_example_S32K396_SC1_M7_0_0 was used
Select the project in the S32 Design Studio Workspace and click on Build.
Click on Debug Configurations.
Select the debug configuration associated with your current build configuration and click on the “PEmicro Debugger” tab. Verify proper interface and port and if the device is properly detected.
From the OS Awareness tab select “OSEK” from the OS dropdown list. Browse and select from local system or Workspace the required *.ort file Click the Debug button.
Go to Window -> Show View -> Other… and select the OS Details Browser view
In the “Tasks” tab from the OS Details Browser view you can see information about the operating system (the number of tasks, current task states, system objects):
“Implementation” tab displays more detailed information gathered from the .ort file:
Revision history:
Revision no. |
Revision date |
Description |
01 |
Nov 2023 |
Created document about how to use OSEK OS Awareness in S32 Design Studio on single and multi core projects with PE Micro and S32 Debug probes |