STM32CUBEMX Configuration Tutorial (1) Basic Configuration

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: insert image description here
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
insert image description here
insert image description here

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:
insert image description here
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
insert image description here
selected
.
insert image description here

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
insert image description here
.
insert image description here

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 .
insert image description here
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
insert image description here
clearer insert image description hereafter checking .
insert image description here

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.
insert image description here
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
insert image description here
interface
insert image description here
. If it prompts that the generation fails, please check whether there is a Chinese path. insert image description here
Click to open the project to automatically call keil5 to open, the engineering diagram is as follows: it
insert image description here
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 insert image description here
output button on the top line:
insert image description hereinsert image description here
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

Guess you like

Origin blog.csdn.net/weixin_44584198/article/details/118959294