Deploy STM32 on QtCreator

Although there are variety number of pre-configured IDEs available to be used to deploy and develop STM32 applications, you can still configure and use your own tools if you desire. In this post I will show you how to configure and run an integrated development environment based on GCC, OpenOCD, Qtcreator, STM32CubeMX and a script used to generate makefile.

Prepare requirements

Before going any further, you must install applications mentioned above. So use internal package manager of your Linux distrobution to install arm-none-eabi toolchain (gcc,gdb,newlib) and OpenOCD and also QtCreator.

Then download STM32CubeMX and install required libraries of your microcontroller (which CubeMX will guide you through that when necessary ).

Also download this script which we will use to generate makefile based on created projects using CubeMX.

Setting Up QtCreator for STM32 development

Watch this video. It will guide you through this process.

If your board is not listed in the target scripts

When configuring OpenOCD at Options > Devices > Bare Metal, select your programmer interface .cfg for Configuration file field, like mine is stlink-v2.1


Then inside Additional argguments field, enter -f followed by your microcontroller configuration from target directory, like this:

-f /usr/share/openocd/scripts/target/stm32f4x.cfg

An example of usage

In this video we are going to debug and read values of a array. Our board NucleoF411RE is connected to the computer.

comments powered by Disqus