veecle / tricore-probe

Just like probe-run but targeting the Tricore-Architecture
Apache License 2.0
20 stars 5 forks source link

Error: Elf file does not have _SEGGER_RTT symbol #20

Closed gemesa closed 4 months ago

gemesa commented 4 months ago

I built some blinky examples with HighTec Rust Aurix compiler version 1.0.0 for the TC375 lite kit board. I am trying to run these elfs on my board via tricore-probe but I face this error:

PS C:\Users\andra\git-repos\tricore-probe> cargo run -- .\blinking_led_1_litekit.elf -l trace
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target\debug\tricore-probe.exe .\blinking_led_1_litekit.elf -l trace`
[2024-04-22T12:43:23Z TRACE tricore_windows::das] Starting dashpas
[2024-04-22T12:43:23Z TRACE tricore_windows::das] Starting UDAS_Console
[2024-04-22T12:43:23Z INFO  tricore_windows::das] DAS server started
[2024-04-22T12:43:24Z DEBUG rust_mcd::library] Initializing MCD library
[2024-04-22T12:43:24Z DEBUG tricore_probe::chip_interface] Connecting to any available device
[2024-04-22T12:43:24Z INFO  tricore_probe::chip_interface] Converting elf .\blinking_led_1_litekit.elf to hex file
[2024-04-22T12:43:24Z INFO  tricore_probe::chip_interface] Flashing hex file
[2024-04-22T12:43:24Z TRACE rust_mcd::connection] Scanned for servers, found Connection { servers: [ServerInfo { acc_hw: "DAS JDS AURIX LITE KIT V2.0 (TC375) LK7KFCF1", server: "UDAS", system_instance: "" }] }
[2024-04-22T12:43:24Z INFO  tricore_windows::flash] Spawned Infineon Memtool to flash hex file
[2024-04-22T12:43:26Z INFO  tricore_windows::flash] Infineon Memtool terminated successfully
Error: Elf file does not have _SEGGER_RTT symbol
error: process didn't exit successfully: `target\debug\tricore-probe.exe .\blinking_led_1_litekit.elf -l trace` (exit code: 1)

I assume this means I need to utilize the rtt-target crate somehow. Do you have some examples for that (preferably with the Lite Kit board)?

daniel-veecle commented 4 months ago

Hey @gemesa,

Assuming I understand your problem correctly. To be able to use the tricore-probe you need to link against https://crates.io/crates/defmt-rtt. If you are working bare-metal you can check how Bluewind did it here (https://github.com/bluewind-embedded-systems/bw-r-drivers-tc37x/blob/main/src/log.rs).

If you want to use the PXROS (e.g., https://github.com/veecle/veecle-pxros/tree/main/examples/example-hello-world) you can check out how we did it here: https://github.com/veecle/veecle-pxros/blob/main/src/pxros/defmt_rtt.rs

gemesa commented 4 months ago

If you are working bare-metal you can check how Bluewind did it here (https://github.com/bluewind-embedded-systems/bw-r-drivers-tc37x/blob/main/src/log.rs).

This is exactly what I needed, thanks.