tricore-probe
is an effort to deploy and debug rust programs with little effort
on Tricore chips. It uses publicly available Infineon tools to interface with the
chips debug controller. As its name suggests, it is inspired by probe-run
and depends
on the defmt
framework to integrate seamlessly just as probe-run
does.
Currently only Windows and Linux are supported.
- Infineon DAS tool version 8.1.4
Please make sure the
DAS_HOME
environment variable points to the DAS tool installation directory. - Infineon AURIX™ Flasher Software Tool 3.0.0
Please make sure the
AURIX_FLASHER_PATH
environment variable points to the AurixFlasher executable (<your-path>\AURIXFlasher.exe
). defmt-print
CLI utility:cargo install defmt-print
objcopy
CLI utility (obtain e.g. as part of the MinGW-w64 project)addr2line
CLI utility (obtain e.g. as part of the MinGW-w64 project)- Rust toolchain
- bindgen requirements
Install tricore-probe
:
cargo install tricore-probe --git https://github.com/veecle/tricore-probe
The Linux setup is not officially supported by Infineon and thus might not work as expected. Please report any bugs or issues you encounter with the Linux setup only to this repository, not to Infineon.
- Place the Infineon DAS tool version 8.1.4 installer (
DAS_V8_1_4_SETUP.exe
) in tricore-docker. - Place the Infineon AURIX™ Flasher Software Tool 3.0.0 installer (
AURIXFlasherSoftwareTool-setup_3.0.0_20241030-1737.exe
) in tricore-docker. objcopy
CLI utility- Rust toolchain
libudev
library (libudev-dev
on Ubuntu,systemd-libs
on Fedora)
Clone the repository and place the DAS tool installer and AurixFlasher installer into the tricore-docker directory. Build the docker container running the DAS tool, AurixFlasher and other utilities.
Note:
The veecle/flash-tricore
container will contain an AurixFlasher and DAS installation in a Wine environment.
To use this setup, make sure you checked the terms and conditions of these programs and accept them by setting the required build argument with --build-arg=AGREE_INFINEON_TERMS=1
when building the docker image.
docker build . --tag veecle/flash-tricore --build-arg=AGREE_INFINEON_TERMS=1 -f tricore-docker/Dockerfile
Install tricore-probe
:
cargo install tricore-probe --git https://github.com/veecle/tricore-probe
The Linux setup is based on a modified version of the wineftd2xx
project by brentr
.
> tricore-probe --list-devices
Found 1 devices:
Device 0: "DAS JDS AURIX LITE KIT V2.0 (TC375) LK7KFCF1"
In case of a simple example based on the Bluewind blinky the output will look something like this:
> tricore-probe blinky.elf
DEBUG power on reset
└─ bw_r_drivers_tc37x::ssw::tc0::init_clock @ C:\Users\andra\.cargo\registry\src\git.luolix.top-d2f9efa20490c5c8\bw-r-drivers-tc37x-0.2.0\src\ssw\tc0.rs:12
INFO LED2 toggle
└─ blinky::main @ src\main.rs:46
For more sample code refer to the Bluewind bare-metal examples and to the Veecle PXROS examples.
For applications not running on all the available cores, you can specify the number of active cores in the application with a CLI flag in order to prevent abrupt exit from the rtt
session (by default, all of the cores available to the MCU are used):
> tricore-probe --cores <n> app.elf
Note that this parameter only works for applications running on contiguous cores. For example, on a tri-core processor, with an application only starting core0
and core2
, this session will stop anyway:
> tricore-probe --cores 2 app.elf
This program can be configured as a runner.
Check main.rs
or run tricore-probe --help
for additional configuration options.
A simple runner config for a TC375 lite kit could look like this:
[target.tc162-htc-none]
runner = "tricore-probe"
# The default dwarf version of the HighTec compiler is version 2 in v0.2.0
# and version 3 in v1.0.0, both versions being incompatible with defmt location information.
rustflags = ["-Z", "dwarf-version=4"]
[build]
target = "tc162-htc-none"
Then you can call cargo run
in your project root which will run the built .elf on your board via tricore-probe
.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.