probe-rs / embedded-test

A test harness and runner for embedded devices
67 stars 10 forks source link

Running embedded-test on RP2040 (rp-rs) targets #39

Closed murraytodd closed 2 months ago

murraytodd commented 2 months ago

I've tried to follow the instructions to add a simple do-nothing unit test to a minimal rp2040 "blinky" program. I have everything I did available for review here on github. The specific changes I made to try to implement embedded-test can be seen in this commit.

When I try to execute cargo test --test blinky_test I get some hairy "error: linking with flip-link failed: exit status: 1" error with the full output available in this attachment:

err.txt

t-moe commented 2 months ago

The error message indicates that you are missing default interrupt/exception handlers. (An error not related to embedded-test)

I dont know the rp hal, but sometimes its enough to add something like use rp2050_hal as _.

(See also the following, outdated example https://github.com/probe-rs/embedded-test-example/blob/23ab16d6a8bd60e984d1b207cf50f1769ad8e023/tests/example_test.rs#L9 )