How veecle/tricore-probe works
Project type and purpose
• This is a Rust‑based CLI tool (“tricore-probe”) plus a helper library (“rust‑mcd”) for flashing and debugging Infineon AURIX/Tricore microcontrollers.
• It integrates with Infineon’s DAS and AurixFlasher tools (on Windows directly, on Linux via a Docker + Wine environment) and uses the defmt framework for log decoding.
File structure
• Top‑level workspace:
• Cargo.toml (workspace manifest)
• src/ (main crate: tricore‑probe CLI)
• rust‑mcd/ (subcrate: MCD FFI wrapper + demos)
• tricore‑docker/ (Docker build context for Linux support)
• CI, formatting, and license files
• src/ contains modules for each subsystem:
• main.rs (CLI entry)
• chip_communication.rs, das.rs, flash.rs (hardware interface layers)
• elf.rs (ELF parsing & objcopy integration)
• defmt.rs (invoke defmt‑print)
• backtrace/, registers.rs, memory.rs, transaction.rs (debug support)
• rust‑mcd/:
• build.rs & bindgen setup → generates pregenerated.rs
• src/raw/ → thin wrappers over the C MCD query APIs
• other Rust abstractions: library.rs, core.rs, connection.rs, etc.
• mcd_demo_basic_* folder: a C++ demo showing how to use the native MCD API
Key README insights
• The tool supports two platforms:
• Windows: calls native Infineon CLI tools via environment variables (DAS_HOME, AURIX_FLASHER_PATH).
• Linux: encapsulates those tools in a Docker container (veecle/flash-tricore) built from tricore‑docker/ using Wine.
• It’s designed as a Cargo runner and integrates with defmt for seamless logging.
Detail without overthinking
• Module in src/ to demonstrate responsibilities
• Both Windows and Linux code paths distinctly