Overview of the possibilities of Qt Creator 4.12 and QBS 1.16 for programming microcontrollers

Hello, fellow programmers, hardware and all who sympathize with them. I would like to continue to review the capabilities of the Qt Creator IDE in conjunction with the QBS build system regarding microcontroller programming.

Earlier, I wrote about improvements in previous versions of QtC 4.10 and QBS 1.14 , QtC 4.11 and QBS 1.15 .

To whom this topic is interesting, welcome to cat.

Just the other day, quietly and imperceptibly, the Qt Creator 4.12 release was released , which added some improvements for working with microcontrollers (in common people - “baremetal” devices). This release of Qt Creator integrates the QBS 1.16 build system , which also has new improvements.

Improvements in Qt Creator



  1. Integration with Keil MDK is added.

    The main new improvement is integration with the debugger from Keil MDK v5 . Keil provides a UVSC proprietary interface for integrating the debugger with third-party client applications. As a layer, they provide a dynamic library (which comes with Keil itself) and an API description for it.

    Work with this debugger is available only when the BareMetal plugin is enabled, which is activated through the menu "Help -> About Plugins -> Device Support -> BareMetal".

    The following debuggers are currently supported:
    DebuggerArchitectureDescription
    SimulatorARMAllows you to simulate the operation of the MCU in the absence of a hardware debugger.
    ST-LinkARMAllows you to debug target MCUs from STMicroelectronics.


    The following microcontrollers are currently supported:
    MCUArchitectureNote
    STM32 by STMicroelectronicsARMAt least it works exactly with the STM32F1x and STM32F4x.

    Now the Keil debugger is automatically detected on the tab "Tools -> Options -> Kits -> Debugegrs -> Auto-detected".

    For example, for me it looks like this:



    So, the basic steps to configure the kit for compilation and debugging by the Keil toolkit are as follows:

    1. Creation of a new bare-metal device.

      Start creating a new device in "Tools -> Options -> Devices -> Add -> Bare Metal Device" and set any name for this device (let it be stm32f4), and leave the debug server provider field “None”:


    2. .

      «Manage» :



      «Add» «UVision ST-Link»:



      , 'tools.ini', Keil:



      : Keil-, , .

      , , , «Target device -> Manage»:



      ( STM32F407 STM32F4DISCOVERY):



      : Keil «DFP» PackInstaller.

      , , «Target driver -> Manage»:



      «ST-Link Debugger»:



      :


    3. .

      «Tools -> Options -> Kits -> Add» (C C++), . , Qt «None»:



    Now you can compile and debug projects using QBS (as you know, at the moment all this is “tailored” specifically for QBS).

    For example, you can open the finished QBS example for STM32F4DISCOVERY and blink the LED.



    What is supported:

    • Start / stop the debugger.
    • Debugging Steps Step-in / out / over / instruction.
    • Display and edit local variables.
    • Display and editing variables in the Watch window.
    • Stack tracking.
    • Display and edit standard registers (not peripheral).
    • Setting breakpoints.

    What else is NOT supported:

    • View / edit memory.
    • Display and edit peripheral registers.

    What are the errors:

    • : , 10 , «» Qt Creator. UVSC. ( , ) Qt Creator.
    • 'main' (, .). UVSC.
    • ( ). UVSC.
    • 'step-into' 'step-over' 'main' : . 'main' Qt Creator 'step-instruction', . UVSC.
    • . UVSC.

    More information about the current state can be found here .

    Note: Naturally, I wrote about these errors found in UVSC in support of Keil, but they ignore all this, because I am using the "evaluation" version of Keil. They say that, sorry, buy and then we'll talk. But this is nonsense! Why should I buy obviously non-working software!

    Of course, do not judge strictly, this is just the first step ... As they say: dashing trouble began.

  2. Added new debuggers for GDB

    Added support for the following new debuggers:
    DebuggerA type
    Segger j-linkGdb
    EBLinkGdb


    I will not describe their settings in detail here, because everything is simple there.

Improvements in QBS


As for the programming of microcontrollers, I will say that support and auto-detection of new architectures from Renesas for IAR EW has been added.

The qbs.architecture property has the following new values:

Architecture nameProperty value
Renesas V850v850
Renesas 78K78k
Renesas RL78rl78
Renesas rxrx
Renesas RH850rh850

What's next


In future versions, QBS plans to add C251, C166 architectures for Keil, and for Qt Creator new debuggers and support for new microcontrollers for Keil.

On this note, I end my story, thank you all who will pay attention to this review.

All Articles