Git Product home page Git Product logo

bw-r-drivers-tc37x-examples's Introduction

bw-r-driver-tc37x-examples

About Bluewind

Bluewind is an independent engineering company that provides world-class products, engineering and software solutions in the domains of electronics, safety critical applications, and connected devices.

Bluewind is a strategic partner who creates value in the whole product innovation cycle, taking part to product strategy stage, and providing electronics and software design, certifications consultancy, and production.

Table of Contents

AURIX™ Rust Startup Ecosystem

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.

AURIX Rust Startup Ecosystem

The AURIX™ Rust Startup Ecosystem consists of:

  • A Peripheral Access Crate (PAC) from Infineon.
  • Low-level drivers from Bluewind, fully written in Rust.
  • A precompiled version of PXROS-HR, an ASIL-D RTOS written in C, developed by HighTec.
  • Rust PXROS-HR bindings developed jointly by Veecle and HighTec.
  • A Rust runtime from Veecle, named veecle-pxros, which seamlessly integrates with PXROS-HR, providing a native Rust experience. This runtime also supports asynchronous execution where feasible.
  • A curated set of examples by Veecle and Bluewind, covering bare metal driver examples, driver instances employing PXROS-HR, and connectivity application demonstrations.

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:

Getting started

To get familiar with the drivers, you can start with the examples here.

They are meant to be standalone and to be used as a boilerplate for your new project.

Try a simple example:

git clone https://github.com/bluewind-embedded-systems/bw-r-drivers-tc37x-examples.git
cd bw-r-drivers-tc37x-examples
cd blinky
cargo +tricore build --target=tc162-htc-none

Check the Toolchain

The Rust code is structured to work with the defmt framework and tricore-probe, but you can use also other debugging tools, like UDE or MemTool (see Run section below).

Examples

Examples in this repo are:

Name Description Peripherals
blink Blinking LED. Button press. GPIO
can CAN bus send and receive CAN
can_loopback CAN bus send and receive via loopback mode (no external reciever device required) CAN

You can find more information on drivers here: bluewind-embedded-systems.github.io/bw-r-drivers-tc37x

Build

Move to the directory of the example you want to build and run:

cargo +tricore build --target=tc162-htc-none

This will generate an ELF file in the target/tc162-htc-none/debug directory, which you can load into the target.

Run

You have many options to flash and run these examples:

bw-r-drivers-tc37x-examples's People

Contributors

alepez avatar annabonaldobw avatar tobiafiorese-bw avatar

Stargazers

Andras Gemes avatar Lucas Brendel avatar

Watchers

Stefano Costa avatar

bw-r-drivers-tc37x-examples's Issues

unexpected device halt

I am experimenting with the tricore-probe, defmt logging and HighTec Rust Aurix compiler version 1.0.0, using the BW blinky example on a TC375 Lite Kit. I can build and run the firmware, but it halts abruptly after starting for some reason.

PS C:\Users\andra\git-repos\bw-r-drivers-tc37x-examples\blinky> cargo run
   Compiling blinky v0.1.0 (C:\Users\andra\git-repos\bw-r-drivers-tc37x-examples\blinky)
    Finished dev [unoptimized + debuginfo] target(s) in 0.59s
     Running `tricore-probe target\tc162-htc-none\debug\blinky.elf`
DEBUG power on reset
└─ bw_r_drivers_tc37x::ssw::tc0::init_clock @ C:\Users\andra\.cargo\registry\src\github.com-d2f9efa20490c5c8\bw-r-drivers-tc37x-0.2.0\src\ssw\tc0.rs:12
INFO  Wait for Duration { secs: 0, nanos: 500000000 }
└─ blinky::main @ src\main.rs:48
Device halted, backtrace as follows
0xAFFFC000 -> ??
└────────── @ ??:0
     0x0 -> ??
└────────── @ ??:0

Do you know what could be the issue?

I added this to .cargo/config (this is the only change I implemented):

[target.tc162-htc-none]
runner = "tricore-probe"
# Default dwarf version of v1.0.0 HighTec compiler is version 3 which is
# incompatible with defmt location information
rustflags = ["-Z", "dwarf-version=4"]

[build]
target = "tc162-htc-none"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.