Cross docker image for RPi 1/RPi 0 rust development.
Beside default cross image, it contains :
- arm-unknown-linux-gnueabihf cross compiler for Raspberry Pi 1/Raspberry Pi Zero(W)
- vc libraries
cross test
andcross run
can optionally upload and run to target device
In your Cross.toml
(create it if needed) put :
[target.arm-unknown-linux-gnueabihf]
image = "mikaye/rust-rpi0-cross"
Now you can do cross test --target=arm-unknown-linux-gnueabihf
and it will build and run tests. Note that it is run locally with qemu. See next section for remote run.
To cross-build locally then run on the Pi itself add these lines to your Cross.toml
:
[target.arm-unknown-linux-gnueabihf.env]
passthrough = ["CROSS_REMOTE_HOST"]
Then put your connection in CROSS_REMOTE_HOST
environment variable with the same format as you would in SSH command (user@hostname:port
)