The start file of the C drive project stm32 project template is the startup configuration. Stm32f10x.h is equivalent to the header file of the 51 microcontroller, describing which registers there are and their corresponding addresses. The two system files are the configuration clock, and the two cm3 are the kernel register descriptions. Add files to the new group in Keil5, but you can only select one startup file (one that matches your own microcontroller type). The picture below shows the corresponding model. The suffix for this microcontroller is md.s.
abbreviation |
Definition |
Flash capacity |
model |
LD_VL |
Small capacity product value series |
16~32K |
STM32F100 |
MD_VL |
Medium capacity product value series |
64~128K |
STM32F100 |
HD_VL |
Large capacity product value series |
256~512K |
STM32F100 |
LD |
Small capacity products |
16~32K |
STM32F101/102/103 |
MD |
Medium capacity products |
64~128K |
STM32F101/102/103 |
HD |
Large capacity products |
256~512K |
STM32F101/102/103 |
XL |
Increased capacity products |
Greater than 512K |
STM32F101/102/103 |
CL |
Connected products |
- |
STM32F105/107 |
Then add all the .c and .h later. To let Keil5 find the path, click the magic wand button-C/C++-include path column-add the file path of start. If you add files later, you must add the path in this way to let Keil5 find the path. The User file on the C drive usually saves the main function of the C language. The debugging method generally depends on the device. This microcontroller uses stlink. Select the corresponding debugger in Keil5 Magic Wand-Debug-user, and check Rest and Run in the setting-Flash Download next to facilitate downloading the program and immediately reset and execute it. Library in the C drive stores library functions, which are called through the library functions. The library functions have encapsulated all functions in the call registers. For the .c and .h in the Uer file, find the three lines starting from line 8296 in conf.h and put them in the Magic Wand-C/C++-Define column, so that all functions of calling library functions are completed.
Note: What I learned is a video from Jiangsu University of Science and Technology. It is just my study notes. If there is any infringement, please contact me to delete it.