|
Veethree D7 SDK
|
Please refer to the guide for installing Qt for the necessary steps to install the Qt libraries and Qt Creator.
Please make a note of the installation directory for the Qt libraries. It will be required later.
The reference documentation for installing Qt Creator can be found here.
The tool qt-kit-setup in tools directory can be used to set up the D7 Kit.
The path to Qt's sdktool is required for the qt-kit-setup script.
Assuming Qt was installed in the default path, the sdktool should be at $HOME/Qt/Tools/sdktool/libexec/qtcreator/sdktool on Linux and at C:\Qt\Tools\sdktool\bin\sdktool.exe on Windows. If Qt is not installed in the default location, please refer to Qt SDK Tool docs for finding the path to the sdktool.
Follow the instructions it displays to enable the Qt Kit configuration for the device. For parameters reference, see the --help option.
Note: Make sure to use the absolute path to the sdktool. It will not work with relative paths or paths that start with ~.
Please refer to Qt's documentation page for finding the path to the sdktool.
After running the script, you will need to restart Qt Creator to see the change. A Qt kit named VeethreeD7 will be created.
If you configured a Qt Creator kit and wish to uninstall it, use the same executable qt-kit-setup with an additional flag --remove. The path to Qt's sdktool is necessary for removing the kit, so please check the previous section for instructions on finding the path.
Follow the instructions it displays to enable the Qt Kit configuration for the device.
After running the qt-kit-setup executable, you will need to restart Qt Creator to see the changes. The VeethreeD7 kit will have been removed.
Open Qt Creator, click on "Open Project..." and navigate to the SDK installation directory, then into the examples/gui/qml-analog directory and double click on CMakeLists.txt.
Tick the option for using the VeethreeD7 kit.
Click on "Manage Kit" and make VeethreeD7 the default kit.
Click "Apply", then click on "Configure Project" in the bottom-right corner.
There should be no errors in configuring the project.
You will need to add the device into Qt Creator. Please refer to Qt's guide for doing so: https://doc.qt.io/qtcreator/creator-how-to-add-remote-linux.html.
When prompted for the device configuration, set the D7's IP address, the port to 22 and the username to root.
Make sure the "Source /etc/profile and $HOME/.profile" option is checked.
Click the "Play" button. The application should start running on the device.
To test that debugging the application while it's running on the target device works, open the main.cpp file and set a breakpoint on the line that loads the ui from the "Main" module (line 19 in the screenshot).
Then you will need to make sure that the project will run on the target device by checking that the "Run device" is set to your D7, the "Kit" is set to "VeethreeD7" and "Deploy" is set to "Deploy to Remote Linux Host":
You should now be able to launch the project with a debugger attached:
If the D7 is running the default application, you may get an error like:
you may have to stop the default application.
To do so, open a new D7 shell and stop the default service:
To run the above command before deploying your application from Qt Creator, add a deploy step to Run custom remote command in "Deployment" section of "Run Settings" of the VeethreeD7 kit.
In this section we have described setting up Qt Creator to be able to build applications for the device using the D7 SDK and deploy them to a development board.
Installing Qt libraries and Qt Creator
The next step now is to build and run applications on the host machine.