C

NVIDIA Jetson Quick Start Guide

Qt offers all the necessary tools to design, develop, build, and deploy your application onto the target.

This guide describes how to use the GUIs of Qt tools to develop Linux applications on an NVIDIA Jetson device. It describes the overall process and provides step-by-step instructions for the following tasks:

  • Designing a simple UI using Qt Design Studio.
  • Creating a project in Qt Creator and utilizing the ready-made Boot to Qt image for the NVIDIA Jetson device.
  • Building and debugging the project on the target hardware.

Note: Qt for Device Creation requires a license. If you don't have one, you can request a free trial.

Overview

The figure below illustrates the simplified development flow using Qt tools and Boot to Qt Software Stack for the NVIDIA Jetson target hardware.

  • A host PC is a development computer running Qt tools on Windows, Linux, or Mac.
  • Qt tools refers to Qt Creator and Qt Design Studio.
  • Target HW is an NVIDIA Jetson device that runs your embedded Linux application.
  • Boot to Qt Software Stack (B2QSS) provides a system image and a toolchain for each target device. The system image contains the Boot to Qt Software Stack and needs to be flashed to an SD card or directly to the target device. The toolchain is required for building and developing applications for the target devices.
  • Upload and debug an application (via Ethernet or USB). Use Qt Creator to upload and debug your application on the target HW.

Applicable NVIDIA Jetson Target Devices

The instructions in this guide apply to the NVIDIA Jetson AGX Xavier Developer Kit.

Note: For more details on the supported target devices and development hosts, see Supported Target Devices and Development Hosts.

Installing Qt

Follow the procedures in this guide to get all the required resources, including Qt Creator and Qt Design Studio.

  1. Sign in to Qt Account Downloads.
  2. Download Qt Online Installer. The installer is available for the following hosts:
    • Linux
    • Mac
    • Windows
  3. Open the installer.
  4. Continue to Installation Folder and select Custom installation.
  5. Select Next.
  6. In Select Components, select the latest official release of Qt. The required developer and designer tools (such as Qt Creator and Qt Design Studio) are preselected in the installer.
  7. Select Next.
  8. Continue to Ready to Install and select Install.

Note: If you have Qt already installed, use Qt Maintenance Tool to install the missing tools.

Installing Boot to Qt Software Stack Using Qt Online Installer

  1. Open Qt Online Installer.
  2. Continue to Select Components and open the top-level Boot to Qt Software Stack dropdown menu.
  3. Open the correct Qt release -specific Boot to Qt Software Stack dropdown menu.
  4. Select NVIDIA Jetson AGX Xavier Developer Kit.
  5. Continue to Ready to Install and select Install.

Creating an Application UI

You can use Qt Design Studio to create a cross-platform UI, also for embedded Linux applications.

  1. Open Qt Design Studio.
  2. Select Create Project.
  3. In Presets, select General.
    • Name your project (also notice the project path to open it with Qt Creator).
    • Adjust display resolution and orientation to suit your display.
  4. Make sure your Target Qt Version matches the version of Qt installed on your machine.
  5. Select Create.

Now you can modify your UI as you wish. Once it is ready, select Save All to make sure that you can open your UI project in Qt Creator.

Installing Boot to Qt on the Target Device

Before you can test your Qt applications on the target device, you must flash the target device with an image containing the Boot to Qt Software Stack. After you have successfully flashed your device, Boot to Qt Demo Launcher appears on the screen when you power on the device.

This device can be booted from an internal eMMC or from an SD card. However, the Boot to Qt image only supports an internal eMMC.

Note: Qt Flashing Wizard is not applicable to this device.

Flashing Boot to Qt Image onto the System's Internal eMMC

  1. Connect the target device to the PC with a suitable USB-C cable.

    Note: Connecting the device via a USB hub will significantly decrease the transmission speed during flashing.

  2. Put the target device into the factory recovery mode.
    1. Press and hold the factory recovery button.
    2. If the device is not turned on, press and release the power button. If the device is already turned on, press and release the reset button.
    3. Release the factory recovery button.
  3. Run the following scripts to flash the image onto the system's internal eMMC:
    cd <INSTALL_DIR>/<Qt version>/Boot2Qt/jetson-agx-xavier-devkit/images
    mkdir tegraflash
    cd tegraflash
    tar xf ../b2qt-embedded-qt6-image-jetson-agx-xavier-devkit.tegraflash.tar.gz
    ./prepare-image.sh
    sudo ./doflash.sh

For more detailed information, see Flashing the Jetson Dev Kit.

Note: Flashing the internal eMMC is supported only on a Linux host.

Setting Up a Device

A Boot to Qt device can be connected either via USB, Ethernet, or Wi-Fi. The sections below provide instructions on how to set up a device using either USB, Ethernet, or Wi-Fi connectivity.

Setting Up a Device via USB

The target device can be connected to the host via USB On-the-Go (OTG). Once connected via a USB network, the device is automatically added to the Devices in Qt Creator.

The USB access to the target device supports two different USB protocols. The default RNDIS protocol can be used when connecting the target device to either a Linux or Windows host. When you want to connect the target device to a macOS host, you need to change to the CDC-ECM protocol.

Note: You can change the protocol from the Boot to Qt Startup Screen.

For more information on connecting a device via USB, see Setting Up USB Ethernet on Target Device.

Setting Up a Device via Ethernet or Wi-Fi

The target device can be connected to network either via Ethernet or Wi-Fi connectivity. After the target device is connected and has an IP address, you can set it up to Qt Creator with the following steps:

  1. Open Qt Creator.
  2. Select Edit > Preferences.
  3. In the Preferences window:
    1. Select Devices.
    2. Select Add > Boot2Qt Device > Start Wizard.
  4. In the Boot2Qt Network Device Setup window:
    1. Enter the Device name.
    2. Enter the Device address (IP address of the NVIDIA Jetson device).
    3. Select Finish.
  5. On the Devices tab:
    • Select OK.

Note: You can also set up Wi-Fi connection from the Boot to Qt Startup Screen

Note: When Qt Creator uploads the application over the IP network, the NVIDIA Jetson device has to be in the same network as your development host PC.

Configuring and Building an Application

  1. Open Qt Creator.
  2. Navigate to the project you created with Qt Design Studio.
  3. Select CMakeLists.txt to open the project.
  4. In the Configure Project window:
    1. Select your NVIDIA Jetson kit.
    2. Select Configure Project.

Finally, select Build > Build Project to build the project you configured.

Running an Application on a Device

After setting up your device, you can upload and start your application on the NVIDIA Jetson device.

  1. Open Qt Creator.
  2. Select File > Open File or Project.
  3. Navigate to the project you configured earlier and select Open.
  4. In the Projects window:
    1. Edit the Run Settings if necessary.
    2. Select Run.

Note: To make changes to your application, you can update it on the device simply by running it again.

For detailed information about how to deploy Qt projects to the device, see Tutorial: Deploying Your First Project with Boot to Qt.

Debugging an Application

For more information on using Qt Creator to debug an application, see Debugging.

Troubleshooting

If you have any issues with your NVIDIA Jetson device, such as how to setup boot switches or connect the debug terminal, turn to NVIDIA Jetson platform and NVIDIA developer forum for more information.

For more information on troubleshooting Boot to Qt, see Troubleshooting.

Available under certain Qt licenses.
Find out more.