STM32CubeIDE installation1、Software download1.1、Software download1.2、Choosing a platform1.3、Filling in information2、Software Installation2.1、Open the installer2.2、Installation Process - Setup3、Software configuration3.1、Open the application3.2、Sign-up - Login to your account3.3、Installing the firmware package4、Software Usage4.1、New construction4.2、Chip selection4.3、Project setup4.4、Pin layout and configuration4.5、Clock configuration4.6、Project management4.7、Generate initialization code4.8、Writing the code4.9、New construction again5、Q&A5.1、Encoding format problem
The development tool used for the tutorial is the STM32CubeIDE software
ST office website:https://www.st.com/content/st_com/en/stm32cubeide.html
platform:Windows
Agreement of consent
Filling in information
The email address needs to be filled in accurately, and the software download link will be sent to you by email
Complete submission
Email to download the installer
xxxxxxxxxx
Click on the link to go to the official website, the website will automatically jump out of the software compressed package download window
Administrator
Open the installation package as an administrator
xIf you open the software installation package, then you see "NSIS ERROR: error launching installer" error:
Please put the package in the path without Chinese characters
Next
Agreement of consent → I agree
Location of installation → Next → Install
xxxxxxxxxx
The following are recommended to use the default installation location of the software and the path does not contain Chinese characters
xxxxxxxxxx
Check the option to install ST-Link and J-Link drivers
Installing the driver
xxxxxxxxxx
If you followed the tutorial in Chapter 2 to this point, you'll notice that the ST-Link, J-Link, and ULINK drivers are all installed
Waiting for installation → Next
Finish
Familiar with software options and functions.
Click on Left mouse button:double-click the desktop app
Choosing a workspace
xxxxxxxxxx
You can create a new folder, the folder path can not contain Chinese characters
xxxxxxxxxx
Since I installed STM32CubeMX before and logged in my account on that software, the system logged in my account by default
Do not register and login accounts can refer to the "STM32CubeMX installation" tutorial
Help → Manage embedded software packages
Install the latest firmware package of the STM32F1 series
xxxxxxxxxx
1. The chip firmware package cannot be installed without logging into the account
2. To install or uninstall, check the box in front of the chip firmware package. Click this option and there will be no install and uninstall options
Waiting to download
Close the page
STM32CubeIDE integrates STM32CubeMX functions, which can be used for pin configuration, and can be directly used for code writing and debugging.
Tips:The following are required for almost every project. Later in the Peripheral driver tutorial, we will skip the following steps and walk through the pin layout and configuration options to guide the user through the configuration.
xxxxxxxxxx
Generally, new projects can only be built through this option when the software is used for the first time, and new projects in the later period can be referred to [9, new construction again].
Chip selection and interface
xxxxxxxxxx
The default configuration is enough, and the project file name can be customized
xxxxxxxxxx
The interface is the same as STM32CubeMX
SYS
RCC
xxxxxxxxxx
refer to the options involved in the red line
Project
xxxxxxxxxx
Using STM32CubeIDE can not export other project files (such as MDK-ARM project files)
Code Generator
Advance Settings
xxxxxxxxxx
Choose the library to use for your initialization code: the HAL library is demonstrated here
Click the Code Generate or Save button to generate the initialization code
xxxxxxxxxx
Using Ctrl+S to save will also generate initialization code
USER CODE must be located between USER CODE BEGIN and User code END,otherwise the next time you use the STM32CubeMX peripheral configuration feature it will remove code outside that location.
Demonstrate how to create a new project in the project file, which is often used in real development
The project file management area will appear for the new project
Refer to the previous steps for the next steps.
Tip:Project '***' has no explicit encoding set
solution:Change the file encoding → UTF-8