knurling-rs / probe-run

Run embedded programs just like native ones
Apache License 2.0
645 stars 75 forks source link

Warn on target chip mismatch #319

Closed Urhengulas closed 2 years ago

Urhengulas commented 2 years ago

This PR makes probe-run emit a warning, in case the chip type (obtained from probe-rs) and the compilation target (obtained from the path to the elf file) do not match. The path will contain the compilation target if probe-run is called through cargo run. In other cases the path might not contain the compilation target. In these cases we take no action and just move on.

Example

$ cargo rb hello -q
(HOST) WARN  Compilation target (thumbv8m.base-none-eabi) and core type (Armv7em) do not match. Your compilation target should be 'thumbv7em-none-eabi' (no FPU) or 'thumbv7em-none-eabihf' (with FPU).
...

Fixes #115.

Todo

jonas-schievink commented 2 years ago

Nice, looks great!

bors r+

bors[bot] commented 2 years ago

Build succeeded: