STM32CUBEMX Configuration Tutorial (1) Basic Configuration
I have been using STM32CUBEMX for two years based on STM32H743VI
. I always feel that this tool is very convenient, but because it is not used frequently, some points will always be forgotten, so I wrote down this series of tutorials for memory.
The project link of this configuration is at the bottom, if you need to get it yourself.
1. STM32CUBEMX download and install
ST official website can be downloaded and installed directly, here is the address of the installation package: STM32CUBEMX official download
But the download needs to be registered as a member of ST, here is also a CSDN address that can be downloaded directly: The CUBEMX download address of CSDN
must remember that the installation cannot have a Chinese path
2. STM32CUBEMX default configuration modification
All the way to next is enough during installation (the installation location is not recommended to C drive), here, everyone can install successfully by default. Open the CUBEMX software and the following interface will appear:
Don’t be too busy to create a new project for the time being, first modify the installation address of PACK. pack is a support package for the chip that needs to be downloaded additionally. The default installation location is the C drive, which will take up a lot of space on the C drive. Change it to other memory drives here . Click the HELP
button on the top column , and open the update setting option, as shown in the figure: After opening, the following interface will appear, modify the folder path in the Repository Folder to modify the PACK installation path to other disks. highly recommended modification
3. STM32CUBEMX new project
Select the first line of File in the menu bar to create a new project, and you can enter the new project interface:
as shown in the figure below, search for the MCU you want to use in the search box until you find it, and use the STM32H743VI chip here: After selecting, the large box in the lower right corner will show the chip model you
selected
.
4. STM32CUBEMX project configuration modification
It is strongly recommended to generate the project after relevant modification. The steps are as follows. First, click the button Project Manager on the top of the screen to enter the project management interface. The button is in the picture below
.
You need to enter the project name first , which is necessary. You can also modify the project path, but remember that the Chinese path cannot be used .
Next, select the compilation tool you use in the TOOLCHAIN line. I use KEIL here, so I choose MDK ARM. You can choose whatever compiler you use. Next, click the Code Generate menu on the far left to enter the code generation configuration interface. In this interface, you can configure many configurations related to code generation: it is highly recommended to check this option (this option is not checked by default), and the code will be
clearer after checking .
5. STM32CUBEMX starts to generate code
At this point, the basic configuration is complete, and the code generation starts. It is the GENERATE CODE button on the top right.
When you click it, you may be prompted that it is a dependent package, asking you whether you want to download it automatically, click yes, and then enter the installation
interface
. If it prompts that the generation fails, please check whether there is a Chinese path.
Click to open the project to automatically call keil5 to open, the engineering diagram is as follows: it
is highly recommended to close the browse information to prompt the compilation speed, the steps are as follows, first click this button: then select the
output button on the top line:
cancel the box in front of the browse information option, and then click OK to complete the modification. At this time, press F7 to compile, which can greatly improve the compilation speed.
This is the end of the tutorial, and the project link is attached for reference: https://download.csdn.net/download/weixin_44584198/20389648