Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.
/ tc37x-demo Public archive

Demo application with logging and CAN presented at embedded world 2023

License

Notifications You must be signed in to change notification settings

veecle/tc37x-demo

Repository files navigation

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:

  • can_with_pins: (disabled by default) assumes two connected devices (a joystick and a motor controller) that talk over CAN. This is unlikely to work given the strict setup; however, the code can be modified to accommodate other scenarios.
  • with_with_loopback: (enabled by default) this makes CAN work in loopback. This runs by default and should give an idea of how sending/receiving works.

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

About

Demo application with logging and CAN presented at embedded world 2023

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages