Main advantages of cubeMX:
1. Select STM32 intuitively. Graphic configuration. 3.c code engineering generation, covering STM32 initialization. Compatible with IAR, KEIL and GCC compilers. 4. Support Eclips.
2. Download the software package and cube library from ST official website and install them. The installation process is relatively simple, so I won't go into details.
3. Click "New Project" to create a new project or file-> New projects will do.
4. The following is the choice of device board, which can be selected according to the model of MCU or board.
5. The commonly used board is STM32F4 1 1RE, so the manufacturer chooses stmicroelectronics, the version chooses Nucleo, and the model chooses F4 series. You can see that F4 1 1 is in the list.
6. Double-click F4 1 1RE to enter the pin configuration interface, where you can configure pins, which is very convenient.
7. Other configuration options are shown in the figure, including clock configuration, peripheral configuration and power consumption calculation.
8. The clock configuration is shown in the figure, which is also a graphical interface. It can be configured conveniently and quickly, and the desired frequency can be obtained simply by changing the number.
9. The peripheral configuration is shown in the figure. You only need to double-click the peripheral device you want to configure. For example, I configured GPIO, and when you enter, you can see the window as shown. You can choose the mode, up-down and output speed of GPIO.
10. After the configuration is completed, click the Generate Project File button to pop up the project setting window, fill in the project name, select directory, compiler, EWARM, MDK, etc. Finally, click OK to generate the project file. After opening it with a compiler, you can write the code conveniently, which saves the tedious configuration work.