![](https://csdnimg.cn/release/download_crawler_static/10008546/bg11.jpg)
DocID025776 Rev 16 17/255
UM1718 Getting started with STM32CubeMX
254
2.2 Key features
STM32CubeMX comes with the following features:
• Project management
STM32CubeMX allows creating, saving and loading previously saved projects:
– When STM32CubeMX is launched, the user can choose to create a new project or
to load a previously saved project.
– Saving the project saves user settings and configuration performed within the
project in an .ioc file that will be used the next time the project will be loaded in
STM32CubeMX.
STM32CubeMX also allows importing previously saved projects in new projects.
STM32CubeMX projects come in two flavors:
– MCU configuration only: .ioc file are saved anywhere, next to other .ioc files.
– MCU configuration with C code generation: in this case .ioc files are saved in a
dedicated project folder along with the generated source C code. There can be
only one .ioc file per project.
• Easy MCU and STMicroelectronics board selection
When starting a new project, a dedicated window opens to select either a
microcontroller or an STMicroelectronics board from STM32 portfolio. Different filtering
options are available to ease the MCU and board selection.
• Easy pinout configuration
– From the Pinout view, the user can select the peripherals from a list and configure
the peripheral modes required for the application. STM32CubeMX assigns and
configures the pins accordingly.
– For more advanced users, it is also possible to directly map a peripheral function
to a physical pin using the Chip view. The signals can be locked on pins to prevent
STM32CubeMX conflict solver from moving the signal to another pin.
– Pinout configuration can be exported as a .csv file.
• Complete project generation
The project generation includes pinout, firmware and middleware initialization C code
for a set of IDEs. It is based on STM32Cube embedded software libraries. The
following actions can be performed:
– Starting from the previously defined pinout, the user can proceed with the
configuration of middleware, clock tree, services (RNG, CRC, etc...) and
peripheral parameters. STM32CubeMX generates the corresponding initialization
C code. The result is a project directory including generated main.c file and C
header files for configuration and initialization, plus a copy of the necessary HAL
and middleware libraries as well as specific files for the selected IDE.
– The user can modify the generated source files by adding user-defined C code in
user dedicated sections. STM32CubeMX ensures that the user C code is
preserved upon next C code generation (the user C code is commented if it is no
longer relevant for the current configuration).
– STM32CubeMX can generate user files by using user-defined freemarker .ftl
template files.
– From the Project settings menu, the user can select the development tool chain
(IDE) for which the C code has to be generated. STM32CubeMX ensures that the
IDE relevant project files are added to the project folder so that the project can be