- Copy SD Card Image to an SD Card
- Copy Software to the Board via SSH and SCP
- Getting and Running the PHYTEC VM
- Install FTDI Driver on Windows
- Set Static IP Address in Ubuntu 20.04 LTS
- Setup a Second Network Interface in the Virtual Machine
- Setup qbee Device Management on phyBOARD-Polis
- Using phyLinux to build a yocto BSP with a build-container
- Using thingsboard.io to connect phyBOARD-Polis to the Cloud
Using Cross to Cross-compile Rust for other Architectures
Goal
- The virtual machine has Cross installed (https://github.com/cross-rs/cross).
- Cross is used to cross-compile a Rust project.
Preconditions
- The virtual machine is correctly installed on the host system (Getting and Running the PHYTEC VM)
- Rust and Cargo are correctly installed in the virtual machine (Rust Development)
- The Hello World project is created in the virtual machine (Rust Development)
Install Podman or Docker in the Virtual Machine
To use Cross for the compilation you will need container software installed and running on the virtual machine.
For this tutorial, we used the Podman installation guide (https://podman.io/docs/installation) to install and run it on the virtual machine.
Install Cross in the Virtual Machine
For this section, we used the given installation guide (https://github.com/cross-rs/cross) to install Cross.
Use Cross to Cross-compile the Hello World Project
If all the above steps are done correctly, you can use Cross from the terminal to cross-compile the Hello World project for other architectures.
cd rust-test-hello-world # go to the rust project folder cross build --target aarch64-unknown-linux-gnu # this command will use cross to compile rust for the aarch64-linux architecture
If everything is correct, you can find the binary in the folder "./target/aarch64-unknown-linux-gnu/debug".
This binary is built for a specific architecture.
Next Step
To run your Rust binary on our board, here is a tutorial on how to copy it to the board via scp: