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

Note
In order to use Qt libraries you must have your own Qt development and distribution licenses. Please refer to https://www.qt.io/qt-licensing for more information.

For this step in the walkthrough, we will use GUI Analog Read example. This application will demonstrate integrating the D7 SDK in a QML project that will run on both the host and the target device. At this step we’ll run on target. Running on the host requires Qt libraries installed and this is documented in a future step. It displays resistance readings from the built-in analog sensors. Each sensor is set up as a 1-wire resistance sensor.

For more information about all the available hardware interfaces and their configurations, please refer to the Hardware interfaces page.

Test harness

Please refer to a. 1-wire resistance sensing (using VRSNS pins and AGND pin) to set up a one-wire resistor on VRSNS_0 pin.

Target build

Similar to the previous example, you will need to open a new terminal (on linux) or CMD window (on windows) then navigate to the D7 SDK installation directory and activate the development environment.

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

    Linux

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

    Windows

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

    cd examples/gui/qml-analog/
    # Create the build directory
    mkdir target-build
    cd target-build/
  3. Configure and build the application

    cmake -S .. -GNinja
    cmake --build .
  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 qml-analog-app root@$device_ip:/app
  5. Once the transfer is complete, ssh into the device.
  6. If the application was built on Windows, you will also need to mark the application as executable on the device:

    chmod +x /app/qml-analog-app
Important
If the default app – that displays the board's serial number and IP – is currently on screen, you will need to stop the system service for it in order to allow other QML applications to be on screen.

To do that run:

systemctl stop qml-hello-world-app

You should now be able to run the application and, if you have connected any resistances as described in the test harness section, their values should be displayed on screen now.

Other examples

Please refer to D7 software development kit examples for more GUI and CLI examples

Summary

In this page we have described configuring, building and running a QML application for the target device, as well as attaching resistances to the sensor pins in the AMPSEAL 35-way connector.

There are other example applications that explore other hardware interfaces, such as the 4-20mA interface or the Digital In/Out interface.

Previous step

Building a CLI application using the D7 SDK

Next step

The previous steps, gave a walkthrough of building and running applications on the D7.

The next steps now is creating a software update image and flashing it onto the device. Next page