1: Install mdk412 and register it with the Registrar. This process is not described in detail.
2: Create the stm32 project folder named my_stm32 in a local path, create the rvmdk folder under my_stm32, and create the OBJ and list folders in the rvmdk folder.
3: Open keil4.
4: select the project menu-> New uvision project..., select the path of the.../my_stm32/rvmdk folder, name the project file my_stm32, and press ENTER
5: select the device name, as shown in figure 1.
Figure 1
Click OK.
6: 2: Select No. Do not add startup. s, and add it later.
Figure 2
At, create several groups: startup (the Startup file will be loaded soon), USR (the application file will be loaded soon), and fwlib (the files to be loaded soon. file C), DOC (Instructions for loading soon)
Figure 3
8: Right-click fwlib, add files to group 'fwlib ', select all files in the SRC file under the path of the library file, and click Add, as shown in 4:
Figure 4
9: copy the token to the my_stm32 folder.
10: Right-click USR, add files to group 'usr', Select Main. C, stm32f10x_it.c, stm32f10x_it.h, stm32f10x_conf.h, and add, as shown in Figure 5.
Figure 5
11: Click Startup, add files to group 'startup', select cortexm3_macro.s, stm32f10x_vector.s, and add, 6
Figure 6
12: you can read and write the stm32f10x_it.c, stm32f10x_it.h, and stm32f10x_conf.h files.
13: Click the black line in the figure (target options ...)
Figure 7
14: select the output tag, check "creat HEX file", click "select folder for objects...", and select "/my_stm32/rvmdk/obj" as the folder of the output target file. 8.
Figure 8
15: select the list tag, click Select folder for listing..., and select/my_stm32/rvmdk/list as the output folder of the list file. 9.
Figure 9
16: select the C/C ++ label, click the button on the right of the include path, and select the/library/INC,/my_stm32 folder as the library file compiling path of the program respectively. 10
Figure 10
17: The stm32 project is successfully created. Modify the main function and compile it.