On this page

C

STMicroelectronics MPU 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 STMicroelectronics MPU device. It describes the overall process and provides step-by-step instructions for the following tasks:

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

Overview

The following figure illustrates the basic concept of the software development process when you're using Qt tools and Qt Onboard.

Development process illustrated in a simple manner.

  • Development Host is your development computer running Qt tools on Windows, Linux, or macOS.
  • Qt tools includes development tools such as Qt Creator and Qt Design Studio, and quality assurance (QA) tools such as Squish.
  • QBSP SDK contains a cross-compilation toolchain that is integrated into Qt Creator, and a device image that you can use to boot your device using Qt Onboard.
  • Target Device is your development target that runs your embedded Linux application.
  • Upload and debug an application (via Ethernet, Wi-Fi, or USB). Use Qt Creator to upload and debug your application on the target device.
  • Flash a QBSP image represents ways (such as SD card) to install Linux on the target device.

Applicable STMicroelectronics MPU target devices

The instructions in this guide apply to the following STMicroelectronics MPU target device:

  • STM32MP25 Discovery

Qt versions in images and examples are indicative and might not represent the latest available version.

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

Installing the Qt Extended Evaluation package via Qt Online Installer

To develop with Qt Onboard, you need to install the Qt Extended Evaluation package for your development target. The package includes everything you need: the Qt board support package (QBSP) and Qt tools.

If you don't have Qt installed yet, follow these steps:

  1. Sign in to Qt Customer Portal and download Qt Online Installer.
  2. Qt Online Installer is available for the following hosts:
    • Linux on Arm
    • Linux x86
    • macOS
    • Windows
    • Windows on Arm

    Download the Qt Online Installer package that matches your host.

  3. Open Qt Online Installer.
  4. Continue to Installation options and select Extended Evaluation.
  5. Select Next.
  6. Continue to Ready to Install and select Install.

Extended Evaluation in Qt Online Installer.

Installing Qt Onboard 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 Qt Onboard. After you have successfully flashed your device, Qt Demo Launcher appears on the screen when you power on the device.

Flashing Qt Onboard image to a microSD card

The Qt Onboard image contains the Qt Onboard for the STMicroelectronics MPU device. Flash the image to a microSD card as follows:

  1. Insert a microSD card into your host PC.
  2. Open Qt Creator.
  3. Select Tools > Flash Boot to Qt Device.
  4. Select Next.

After you have flashed the image to a microSD card, insert the card into your target HW and turn on your device.

The STMicroelectronics MPU device starts with Qt Demo Launcher application by default. If you want to check the IP address of the device, open Get Started with Qt via Qt Demo Launcher. The IP address is shown if the device is connected to an Ethernet or Wi-Fi network, or to the host computer via USB OTG.

Note: If your target device does not start, check that microSD card is defined as the Boot mode.

Connecting the target device

Create a connection between the target device and Qt Creator to run, debug, and analyze applications on it. The sections below describe how to set up a device using either USB, Ethernet, or Wi-Fi connectivity.

Connecting the target 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 Devices in Qt Creator.

Connecting the target device via Ethernet or Wi-Fi

Connect your target device to network either via Ethernet or Wi-Fi connectivity.

To connect via Ethernet, use the Ethernet port. To connect via Wi-Fi, set up a Wi-Fi connection from Qt Demo Launcher.

After your target device is connected and has an IP address, set it up to be used in 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 > Remote Linux Device > Start Wizard.
  4. In the New Remote Linux Device Configuration Setup window:
    1. Enter the name to identify this configuration.
    2. Enter the device's host name or IP address.
    3. Enter root as user name.
    4. Select Next.
  5. On the Devices tab, select OK.

New Remote Linux Device Configuration Setup view in Qt Creator.

Note: Qt Creator uploads the application over the IP network, so your target device has to be in the same network as your development host.

Creating an application UI in Qt Design Studio

Create a cross-platform UI with Qt Design Studio, also for embedded Linux applications, with the following steps:

  1. Open Qt Design Studio.
  2. Select Create Project.
  3. In Presets, select General.
    • Name your project. Pay attention to the project path—later on, you open your project from this location with Qt Creator.
    • Adjust display resolution and orientation to suit your display.
  4. Select Enable CMake Generator. With the resulting CMakeLists.txt file, you can open your project in Qt Creator.
  5. Make sure your Target Qt Version matches the version of Qt installed on your machine.
  6. Select Create.

New Project UI view in Qt Design Studio.

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

Configuring and building an application in Qt Creator

To configure and build an application in Qt Creator, follow these steps:

  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 STMicroelectronics MPU device kit.
    2. Select Configure Project.

Configure Project UI view in Qt Creator.

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

Running an application on the target device

After setting up your device, you can upload and start your application on the STMicroelectronics MPU device as follows:

  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.

Run Settings UI view in Qt Creator.

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

For more information on how to deploy Qt projects to the device, see Tutorial: Deploying your first project.

For more information on how to build applications on Docker devices, see Build on Docker devices.

Debugging an application

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

Troubleshooting

If you have any issues with your STMicroelectronics MPU device, such as how to set up boot switches or connect the debug terminal, turn to ST Community for more information.

For more information on troubleshooting Qt Onboard, see Troubleshooting.

Available under certain Qt licenses.
Find out more.