MCU Treadmill

{MCU Treadmill overview}

MCU Treadmill is designed in Figma. You can bring the design to Qt Design Studio and create a responsive MCU Treadmill application.

You should have these prerequisites available:

  • Qt Design Studio Enterprise license.
  • Qt Design Studio 4.7 or above.

Getting the MCU Treadmill design to Figma

  1. Get the optimized MCU Treadmill for Figma design from here.
  2. Go to Figma and log in.
  3. Open the downloaded MCU Treadmill design in Figma.

Importing the MCU Treadmill design from Figma

To import the MCU Treadmill design for Qt Design Studio, first set up Qt Bridge for Figma.

  1. Select the MCU Trademill project in Figma.
  2. Select Main Menu > Plugins > Qt Bridge for Figma.

    {\QBF plugin}.

  3. Select Export, then Save. By default, the .qtbridge file is saved as mcuDemo.qtbridge.

    {Export Figma design with \QBF}

  4. Select Close, then exit Figma.

Getting the MCU Treadmill design in Qt Design Studio

After importing the MCU Treadmill design from Figma:

  1. Create a new Qt Design Studio project for MCU.

    {Create new MCU project in \QDS}

  2. Drag the .qtbridge file (mcuDemo.qtbridge) to the 2D view.

    {Qt Bridge asset import warning in \QDS}

  3. Select Yes, then select Import.

    {Qt Bridge asset import in \QDS}

  4. In the following notification, select No. This replaces the existing Screen01.ui.qml file with the imported file.

    {Import file conflict notifcation}

  5. After a successful import, select Close.

Note: Install this font on your system to match the font used in the Figma design.

With the design in place, you can now add desired functionalities to the imported components with connection, state, timeline animation, QML, and Javascript. Find a fully functional example in the Examples section on the Qt Design Studio homepage.

Running the MCU Treadmill example in Qt Design Studio

  1. Open Qt Design Studio, then select Examples.
  2. Download the MCU Treadmill example.
  3. Select the downloaded project to open it in Qt Design Studio.
  4. Select Run App, then select the Run Project button .

    {MCU Treadmill demo running}

To find the logic and animations of this example, check these files in the Code view:

File nameDescription
SplashScreen.ui.qmlDefines the home screen animation of the MCU Treadmill example.
TrackView.ui.qmlDefines the track animation of the MCU Treadmill example.
TreadmillMcuDemo.qmlDefines the logical functionalities of the MCU Treadmill example.

Running the MCU Treadmill example in Qt Creator or on MCUs

Note: This instruction set should work on all MCUs. For this particular example we are using an STM board.

To run the MCU Treadmill in Qt Creator, first you need to:

  1. Install Qt Creator. Learn to install Qt Creator.
  2. Install the latest Qt for MCUs. Learn to install Qt for MCUs.
  3. Install the board-specific files:
    1. Open MaintenanceTool.exe in the Qt installation folder.

      {MaintenanceTool.exe in the Qt installation folder}

    2. Log in with your Qt account and proceed.
    3. Select Add or remove components, then select Next.
    4. Select the Run button next to the Qt for MCUs option to expand the list related to Qt for MCUs.
    5. Then select the Run button next to the Qt for MCUs version you want to install.
    6. Select Common Files and your STM board library. For this example, you can choose STM32F769I Discovery if that STM board is available to you.

      {MCU kits in Qt Maintenance tool}

    7. Then, select the Run button next to the Third-party Tools and SDKs. From the list, matching your STM board, select the latest version of:
      • ARM GCC
      • STM Cube Programmer
      • STM32Cube

      {Thrid party tools in Qt Maintenance tool}

    8. Select Next, and then Update.
    9. After the update, select Finish.

    Learn more about supported target boards and development hosts.

When you have all the necessary STM board and MCU kit-related files installed in Qt, you are ready to configure Qt Creator to run the Qt Design Studio application on the STM board. To learn how to configure Qt Creator for your STM board, see Getting started on STM.

After configuring Qt Creator for the STM board, you can run your Qt Design Studio application from Qt Creator.

To run your Qt Design Studio application from Qt Creator:

  1. Open Qt Creator and select Open Project....
  2. Browse to your Qt Design Studio project folder, select CMakeLists.txt, then select Open. This contains all the necessary code that Qt Creator needs to build and run your project.

    {Opening CMakeLists file from Qt Creator}

  3. After Qt Creator finishes loading your project, select Projects. Under the Build & Run options, double-click the MCU kit you want to use to run this application. To run it as a desktop application from Qt Creator, select the desktop kit for MCU. To run it on your preferred STM board, select the STM kit.

    {Building MCU kits in Qt Creator}

    Note: Double-clicking starts to build the kit for Qt Creator. Later, you can access these kits from the Kit Selector above the the Run Project button button. You can check the General Messages at the bottom bar of Qt Creator to see if anything went wrong during the build process.

  4. If you have selected the desktop version of the MCU kit, select the Run Project button . If you have selected the STM board version of the MCU kit, skip to the next step.
  5. Connect the STM board to your computer.
  6. Optional. Select the Build icon to build your application. It helps you to see if the project has any issues, and you can fix those before running the application.
  7. To run the application on your STM board, select Run. This can take a while, depending on your project's size, the capability of the MCU, and the transfer speed. You can open Application Output from the bottom bar of Qt Creator to check the progress.

    To learn more about running an application in Qt Creator, see here.

    Note: Before running you can select Kit Selector above the the Run Project button button, then select the MCU kit for your STM board from there, and select Minimum Size Release. This optimizes your application's file sizes before pushing them to your STM board.
    Qt Creator debug with STM minimize size release option for MCU application

Available under certain Qt licenses.
Find out more.