First, open Keil, select Project-"New uVision Project, select the appropriate folder, enter the project name, click Save, and create the project.
As shown in the figure below, create a project named stm32_demo under the Template folder.
Then we select the device, take STM32F103RB as an example (STM32 other series can be analogized), select STM32F103RB in STMicroelectronics column, as shown below, we can see the description of the chip on the right side of the figure.
Click OK and the following dialog box pops up, asking if you need to add a startup file (this startup file is included with MDK).
Here, select No (N), we will add the startup file in the STM32 firmware library.
Next, we need to create several file groups to store different source files, so that the entire project directory structure is clear, click middle After the following figure
Click middle Can create a file group, You can delete the group. Below we will create four file groups: User, StdPeriph_Drive, CMSIS, MDK-ARM. User is used to store files related to the user. StdPeriph_Drive is used to store peripheral driver files in the library function. CMSIS is used to place The file related to the Cortex_M3 kernel, MDK-ARM is used to store the startup file. After the file group is created, as shown in the figure below.
Click OK, we can see the file group as shown below
Next, we will operate on the firmware library folder (shown below) and the files in the Template folder.
Copy the Libraries folder in the firmware library folder to the project directory (that is, under the Template folder just created), and create two folders, User and Output, under Template, and User is used to put files related to user code. Output is used to store intermediate files generated after compilation.
Open the Template folder as shown below.
Then
STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_Stdperiph_Examples\GPIO\IOToggle
In the directory, the main.c, stm32f10x_conf.h, stm32f10x_it.h, stm32f10x_it.c four files are copied to the User directory.
At this point, the operation of the file ends.
Re-click Now we have to add files to each filegroup.
The first is the User file group, click Add Files, and then add 3 C files under the User folder, as shown below.
Kitchen Range Hood Motor,Range Hood Motor,Kitchen Range Hood,Range Hood Fan Motor
WUJIANG JINLONG ELECTRIC APPLIANCE CO., LTD , https://www.jinlongmotor.com