• Rust Development
    • Using Cross to Cross-comp...
  • Compile a C program for the board using SDK
    • Create a BSP using phyLinux
      • Add a Given Recipe to BSP
        • Add LVGL Demo into BSP
            • 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

                              Rust Development

                              Goal

                              Set up a Rust development environment in the virtual machine and copy and run the binary on the Development Kit.

                              Preconditions

                              1. The PHYTEC VM is on the host system and boots correctly: Getting and Running the PHYTEC VM

                              Tutorial

                              Install Rust & Cargo on the PHYTEC Virtual Machine

                              1. Open a terminal
                              2. Insert the command:

                                Install command
                                curl https://sh.rustup.rs -sSf | sh
                              3. Choose the default installation by typing 1
                              4. If everything is okay, you can test the following two commands:

                                Testcommands
                                $ rustc --version # The command will return the rust compiler version
                                $ cargo --version # The return of the command is the actual version of cargo

                              If neither of these commands returns an error, then Rust is correctly installed on your machine.

                              Create a hello-world in Rust

                              In this section, you will learn how to automatically create a hello-world program in your virtual machine.

                              Create hello World
                              mkdir rust-test-hello-world # create new folder for the hello-world
                              cd rust-test-hello-world # go into the new folder
                              cargo new hello-world # command to create a new default hello-world project
                              cargo run # command to test the new created hello-world project

                              If everything is correct, you will see the string "Hello, world!" as output on the terminal.