Veethree D7 SDK
Loading...
Searching...
No Matches
Windows Host Builds

Prerequisites

Libraries that exist in the SDK have been built to be compatible with the Desktop Qt 6.10.2 MinGW 64-bit kit. Before building any application, this toolchain must be added to the PATH environment variable. Refer to windows toolchain to install and use the Qt build toolchain.

Host build

Building CLI apps

  1. Activate the development environment shell

    :: Navigate to the SDK installation directory and source the toolchain
    cd %USERPROFILE%\d7-sdk
    .\toolchain\environment-setup-x86_64-mingw32.bat

    This prepares the shell for building the application using the host environment from the D7 SDK.

    Note: Please make sure the Qt build toolchain exists in PATH variable.

  2. Navigate to application source directory to create build directory

    cd examples\hello-world\
    :: Create the build directory
    mkdir host-build
    cd host-build\
  3. Configure and build the application
    cmake -S .. -GNinja
    cmake --build .
  4. Run the application
    cli-hello-world-app

These commands should run without any errors and produce output similar to the following:

C:\Users\User1\d7-sdk\examples\hello-world\host-build>cli-hello-world-app
Hello world from the D7!
Board Serial Number: n/a
Board Voltage: 0.00 mV
Current Brightness: 0 %

Building QML apps

We will use the QML application from the examples\gui\qml-analog directory as an example. As seen on step 6 of this walkthrough (Building a QML application using the D7 SDK), this example demonstrates integrating the D7 SDK and Qt libraries into a single application.

For this example, you will need to have the Qt libraries installed separately from the D7 SDK. Please refer to the guide for installing Qt.

While running on the host, the sensor readings are mocked, since there are no sensors that can be used there. They will all read 249 Ohms.

Steps to build:

  1. Open a new CMD window, and source the environment script with this command:
    cd %USERPROFILE%\d7-sdk
    call toolchain\environment-setup-x86_64-mingw32.bat
  2. Navigate to the source directory and create the build directory:
    cd examples/gui/qml-analog/
    :: Create the build directory
    mkdir host-build
    cd host-build/
  3. Configure and build the project.
    cmake -S.. -GNinja -DCMAKE_PREFIX_PATH=C:\Qt\6.10.2\mingw_64
    cmake --build .
Note
For running applications that use the D7 SDK and Qt libraries on the host, you will need to configure the project by setting "CMAKE_PREFIX_PATH" to the installation directory of the Qt libraries.

This guide assumes Qt has been installed at the default location: C:\Qt

You should now be able to run qml-analog-app from the build directory and it should look like this:

QML Resistance reading app

Previous step

Running apps on the host.

Next Step

If you would like to configure QtCreator to build and run SDK apps on the host, see Running the application on the host via Qt Creator

If you wish to see examples of using the D7 SDK's APIs, please see the D7 software development kit examples section.