This repository contains examples for Keil Studio that run on the Infineon Kit T2G-B-H_Lite.
- Install Keil Studio for VS Code from the VS Code marketplace.
- Clone this Git repository into a VS Code workspace.
- Open the CMSIS View in VS Code and use the ... menu to choose an example via Select Active Solution from workspace.
- The related tools and software packs are downloaded and installed. Review progress with View - Output - CMSIS Solution.
- Patch T2G-B-H_DFP as explained in the Patch/README.md
- In the CMSIS view, use the Action buttons to build, load and debug the example on the hardware.
The examples can be explored using the Keil MDK Community edition that is free-to-use for training and evaluation. For evaluation purposes, the open-source variant of Keil RTX is used which offers the similar features as the commercial, safety-certified FuSa RTS. FuSa RTS is part of the Keil MDK Professional edition.
NOTE
The CMSIS-Driver Ethernet accesses a variable in the Infineon DFP that is defined
static
in the current implementation. Therefore remove thestatic
attribute in the file%CMSIS_PACK_ROOT%/Infineon/T2G-B-H_DFP/1.2.1/Libraries/mtb-pdl-cat1/drivers/source/cy_ethif.c
as explained in Patch/README.md. For CI this patch is applied as part of the Build_T2G_Release workflow.
This is a practical demonstration of Arm FuSa RTS process isolation, using a simple traffic light controller to showcase safety classes, MPU zones, and fault handling on Cortex-M devices.
The App/T2G.csolution.yml safety example uses three processor cores and contains:
- App/CM0p_Boot/Boot.cproject.yml implements a simple setup for the various processors and runs on the Cortex-M0+ processor of the device.
- App/CM7_0_TrafficLight/TrafficLight.cproject.yml implements the safety-critical application part using functional safety features of Keil RTX (runs on the Cortex-M7 processor #0).
- App/CM7_1_Blinky/Blinky.cproject.yml blinks an LED and could be replaced with any non-safety application part (runs on the Cortex-M7 processor #1).
The safety-critical application part CM7_0_TrafficLight uses safety classes to protect safe-mode operation. A web interface allows you to inject faults for testing the system recovery features. This part of the example is based on the application note KAN336 - TrafficLight: Arm FuSa RTS process isolation example.
This example application uses the Memory Protection Unit (MPU) and the Thread Watchdog available with FuSa RTS. It does not use:
- The Shared Memory Protection Unit (SMPU) which restricts the access to memory made by each bus-master in the MCU.
- The Peripheral Protection Unit (PPU) which protects peripherals with access permissions.
The usage of SMPU and PPU is explained in the application note from Infineon AN219843 - Protection Configuration in TRAVEO T2G.
The Infineon DFP/BSP software packs do not contain a CMSIS-Driver Ethernet or board software layers. These components are therefore developed separately and provided in this repository.
The Test/CMSIS_DV.csolution.yml validates the CMSIS-Driver Ethernet with the CMSIS-Driver_Validation pack.
This repository contains multiple csolution projects and is configured as a single Git workspace for VS Code. It can be therefore effectively used with the VS Code Git integration via the following files:
- vcpkg-configuration.json is in the workspace root directory and installs the tools for all csolution projects.
- .gitignore excludes files that contain user specific setup, for example
.vscode
and*.cbuild*.yml
.
The underlying build system of Keil Studio uses the CMSIS-Toolbox and CMake. CI is effectively supported with:
- Tool installation based on a single
vcpkg-configuration.json
file for desktop and CI environments. - CMSIS solution files (
*.csolution.yml
) that enable seamless builds in CI, for example using GitHub actions. - Run and Debug Configuration for pyOCD that uses a single configuration file
*.cbuild-run.yml
. Using self-hosted GitHub runners, projects can be tested with HIL systems.
CI Workflow | Description |
---|---|
Build_T2G_Release.yaml | Compile application using a GitHub action and save build output (artifacts). |
Run_T2G_Release.yaml | Download to a Linux box and execute the application on Infineon Kit T2G-B-H_Lite. |
This is a list of the relevant files and directories.
File/Directory | Content |
---|---|
vcpkg-configuration.json | Defines the tools that the Arm Tools Environment Manager installs in VS Code. |
App | App/T2G contains the safety example. |
Doc | Documentation files. |
Patch | Patch for the T2G-B-H_DFP pack. |
Test | Test/CMSIS_DV contains the validation for the CMSIS-Driver Ethernet. |
.github/workflows | Contains setup for the CI Build and HiL test workflows. |
This example was explained in the Multicore and FuSa Development with TRAVEO™ T2G:
Use the Issues tab to raise questions or issues.