q7s-rs-crosscompile/README.md

43 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2021-08-14 17:26:23 +02:00
Cross-compiling Rust for the Q7S
2021-08-14 17:13:45 +02:00
======
2021-08-14 17:26:23 +02:00
# Build with `cargo`
Build debug image:
```sh
cargo build --target armv7-unknown-linux-gnueabihf
```
You can then transfer the application with `scp`. It is recommended to use
the `q7s-cp.py` utility which is part of the
[EIVE OBSW script folder](https://egit.irs.uni-stuttgart.de/eive/eive-obsw).
If you use this script, you can use the `deploy-q7s.sh` script to deploy the
binary conveniently.
2021-08-14 17:13:45 +02:00
# Prerequisites
2021-08-14 17:26:23 +02:00
1. Install rust on your development machine using `rustup`
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
2. Install standard library for target architecture
2021-08-14 17:13:45 +02:00
```sh
rustup target add armv7-unknown-linux-gnueabihf
```
2021-08-14 17:26:23 +02:00
3. Install a cross-compile toolchain for the Cortex-A9 target and add it to your path.
It is recommended to take the same toolchain used to compile the Q7S primary OBSW.
See the [dedicated README](https://egit.irs.uni-stuttgart.de/eive/eive-obsw)
for more details and download links.
4. Install `sshpass`
```sh
sudo apt-get install sshpass
```