当前位置:网站首页>Create a new STM32 project and configure it - based on registers
Create a new STM32 project and configure it - based on registers
2022-07-25 06:32:00 【an520_】
stay keil5 New China STM32 Engineering documents of , The project is based on STM32F103.
1. Create a new folder , Name yourself according to the project to be carried out “ Ultrasonic ranging ”, Also create a new one internally “USER”;

2. open keil, from “Project” choice “New μVision Project...”, Here's the picture :

3. Locate the project to “ Ultrasonic ranging ” Of “USER” Under the table of contents , Then name it according to your own needs ;
4. Then a selection box will pop up , According to our own STM32 Select corresponding “STMicroelectronics”;

5. Click on “Cancel”;

6. First select the startup file , Punctual atoms have also been described in the documentation , As shown below :
ST The company provides 3 Give us a startup file , Used for different capacities STM32 chip , These three documents are :

C8T6 yes 64Kb, Therefore, it belongs to medium capacity , The startup file should select "startup_stm32f10x.md.s".

7. Then add the startup file to the project ;

Of course, you can also right-click from "Manage Project items" Add , It's not shown here .
8. Because the startup file is different , So the code will be different , Therefore, you need to replace some code in the startup file with the following code ;

However, copying files downloaded from the punctual atomic link does not need to be modified .
9. When you compile the project, you can find that there is a “error” Of ; In fact, just add one main function , And then in “USER” New under the directory main.c file ( It can be any other name );
10. stay “Manage Project” Add “USER”、“SYSTEM” grouping , And then put main.c Add files to “USER” In group ;

11. Find... From the downloaded file “delay”、“sys”、“usart” Three folders , And then put one of them .c Add file to project directory

12. Configure the output options , As shown in the figure below :

Then configure hex The path to the output of the file .

13. And then configure it .c After the document , You also need to configure .h The header file . Enter the macro definition identifier first , According to the used STM32F1 Capacity of model , To enter the relevant macro
Definition , about STM32F103 Series of chips , The setting principle is as follows :

C8T6 choice “STM32F10X_MD“, Then add the path of the header file .

14. Compilation found that there are still problems , This is because main.c There is no code in file , And then in main.c Write code ;

Then the compilation succeeded , However, due to different coding types , So the Chinese characters copied directly will be garbled .
【 Learning exchange group :607439754】
【 Network disk data package from your mobile phone , If you need it, you can collect it yourself 】:
【 Share some tutorial materials below 】:
Intelligent temperature control small fan
Interrupt and exception handling mechanisms
边栏推荐
- Mlx90640 infrared thermal imager temperature measurement module development notes (I)
- C control open source library: download of metroframework
- Using JS to realize the linkage effect of form form's secondary menu
- 【Jailhouse 文章】Base Architectures for virtual-physical computing(2018)
- JTAG debugging source level debugging of arm bare board debugging
- Installation and configuration of automatic operation and maintenance management workers ansible
- Do you know the same period last year in powerbi
- R奇怪语法总结
- Temperature table lookup and calculation formula
- The code spell checker plug-in avoids some specific vocabulary errors "XXX": unknown word.cspell
猜你喜欢

Developers must read: 2022 mobile application operation growth insight white paper

Evolution of coupon architecture under C2B mode
![[C language] program environment and preprocessing](/img/d6/d59a0d8d286ea9408043d8ad1e1348.png)
[C language] program environment and preprocessing

Daily question brushing record (XXVIII)

SAP FICO 第三节 BDC和LTMC导入S4财务科目

Koa2 learning

Easy to understand: basic knowledge of MOS tube

What determines the "personality" of AI robots?

JSON、

C#控件开源库:MetroFramework的下载
随机推荐
【C语言】指针和数组的深入理解(第一期)
How to play a data mining game entry Edition
Brief tutorial of vbs script syntax (1)
健康打卡每日提醒累了?那就让自动化帮你---HiFlow,应用连接自动化助手
Standard C language 6
C control open source library: download of metroframework
Common API of window
[cann training camp] play with the one-stop plan of cann target detection and recognition - learning notes 1 (initial experience)
GIS实战应用案例100篇(十七)-基于DEM制作三维地图
Detailed explanation of the difference, working principle and basic structure between NMOS and PMOS
[sword finger offer] analog implementation ATOI
Learning notes: detailed use of 12864 LCD module
MySQL index collation summary
Prevention strategy of Chang'an chain Shuanghua transaction
The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market
ARM裸板调试之JTAG调试源码级调试
Developers must read: 2022 mobile application operation growth insight white paper
Interlocked atom access series of functions
Case ---- how efficient is the buffer stream compared with the ordinary input stream and output stream?
NFT: how to improve rentable NFT (erc-4907)
http://makerschool.mikecrm.com/f4wjYBB