对于STM32F103xxyy系列:
第一个x代表引脚数:T-36pin,C-48pin,R-64pin,V-100pin,Z-144pin;
第二个x代表Flash容量:6-32K,8-64K,B-128K,C-256K,D-384K,E-512K;
第一个y代表封装:H-BGA封装,T-LQFP封装,U-QFN封装;
第二个一代表工作稳定范围:6代表-40到85摄氏度,7代表-40到105摄氏度。
一、软件安装及显示修改
1.Keil5安装,及注册,文件
①点击安装 mdk518.exe,然后管理员启动,点file -> licence management,复制CID码
然后管理员启动keygen.exe,把CID复制到相应框里,选择ARM,Professional,最后点Generate,
复制生成的长串代码到下面框里点ADD。然后close,就成功了。

2.安装注册完成后安装stm32相关的pack包。(直接点击以.pack为后缀的文件)文件下载。
3.修改编辑界面颜色。右击桌面图标打开文件位置,把grobal.prop 文件复制进去,就OK了;grobal.prop下载;也可复制文章末尾的代码到一个空的txt文件内,把txt文件直接连后缀名改为grobal.prop,然后拖到程序根目录即可。`
预览是这样的

二、项目模板创建
1.项目根目录已下级目录文件解释;
App:存放自己写的一些驱动、库文件;
Libraries:存放官方的库,以及CMSIS固件库;
Obj:编译产生的文件,HEX等;
User: 存放main.c、stm32f10x_it.c
2.Keil项目树;
3.配置魔术棒;
4.配置j-link仿真器;
grobal.prop 文件内容:
# properties for all file types
indent.automatic=1
virtual.space=0
view.whitespace=0
view.endofline=0
code.page=936
caretline.visible=1
highlight.matchingbraces=1
print.syntax.coloring=1
use.tab.color=1
create.backup.files=0
auto.load.ext.modfiles=0
save.prj.before.dbg=0
save.files.before.dbg=0
function.scanner.project=1
function.scanner.files=1
function.scanner.modules=1
# properties for c/cpp files
syntax.colouring.cpp=1
use.tab.cpp=0
tabsize.cpp=2
line.margin.visible.cpp=1
fold.cpp=1
monospaced.font.cpp=1
# properties for asm files
syntax.colouring.asm=1
use.tab.asm=0
tabsize.asm=4
line.margin.visible.asm=1
monospaced.font.asm=1
# properties for other files
use.tabs=0
tabsize=4
line.margin.visible.txt=0
monospaced.font.txt=1
# setting for code completion and syntax check
cc.autolist=1
cc.highlightsyntax=1
cc.showparameters=1
cc.triggerlist=1
cc.triggernumchars=3
cc.enter.as.fillup=0
# autosave for editor files
autosave=0
autosave.interval=5
# vertical edge at right margin
edge.mode=0
edge.column=80
# Specification for text selection and caret line
selection.fore=#000000
selection.back=#86C7F7
caret.fore=#F0F0F0
caret.back=#333333
# Color for vertical edge
edge.colour=#66FAFA
# C/C++ Editor files
template.cpp="#define","#define |";"#if","#if |\r\n\r\n#endif";\\
"#include","#include ";"Header","// Header:\r\n// File Name: |\r\n// Author:\r\n// Date:\r\n";\\
"continue","continue;";"do","do\r\n{\r\n\t// TODO: enter the block content here\r\n\t\r\n\t|\r\n} while ();\r\n";\\
"enum","enum |\r\n{\r\n\t\r\n};\r\n";"for","for(|;;)\r\n{\r\n}";\\
"fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\r\n}\r\n";\\
"if","if (|)";"ifelse","if (|)\r\n{\r\n}\r\nelse\r\n{\r\n}";\\
"struct","struct | \r\n{\r\n\r\n};\r\n";"switch","switch (|)\r\n{\r\n\tcase:\r\n\t\tbreak;\r\n\tcase:\r\n\t\tbreak;\r\n\tdefault:\r\n\t\tbreak;\r\n}";\\
"void","void | ();\r\n";"while","while (|)\r\n{\r\n}";\\
font.monospace.cpp=Courier New
style.cpp.32=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.4=font:Courier New,size:10,fore:#BABA74,back:#121212
style.cpp.10=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.1=font:Courier New,size:10,fore:#007F00,back:#121212
style.cpp.2=font:Courier New,size:10,fore:#007F00,back:#121212
style.cpp.5=font:Courier New,size:10,fore:#0069D2,back:#121212
style.cpp.6=font:Courier New,size:10,fore:#CC00CC,back:#121212
style.cpp.11=font:Courier New,size:10,fore:#F0F0F0,back:#121212
style.cpp.9=font:Courier New,size:10,fore:#BF7D7D,back:#121212
style.cpp.7=font:Courier New,size:10,fore:#B300B3,back:#121212
style.cpp.34=font:Courier New,size:10,fore:#994D4D,back:#121212
style.cpp.35=font:Courier New,size:10,fore:#FF1515,back:#121212
style.cpp.16=font:Courier New,size:10,fore:#B00042,back:#121212
style.cpp.12=font:Courier New,size:10,fore:#F0F0F0,back:#121212
# Asm Editor files
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.1=font:Courier New,size:10,fore:#616161,back:#FFFFFF
style.asm.2=font:Courier New,size:10,fore:#FF0000,back:#FFFFFF
style.asm.3=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.4=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.5=font:Courier New,size:10,fore:#000000,back:#FFFFFF
style.asm.6=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.7=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.9=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.10=font:Courier New,size:10,fore:#0000FF,back:#FFFFFF
style.asm.11=font:Courier New,size:10,fore:#007F00,back:#FFFFFF
style.asm.12=font:Courier New,size:10,fore:#7F007F,back:#FFFFFF
style.asm.8=font:Courier New,size:10,fore:#46AA03,back:#FFFFFF
# Editor Text files
font.monospace.txt=Consolas
style.txt.32=font:Verdana,size:10,fore:#000000,back:#FFFFFF
本文详细介绍了如何配置STM32F103系列的开发环境,包括Keil5的安装与注册、STM32相关PACK包的安装、编辑界面颜色的修改,以及项目模板的创建。内容涵盖软件安装步骤、项目目录结构解析、魔术棒配置和J-Link仿真器设置。同时,文章提供了grobal.prop文件内容,用于自定义编辑器的颜色和样式。
1万+

被折叠的 条评论
为什么被折叠?



