veecle / tc37x-demo

Demo application with logging and CAN presented at embedded world 2023
Apache License 2.0
3 stars 1 forks source link

Demo code for CAN over AURIX TC375

This demo provides an initial showcase of how to use Rust on AURIX™. The demo is 100% written in Rust and provides

  1. Board clock configuration and distribution
  2. CAN Driver configuration & basic usage scenarios
  3. Basic stack-traces
  4. defmt logging through tricore-probe

Please, be aware that the code presented here is very experimental and only meant to showcase; by no means one should consider this finished or correct

Usage

To initialize: git clone --recurse-submodules https://github.com/veecle/tc37x-demo

To compile the demo HighTec Rust's compiler should be installed. Please register and follow their installation instruction.

Following, the demo can be compiled via cd app && cargo build and subsequently flashed via cargo run over tricore-probe.

We use defmt as our logging framework: by setting the DEFMT_LOG={TRACE, DEBUG, INFO, WARN, ERROR} the probe will do logging (for more details refer to the official project).

Example code

The main.rs comes with two examples:

VSCode

In order to use rust-analyzer in VSCode, the tricore.core-workspace.RLM_LICENSE should be updated to point to the license path.

License

Licensed under Apache License, Version 2.0