2019-10-11 15:02:52 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2020-11-09 11:29:11 +01:00
|
|
|
** Copyright (C) 2020 The Qt Company Ltd.
|
2019-10-11 15:02:52 +02:00
|
|
|
** Contact: https://www.qt.io/licensing/
|
|
|
|
|
**
|
|
|
|
|
** This file is part of the Qt Creator documentation.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
**
|
|
|
|
|
** GNU Free Documentation License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Free
|
|
|
|
|
** Documentation License version 1.3 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file included in the packaging of
|
|
|
|
|
** this file. Please review the following information to ensure
|
|
|
|
|
** the GNU Free Documentation License version 1.3 requirements
|
|
|
|
|
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
\previouspage creator-developing-ios.html
|
|
|
|
|
\page creator-developing-mcu.html
|
|
|
|
|
\nextpage creator-developing-qnx.html
|
|
|
|
|
|
|
|
|
|
\title Connecting MCUs
|
|
|
|
|
|
2019-12-17 16:23:09 +01:00
|
|
|
Qt for MCU enables you to use subsets of QML and Qt Quick Controls
|
2019-10-11 15:02:52 +02:00
|
|
|
to create user interfaces for devices that are powered by microcontroller
|
|
|
|
|
units (MCU). It includes a new graphics rendering engine that has a low
|
|
|
|
|
memory footprint and is optimized for MCUs and other resource-constrained
|
|
|
|
|
devices.
|
|
|
|
|
|
|
|
|
|
You can connect MCU boards to a development host to build applications for
|
|
|
|
|
them using the GNU Arm Embedded GCC compiler, libraries, and other GNU tools
|
|
|
|
|
necessary for bare metal software development on devices based on the Arm
|
|
|
|
|
Cortex-M processors. You can deploy the applications on MCUs to run and
|
|
|
|
|
debug them using \QC.
|
|
|
|
|
|
|
|
|
|
The toolchains are available for cross-compilation on Microsoft Windows,
|
2019-10-23 17:22:05 +02:00
|
|
|
Linux, and macOS. However, the Qt for MCU SDK is currently only available
|
|
|
|
|
for Windows.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
2020-03-30 00:19:33 +02:00
|
|
|
For a list of Qt for MCU reference implementations, see the
|
|
|
|
|
\l{Qt for MCUs - Supported Target Platforms}{Qt for MCUs} documentation.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
|
|
|
|
\section1 Requirements
|
|
|
|
|
|
|
|
|
|
To use \QC to develop QML applications for MCUs, you need the following:
|
|
|
|
|
|
|
|
|
|
\list
|
2019-10-23 17:22:05 +02:00
|
|
|
\li Qt for MCU SDK (only available for Windows)
|
|
|
|
|
\li \l{https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm}
|
|
|
|
|
{GNU ARM Embedded Toolchain}
|
2019-10-11 15:02:52 +02:00
|
|
|
\endlist
|
|
|
|
|
|
2020-06-29 10:58:04 +02:00
|
|
|
The hardware-specific requirements vary depending on the hardware platform you are developing for.
|
|
|
|
|
For more information see:
|
|
|
|
|
\list
|
|
|
|
|
\li \l{Getting Started on NXP}
|
|
|
|
|
\li \l{Getting Started on STM}
|
|
|
|
|
\li \l{Getting Started on Renesas}
|
|
|
|
|
\endlist
|
|
|
|
|
|
2019-10-11 15:02:52 +02:00
|
|
|
\section1 Setting Up the Development Environment
|
|
|
|
|
|
|
|
|
|
You must download and install the required software and create connections
|
2020-06-29 10:58:04 +02:00
|
|
|
between \QC and MCUs. The following subsections guide you through the
|
|
|
|
|
setup process.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
2020-08-27 09:16:02 +02:00
|
|
|
\section2 MCU Plugin
|
2019-10-11 15:02:52 +02:00
|
|
|
|
2020-08-27 09:16:02 +02:00
|
|
|
To be able to develop applications for MCUs, you need the MCU plugin.
|
2020-11-09 11:29:11 +01:00
|
|
|
This plugin is enabled automatically by the Qt Installer when you
|
|
|
|
|
install Qt for MCUs.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
|
|
|
|
\section2 Specifying MCU Settings
|
|
|
|
|
|
|
|
|
|
To configure a connection between \QC and your MCU board, select
|
|
|
|
|
\uicontrol Tools > \uicontrol Options > \uicontrol Devices >
|
|
|
|
|
\uicontrol MCU:
|
|
|
|
|
|
|
|
|
|
\image qtcreator-mcu-options.png "MCU options"
|
|
|
|
|
|
|
|
|
|
\list 1
|
2020-03-30 00:19:33 +02:00
|
|
|
\li In the \uicontrol {Qt for MCUs SDK} field, specify the path
|
|
|
|
|
to the directory where you installed Qt for MCUs SDK.
|
|
|
|
|
\li In the \uicontrol {Targets supported by the Qt for MCUs SDK}
|
|
|
|
|
field, select your MCU board.
|
2020-06-29 10:58:04 +02:00
|
|
|
\li In the \uicontrol Requirements section, ensure that the
|
|
|
|
|
platform-specific requirements are met. This varies depending
|
|
|
|
|
on the target chosen:
|
2019-10-11 15:02:52 +02:00
|
|
|
\list
|
2020-06-29 10:58:04 +02:00
|
|
|
\li For STM32 targets:
|
|
|
|
|
\list
|
2020-12-11 10:47:25 +01:00
|
|
|
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
|
|
|
|
\uicontrol {IAR ARM Compiler} path.
|
2020-06-29 10:58:04 +02:00
|
|
|
\li The \uicontrol {STM32CubeProgrammer} install path.
|
2020-08-28 12:30:06 +02:00
|
|
|
\li The \uicontrol {MCU SDK} for the chosen target.
|
2020-09-01 23:47:10 +02:00
|
|
|
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
2020-06-29 10:58:04 +02:00
|
|
|
\endlist
|
|
|
|
|
\li For NXP targets:
|
|
|
|
|
\list
|
2020-12-11 10:47:25 +01:00
|
|
|
\li The \uicontrol {GNU ARM Embedded Toolchain} or
|
|
|
|
|
\uicontrol {IAR ARM Compiler} path.
|
2020-06-29 10:58:04 +02:00
|
|
|
\li The \uicontrol {MCUXpresso IDE} install path.
|
2020-08-28 12:30:06 +02:00
|
|
|
\li The \uicontrol {MCU SDK} for the chosen target.
|
|
|
|
|
\li The \uicontrol {FreeRTOS Sources} for the chosen target.
|
2020-06-29 10:58:04 +02:00
|
|
|
\endlist
|
|
|
|
|
\li For Renesas targets:
|
|
|
|
|
\list
|
|
|
|
|
\li The \uicontrol {Green Hills Compiler} path.
|
|
|
|
|
\li The \uicontrol {Renesas Graphics Library} path.
|
|
|
|
|
\endlist
|
2019-10-11 15:02:52 +02:00
|
|
|
\endlist
|
2020-12-11 10:47:25 +01:00
|
|
|
\li Select the
|
|
|
|
|
\uicontrol {Automatically create kits for all available targets on start}
|
|
|
|
|
option to create kits automatically.
|
|
|
|
|
\note You could also use \uicontrol {Create Kit} or
|
|
|
|
|
\uicontrol{Remove Kit} to manually create or remove kits for the chosen
|
|
|
|
|
target.
|
2020-06-29 10:58:04 +02:00
|
|
|
\li Select \uicontrol Apply to save the settings.
|
2019-10-11 15:02:52 +02:00
|
|
|
\endlist
|
2020-12-11 10:47:25 +01:00
|
|
|
\note You must restart \QC if you chose to create kits automatically
|
|
|
|
|
for all the available targets.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
|
|
|
|
\section2 Adding MCU Devices
|
|
|
|
|
|
2020-05-29 14:30:23 +02:00
|
|
|
\note This optional step is not necessary if you have already
|
|
|
|
|
set up the MCU SDK as outlined in \l{Specifying MCU Settings}.
|
|
|
|
|
|
2019-10-11 15:02:52 +02:00
|
|
|
\QC automatically adds a default MCU device when you select
|
|
|
|
|
\uicontrol Apply in the \uicontrol MCU tab after configuring the
|
|
|
|
|
MCU tool chain.
|
|
|
|
|
|
|
|
|
|
\image qtcreator-mcu-device.png "MCU devices"
|
|
|
|
|
|
|
|
|
|
To add MCU devices, select \uicontrol Tools > \uicontrol Options >
|
|
|
|
|
\uicontrol Devices > \uicontrol Add > \uicontrol {MCU Device} >
|
|
|
|
|
\uicontrol {Start Wizard}:
|
|
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
\li In the \uicontrol Name field, give the device a name.
|
|
|
|
|
\li In the \uicontrol Type field, select the board type.
|
|
|
|
|
\li Select \uicontrol Apply to add the device.
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
\section2 Adding MCU Kits
|
|
|
|
|
|
2020-05-29 14:30:23 +02:00
|
|
|
\note This optional step is not necessary if you have already
|
|
|
|
|
set up the MCU SDK as outlined in \l{Specifying MCU Settings}.
|
|
|
|
|
|
2020-12-11 10:47:25 +01:00
|
|
|
\QC automatically adds kits for all the available targets, if
|
|
|
|
|
the
|
|
|
|
|
\uicontrol {Automatically create kits for all available targets on start}
|
|
|
|
|
option is enabled under the \uicontrol MCU settings tab.
|
2019-10-11 15:02:52 +02:00
|
|
|
|
|
|
|
|
\image qtcreator-mcu-kit.png "MCU kits"
|
|
|
|
|
|
|
|
|
|
To add kits, select \uicontrol Tools > \uicontrol Options > \uicontrol Kits
|
|
|
|
|
> \uicontrol Add:
|
|
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
\li In the \uicontrol Name field, specify a name for the kit.
|
|
|
|
|
\li In the \uicontrol {Device type} field, select
|
|
|
|
|
\uicontrol {MCU}.
|
|
|
|
|
\li In the \uicontrol Device field, select the MCU board for the kit.
|
|
|
|
|
\li In the \uicontrol Compiler field, select the Arm GCC compiler for
|
|
|
|
|
the kit.
|
|
|
|
|
\li Select \uicontrol Apply to add the kit.
|
|
|
|
|
\endlist
|
|
|
|
|
|
|
|
|
|
\section1 Running Applications on MCUs
|
|
|
|
|
|
|
|
|
|
You can use a wizard to set up a project for developing an application that
|
|
|
|
|
you can run on MCUs. The project uses a subset of QML and Qt Quick Controls
|
2019-10-23 17:22:05 +02:00
|
|
|
that are supported by Qt for MCU. For more information about developing
|
2019-10-11 15:02:52 +02:00
|
|
|
applications for MCUs, see the Qt for MCU documentation.
|
|
|
|
|
|
|
|
|
|
To create an application and run it on a MCU board:
|
|
|
|
|
|
|
|
|
|
\list 1
|
|
|
|
|
\li Select \uicontrol File > \uicontrol {New File or Project} >
|
2020-04-28 13:01:42 +02:00
|
|
|
\uicontrol {Application (Qt for MCU)} >
|
2020-04-03 16:28:42 +02:00
|
|
|
\uicontrol {MCU Support Application} > \uicontrol Choose.
|
2019-10-11 15:02:52 +02:00
|
|
|
\li Follow the instructions of the wizard to create the project.
|
|
|
|
|
\li Select \uicontrol Projects > \uicontrol {Build & Run}, and then
|
|
|
|
|
select the kit for building the application and running it on the
|
|
|
|
|
MCU board specified in the kit.
|
|
|
|
|
\li Select \uicontrol Run to specify run settings.
|
|
|
|
|
Usually, you can use the default settings.
|
|
|
|
|
\endlist
|
|
|
|
|
*/
|