// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-developing-mcu.html
    \previouspage creator-reference.html

    \ingroup creator-reference-devices

    \title Developing for MCUs

    \brief Connect MCU devices to the computer to run and debug applications on
    them.

    \note Before you start developing for MCUs, go to \uicontrol Help >
    \uicontrol {About Plugins}, and make sure you have the \uicontrol {Qt for MCUs}
    plugin enabled.

    Use subsets of QML and Qt Quick Controls to create user interfaces for
    devices that are powered by microcontroller units (MCU). \QMCU has a
    new graphics rendering engine with a low memory footprint and optimization
    for MCUs and other resource-constrained devices.

    Connect MCU boards to a computer to build applications for them. Deploy the
    applications on MCUs to run and debug them.

    For a list of \QMCU reference implementations, see
    \l{\QMCU - Supported target platforms}.

    \section1 Requirements

    To use \QC to develop QML applications for MCUs, you need the following:

    \list
        \li \QMCU SDK (only available for Windows and Linux)
        \li \l {\QMCU - Prerequisites}{Suitable toolchain}
    \endlist

    The toolchains are available for cross-compilation on Microsoft Windows,
    Linux, and macOS. However, the Qt for \QMCU SDK is currently only available
    for Windows and Linux.

    The hardware-specific requirements vary depending on the hardware platform
    you are developing for. For more information, see:

    \list
        \li \l{Getting started on Espressif}
        \li \l{Getting started on Infineon}
        \li Getting started on NXP
        \list
            \li \l {Getting started on NXP (BareMetal and FreeRTOS)}
            \li \l {Getting started on NXP (Linux)}
            \li \l {Getting started on NXP (Zephyr)}
        \endlist
        \li \l{Getting started on Renesas}
        \li \l{Getting started on STM}
    \endlist


    \section1 \QMCU SDKs

    While you can use the latest \QC version to develop with any \QMCU SDK, the
    following combinations have been tested to work well.

    \table
    \header
        \li \QC version
        \li \QMCU SDK version
    \row
        \li 18.0.0 or later
        \li 2.12 or later
    \row
        \li 17.0.0
        \li 2.11
    \row
        \li 16.0.0
        \li 2.10
    \row
        \li 15.0.0
        \li 2.9
    \row
        \li 13.0.2
        \li 2.8
    \row
        \li 12.0.2
        \li 2.7
    \row
        \li 11.0.3
        \li 2.6
    \row
        \li 10.0.2
        \li 2.5
    \row
        \li 10.0.0
        \li 2.4
    \row
        \li 9.0.0
        \li 2.3
    \row
        \li 7.0.0 up to 8.0.2
        \li 2.0 up to 2.2
    \row
        \li 6.0.x
        \li 1.3 up to 2.2
    \row
        \li 4.12.4 up to 5.0.3
        \li 1.3 up to 1.9
    \row
        \li 4.12.2 or 4.12.3
        \li 1.2
    \row
        \li 4.12.0 or 4.12.1
        \li 1.1
    \row
        \li 4.11.x
        \li 1.0
    \endtable

    \sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs}, {\QMCU}
*/

/*!
    \page creator-how-to-add-mcu-kits.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-mcu
    \ingroup creator-how-to-sdks

    \title Add MCU SDKs

    \note Before you start developing for MCUs, go to \uicontrol Help >
    \uicontrol {About Plugins}, and make sure you have the \uicontrol {Qt for MCUs}
    plugin enabled.

    To configure a connection between \QC and your MCU board:

    \list 1
        \li Go to \preferences > \uicontrol SDKs > \uicontrol MCU.
        \li In \uicontrol {\QMCU SDK}, specify the path to the directory where
            you installed \QMCU SDK.
            \image {qtcreator-preferences-mcu.webp} {MCU tab in SDKs preferences}
        \li In \uicontrol {Targets supported by the \QMCU SDK}, select your MCU
            board.
        \li In \uicontrol Requirements, check that the platform-specific
            requirements are met. This depends on the target:
            \list
                \li For Infineon targets:
                    \list
                        \li The \uicontrol {Green Hills Compiler for ARM} or
                            \uicontrol {IAR ARM Compiler} path.
                        \li The \uicontrol {Graphics Driver for Traveo T2G Cluster Series}
                            path.
                        \li The \uicontrol {Infineon Auto Flash Utility} path.
                    \endlist
                \li For NXP targets:
                    \list
                        \li The \uicontrol {GNU ARM Embedded Toolchain} or
                            \uicontrol {IAR ARM Compiler} path.
                        \li The \uicontrol {MCUXpresso IDE} install path.
                        \li The \uicontrol {Board SDK} for the chosen target.
                        \li The \uicontrol {FreeRTOS Sources} for the chosen target.
                    \endlist
                \li For Renesas targets:
                    \list
                        \li The \uicontrol {Green Hills Compiler} path.
                        \li The \uicontrol {Renesas Graphics Library} path.
                        \li The \uicontrol {Renesas Flash Programmer} path (optional).
                    \endlist
                \li For STM32 targets:
                    \list
                        \li The \uicontrol {GNU ARM Embedded Toolchain} or
                            \uicontrol {IAR ARM Compiler} path.
                        \li The \uicontrol {STM32CubeProgrammer} install path.
                        \li The \uicontrol {Board SDK} for the chosen target.
                        \li The \uicontrol {FreeRTOS Sources} for the chosen target.
                    \endlist
            \endlist
        \li Select
            \uicontrol {Automatically create kits for all available targets on start}
            to create kits automatically the next time \QC starts.
            \note Select \uicontrol {Create Kit} to manually create kits for the
            target.
        \li Select \uicontrol Apply to save the preferences.
    \endlist

    \sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs},
    {Developing for MCUs}
*/

/*!
    \page creator-how-to-add-mcu-devices.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-mcu

    \title Add MCU devices

    \note Before you start developing for MCUs, go to \uicontrol Help >
    \uicontrol {About Plugins}, and make sure you have the \uicontrol {Qt for MCUs}
    plugin enabled.

    \QC automatically adds a default MCU device when you select
    \uicontrol Apply in \preferences > \uicontrol SDKs > \uicontrol MCU after
    adding an SDK.

    \image {qtcreator-mcu-device.webp} {MCU device in the Devices tab in Devices preferences}

    To add MCU devices, go to \preferences > \uicontrol Devices > \uicontrol Add
    > \uicontrol {Start Wizard to Add Device} > \uicontrol {MCU Device}:


       \list 1
           \li In \uicontrol Name, give the device a name.
           \li Select \uicontrol Apply to add the device.
       \endlist

    \sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs},
    {Developing for MCUs}
*/

/*!
    \page creator-how-to-manage-mcu-kits.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-mcu
    \ingroup creator-how-to-manage-kits

    \title Manage MCU kits

    \note Before you start developing for MCUs, go to \uicontrol Help >
    \uicontrol {About Plugins}, and make sure you have the \uicontrol {Qt for MCUs}
    plugin enabled.

    \QC automatically adds kits for all the available MCU targets if you select
    \uicontrol {Automatically create kits for all available targets on start}
    in \preferences > \uicontrol SDKs > \uicontrol MCU. This setting is selected
    by default.

    \image {qtcreator-mcu-new-kit.webp} {Automatically create MCU kits in the MCU tab in SDKs preferences}

    \note When you update the \QMCU SDK, \QC asks you whether you want to replace
    the existing kits or create additional kits. To do this manually for each
    target, select \uicontrol {Update Kit} or \uicontrol {Create Kit}.

    To add new kits, go to \preferences > \uicontrol SDKs > \uicontrol MCU,
    and select \uicontrol {Create Kit}. This adds the paths to the kit's toolkits
    and SDKs, and keeps them synchronized when you select \uicontrol Apply or
    \uicontrol OK.

    \section1 Change or remove MCU kits

    To change or remove individual kits, go to \preferences > \uicontrol Kits.

    \image {qtcreator-preferences-kits-mcu.webp} {MCU kit in the Kits tab in Kits preferences}

    \note When working with \QMCU releases prior to \QMCU 2.0, the
    \uicontrol {MCU Dependencies} filter can be used to display paths to 3rd
    party software needed for MCU development with the selected kit.

    \sa {Enable and disable plugins}, {MCUs}{How To: Develop for MCUs},
    {Manage Kits}{How To: Manage Kits}, {Developing for MCUs}
*/

/*!
    \page creator-how-to-run-on-mcu-devices.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-mcu

    \title Create MCU projects

    \note Before you start developing for MCUs, go to \uicontrol Help >
    \uicontrol {About Plugins}, and make sure you have the \uicontrol {Qt for MCUs}
    plugin enabled.

    Create a project for developing an application that you can run on MCUs.
    The project imports a subset of QML and Qt Quick Controls types
    that are supported by \QMCU. For more information about developing
    applications for MCUs, see \l {Qt for MCUs}.

    To create an application and run it on a MCU board:

    \list 1
        \li Go to \uicontrol File > \uicontrol {New Project}.
            \image {qtcreator-mcu-new-project.webp} {New Project dialog}
        \li Select \uicontrol {QmlProject Application (\QMCU)} >
            \uicontrol {Qt for MCUs Empty Application} or
            \uicontrol {Qt for MCUs Example Application} > \uicontrol Choose.
        \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 Go to \uicontrol {Run Settings} to specify run settings.
            Usually, you can use the default settings.
    \endlist

    \sa {Configure projects for running}, {Enable and disable plugins},
    {MCUs}{How To: Develop for MCUs}, {Use project wizards},
    {Developing for MCUs}
*/
