A runtime for writing automotive and industrial Rust on top of HighTec's safety kernel for the Infineon AURIX™ Platform.
[!WARNING] This project is in its early stages and may not work as intended, especially on Linux. Feedback, suggestions, or contributions are welcome!
This repository is part of the Veecle Development Framework, serving as the backbone for deploying Veecle NOS in critical contexts. Veecle NOS is a cutting-edge, data-driven asynchronous runtime designed specifically for automotive development, written entirely in the Rust programming language.
NOS empowers carmakers to deliver an experience akin to that of using a smartphone, enabling the rapid development and deployment of digital features directly into existing vehicle systems. NOS layered abstraction model simplifies interaction with vehicle data, enhancing system flexibility.
NOS facilitates and simplifies communication between vehicle components, promoting continuous evolution and improvement of vehicle functionalities. This approach streamlines the development and shortens innovation cycles, allowing for the addition of features in a mid-cycle vehicle update.
For licensing, demonstrations, or to learn more about Veecle's Development Framework, please reach out to us at sales@veecle.io or visit our website at veecle.io.
The AURIX™ Rust Startup Ecosystem is a collaborative effort involving Veecle, Infineon, HighTec and Bluewind aimed at supporting Rust on Infineon's AURIX™ architecture for automotive and industrial applications. The primary objective is to empower customers to seamlessly integrate Rust tasks alongside existing C implementations for evaluation and pre-development purposes.
The AURIX™ Rust Startup Ecosystem consists of:
For compiling Rust for AURIX™, HighTec offers a combined package of their Rust and C/C++ compiler, accessible here.
Finally, to facilitate flashing and debugging on AURIX Veecle is maintaining the tricore-probe.
For additional information visit:
[!NOTE]
The included BSP only supports the TC375 Lite Kit. Please open an issue or contact us if you require support for a different board.
The Rust code is structured to work with the defmt framework and tricore-probe.
The compilation process works by first compiling a Rust library, defining one or more PXROS tasks, via Cargo. For Rust library examples, please see the /examples folder.
Next, CMake is used to compile the PXROS kernel and C tasks defined in the app-tc37x folder and to link everything together with the Rust library. The output is a .elf
file that can be flashed to a board via Debugger or MEMTOOL.
Install rustup and this toolchain: this is needed by Rust Analyzer to compile and test tricore-agnostic code and by HighTec's installer to configure the default toolchain.
Install HighTec's Rust compiler toolchain. Register and follow their installation instruction.
If on Windows, install Infineon's DAS and AurixFlasher: these tools are required to utilize tricore-probe. If you are using Linux, please follow the guidelines provided in the tricore-probe repository.
Install tricore-probe via cargo install tricore-probe --git https://github.com/veecle/tricore-probe --version 0.2.0
.
Make sure the listed requirements are installed.
For additional installation instructions or troubleshooting please also visit Bluewind's repository.
LIBCLANG_PATH
points to HighTec's toolchain.This repository provides a utility tool (xtask
) to facilitate compilation and execution on a connected board or on the TSIM emulator.
cargo xtask run --binary example-ipc --target tc162
tsim
emulator:cargo xtask emulate --binary example-ipc --target tc162
cargo xtask build --binary example-ipc --target tc162
xtask
requires tricore-probe
only when running the binary. If tricore-probe
is not available in your system, you can still use xtask
to build or emulate the project. Other tools (like Infineon's MEMTOOL) can then be used to flash and debug the output .elf
.
xtask
requires CMake, Make, and Tricore-probe (if used) to be available in the PATH environment variable.
Event 31 (with bit 1 << 31 set) is reserved by the defmt logging system and is not available for use by tasks. Logging is only supported in tasks, not in interrupt handlers.
TSIM only simulates a single core. The examples were developed for multicore hardware and as such may not function as expected when run on the simulator. Similarly, logging might behave differently than on actual hardware.
Rust examples can be found in examples. Examples are meant to run on the real hardware board: running them in TSIM will lead to unexpected and unintended behavior.
Additional low-level driver examples provided by Bluewind can be found here: https://github.com/bluewind-embedded-systems/bw-r-drivers-tc37x-examples.
The repository goal is to provide a library that users can simply include in their Cargo.toml
and use to develop either C or Rust tasks without having to clone or download the whole repository.
However, due to linker/setup limitations, this is currently not possible. Users must develop both Rust and C tasks on top of this repository. Rust tasks can reside in any crate as shown by the examples, while C tasks must be developed according to PXROS-HR guidelines. An example can be seen [app-tc37x/pxros/tasks/InitTask].
This limitation will be lifted in future releases.
We encourage users to submit feature requests and bug reports. Before submitting, please check if a similar request or report already exists in the issues section.
If you have a feature request, follow these steps:
If you've encountered a bug, follow these steps:
Thank you for helping us improve!
We welcome contributions to help improve and grow the project. Please take a moment to review this document to ensure a smooth and collaborative process.
Contributions happens via pull requests. To contribute:
cargo xtask check
to run the CI checks locally. Any warnings or errors will cause the CI to fail.Licensed under Apache License, Version 2.0, with the exception of app-tc37x. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache License, Version 2.0, shall be licensed under Apache License, Version 2.0, without any additional terms or conditions.
The folder app-tc37x is provided by HighTec EDV-Systeme GmbH and licensed under BSL-1.0.