HOWTO Use OSEK OS Awareness with S32Debugger and PEMicro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HOWTO Use OSEK OS Awareness with S32Debugger and PEMicro

HOWTO Use OSEK OS Awareness with S32Debugger and PEMicro

Purpose

 

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.

 

Abbreviations

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

 

Background

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”.

  1. NXP RTOS generates an *.ort file based on the user configuration.
  2. Debuggers can load this ORTI file to add support for the operating system.
  3. S32Design Studio can load such an ORTI file and adds some special views that will allow the user to inspect the configured OS objects: Tasks, Alarms, Counters, Scheduletable.

 

Document structure

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.

 

             

Hardware Support

OSEK OS Awareness support in S32 Design Studio is available for:

  • S32G27x, S32G39x
  • S32E/Z 
  • S32K396
  • S32R41
  • SAF85xx

 

OS Support

OSEK OS Awareness support is available only on Windows.

 

How to use OSEK OS Awareness with S32 Design Studio and S32Debugger probe

 

Single core projects

 

Prerequisites

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.

 

Software environment

  • S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace
  • S32R41 Development Package
  • S32R41 Real-Time Drivers Version 1.0.0
  • SW32R41 RTOS 4.7.0 version 0.9.0 BETA

 

!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. 

 

Hardware environment

  • Silicon: - Chip P/S32R418AAU(K1)MUFT (rev 1.1)
  • Board: - X-S32R41-EVB PCB 48194 RevD SCH RevD
  • Debug Probe: S32 Debug Probe

 

 

 

Project setup

  • While in Design Studio, go to File -> New -> S32DS Project From Example  and select one of the existing single core S32 Design Studio Sample applications delivered with the NXP RTOS or import your own S32 Design Studio project.
DanielBarbu_0-1724665771742.png

 

  • Select the desired project from the list of examples and click finish

 

DanielBarbu_1-1724665940493.png

 

 

Generating configuration

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.

DanielBarbu_2-1724665997187.png

 

Building the project

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. 

DanielBarbu_3-1724666021215.png

 

Debug configuration

Click on Debug Configurations

DanielBarbu_4-1724666056773.png

 

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. 

DanielBarbu_5-1724666232111.png

 

 

Loading the ORTI file and starting debug

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.

DanielBarbu_6-1724666270563.png

 

 

OS Details Browser view

Navigate to go to Window -> Show View -> Other…  and select the OS Details Browser view

DanielBarbu_7-1724666333942.png

 

 

Using the OS Details Browser view, Design Studio can display information about the tasks status on the target.

 

Tasks tab

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):

DanielBarbu_8-1724666394551.png

 

Implementation tab

Switch to the “Implementation” tab to see more detailed information gathered from the .ort file:

 

  • OS – current state
  • Tasks – priority, state and assigned stack
  • Stacks – usage and attributes
  • Other OS resources defined and declared through ORTI
  • Detailed info about ORTI data object
  • Customize data presentation (HEX format, re-arrange the table columns)
  • Colored presentation of data: -   White fields are static
    • Blue fields are non-static
    • Yellow fields are fields that changed their values from the last time they were inspected/checked.

 

  • OS information:

DanielBarbu_9-1724666642078.png

  • Tasks information:
DanielBarbu_10-1724666767440.png

 

  • Stacks information:
DanielBarbu_11-1724666885984.png

 

Multi-core projects

Prerequisites

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.

 

Software environment:

  • S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace
  • S32Z2/E2 Development Package
  • S32Z/E Real Time Drivers Version 0.9.0
  • S32ZE RTOS R21-11 version 0.9.0

 

  • !Note: For this multi-core example project, NXP RTOS SysGen requires Java Runtime

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.

  • JAVA_HOME environment variable must be set to point to location of Java Runtime Environment. For example: JAVA_HOME= C:\Program Files (x86)\Java\java-1.8.0-openjdk-1.8.0.372-1 (Please choose correct path for your machine).
  • Error or unexpected behavior may occur if the version of Java is different than 1.8 when NXP RTOS SysGen is executed (steps that are described in Chapter III – “Generating Configuration”).  
  • Please notice that SysGen is not stable in JRE 1.8 64 bit. Using SG with JRE 1.8 32 bit is recommended.

 

 

Hardware environment:

            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

 

Project setup

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.

  

DanielBarbu_12-1724666955496.png

 

Generating configuration

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.

DanielBarbu_13-1724667060371.png

 

Building the projects

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.

 

 

Debug configuration

Click on Debug Configurations.

Click the initial core under S32 Debugger in Debug configurations menu.  Setup the Debug Probe Connection. 

DanielBarbu_14-1724667137932.png

 

Loading the ORTI file

 

Loading the ORTI file must be done for all the project configurations: 

  • 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
DanielBarbu_15-1724667168142.png

 

Starting debug on multi core project

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.

DanielBarbu_16-1724667236818.png

 

OS Details Browser view

Compared with single core projects, when debugging multi core projects you can switch between the debugging sessions and information from all debugged cores

 

Tasks tab

DanielBarbu_17-1724667274771.png

 

 

Implementation tab

The information displayed in Implementation tab is the same as in single-core projects case, but you can switch between the debugged cores

 

DanielBarbu_18-1724667306400.png

 

 

How to use OSEK OS Awareness with S32 Design Studio and PE Micro Debug probe

Prerequisites

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.

 

Software environment:

  • S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace
  • S32 Design Studio 3.5.6 development package with support for S32K396 devices
  • S32K3 Real-Time Drivers Version 3.0.0 P01

SW32K396 RTOS version 0.9.0 BETA

 

  • !Note: check the note from S32 Debugger – multi-core projects and install requires Java Runtime Environment OpenJDK-JRE 1.8

 

Hardware environment:

  • Board:

            Mini-module: XS32K396-BGA-DC PCB 54614 RevX1 SCH RevA 

            Silicon: Chip P32K396EHMJBS OP40E QAD2222F 

  • Debug Probe: PE Micro Debug Probe

 

 

Project setup

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

DanielBarbu_19-1724667361007.png

 

Generating configuration

DanielBarbu_20-1724667383972.png

 

 

Building the projects

Select the project in the S32 Design Studio Workspace and click on Build. 

 

Debug configuration

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.

DanielBarbu_21-1724667413285.png

 

Loading the ORTI file and starting debug

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.

DanielBarbu_22-1724667438670.png

 

OS Details Browser view

Go to Window -> Show View -> Other…  and select the OS Details Browser view

 

Tasks tab

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

 “Implementation” tab displays more detailed information gathered from the .ort file:

DanielBarbu_23-1724667457731.png

 

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

 

 

No ratings
Version history
Last update:
‎08-26-2024 03:18 AM
Updated by: