Article by:
Date Published:
Last Modified:


STM32CubeIDE is an IDE from STMicroelectronics specifically for the STM32 range of microcontrollers. It supports firmware development in C or C++. It integrates with STM32Cube.

The STM32CubeIDE logo.

The STM32CubeIDE logo.


The installer is approx. 685MiB.

Default directories (examples below shown for v1.3.0):

Windows Installation: C:\ST\STM32CubeIDE_1.3.0

All OSes Workspace: <user home directory>/STM32CubeIDE/workspace_1.3.0 STM32Cube Repository: <user home directory>/STM32Cube/Repository

SEGGER J-Link drivers, ST_LINK drivers and ST_LINK server software is provided with the installation.

Default File Structure

  |-- Core
  |   |-- Inc                    Contains the user header files.
  |   |-- Src                    Contains the user source code.
  |   |-- Startup
  |-- Debug                     Default directory for debug build artifacts.
  |-- Drivers
  |-- .cproject
  |-- .mxproject
  |-- .project       
  |-- <project_name>.ioc        Contains the pinout and hardware configuration of the micro.
  |-- <micro_name>_FLASH.ld     This is the linker script for the micro.

The .ioc File

The .ioc file contains information about the target microcontroller and the hardware configuration for your project.

A screenshot of the 'Pinout & Configuration' view of the .ioc file in STM32CubeIDE.

A screenshot of the ‘Pinout & Configuration’ view of the .ioc file in STM32CubeIDE.

Enabling peripherals via the .ioc file generates MX_<peripheral_name>_Init() functions in the main.c file. HAL driver files are also provided for peripherals. They are written in a object-orientated way (e.g. every UART related HAL function which take a pointer to the UART object as it’s first parameter).

Git Ignore File


C++ Projects

Confusingly, even if you specify the project as a “C++ Project” when creating it, you will be presented with main.c file. You can rename this to main.cpp to begin using C++ (this will cause arm-none-eabi-g++ to be called on main.cpp rather than arm-none-eabi-gcc, which will allow you to include C++ code).

The linker is called correctly regardless of the extension of mainarm-none-eabi-g++ will be called during the linking step.

However, when you change the peripheral configurations using the .ioc file and re-generate code, it will also recreate the main.c.


A screenshot of the STM32CubeMonitor application running on Windows.

A screenshot of the STM32CubeMonitor application running on Windows.


Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Related Content:


comments powered by Disqus