Veethree D7 SDK
Loading...
Searching...
No Matches
Building a CLI application using the D7 SDK

For this we will be using the example application from examples/hello-world. This application is the usual Hello world! app and will serve as a good example for compiling a simple app using the D7 SDK toolchain, for the target device.

Target build

  1. Activate the development environment shell to prepare the development shell for building the application

    Linux

    Open a new terminal, navigate to the D7 SDK installation directory and run:

    cd $HOME/d7-sdk/
    source ./toolchain/environment-setup-armv8a-veethree-linux

    Windows

    Open a new CMD window, navigate to the D7 SDK installation directory and run:

    cd %USERPROFILE%\d7-sdk
    .\toolchain\environment-setup-armv8a-veethree-linux.bat
  2. Navigate to application source directory to create build directory

    cd examples/hello-world/
    # Create the build directory
    mkdir target-build
    cd target-build/
  3. Configure and build the application

    cmake -S .. -GNinja
    cmake --build .

    These commands should run without any errors and produce the executable which will now be transferred to the device.

  4. Copy the file via SSH to the D7. Make sure the D7 is connected to the network and its IP address is known (see Connecting via SSH)

    # Replace $device_ip with the D7's IP address
    scp cli-hello-world-app root@$device_ip:/app
  5. Once the transfer is complete, ssh into the device. If the default application is running on the device, stop it by running the command:

    systemctl stop qml-hello-world-app
  6. If the app was built on Windows, the compiled binary won't be marked as executable, so once you ssh into the device, you will need to run the following command before you run the app:

    chmod +x cli-hello-world-app
Transfer and run the app on the device

Summary

On this page we gave a detailed explanation of building a Hello world! CLI application using the D7 SDK for the target device and running it.

Previous step

Prepare the D7 device

Next step

If you plan on using Qt libraries, the next step is building and running QML application on the target.

Otherwise, you can skip directly to Creating software updates.