硬件探索——常用软件Keil的小技巧

在嵌入式硬件开发中,ARM占据了高性能MCU的绝对主导地位,而常用的开发软件有IAR、Keil以及其它由硬件厂商研发的IDE,这其中,最常用的非Keil莫属了。

本文意在总结一些Keil使用的小Tips,供备忘,也供交流学习。

基于的Keil版本如下

第一个问题,背景颜色配置: 

目前使用的配色如下

该配色方案可在keil安装文件夹/UV4/global.prop文件中找到

配色配置如下

# Specification for text selection and caret line
selection.fore=#0000A0
selection.back=#E6E6E6
caret.fore=#FF80C0
caret.back=#1E1E1E

# Color for vertical edge
edge.colour=#408080

# 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\t\r\n}";\\
    "fpointer_type","typedef int (* |F)();\r\n";"function","void function(|)\r\n{\r\n\t\r\n}\r\n";\\
    "if","if (|)";"ifelse","if (|)\r\n{\r\n\t\r\n}\r\nelse\r\n{\r\n\t\r\n}";\\
    "struct","struct | \r\n{\r\n\t\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\t\r\n}";\\
    
font.monospace.cpp=Courier New
font.acpmonofontname.cpp=Courier New
font.acppropfontname.cpp=Courier New
style.cpp.32=font:Courier New,size:10,fore:#F0F0F0,back:#1E1E1E
style.cpp.4=font:Courier New,size:10,fore:#149393,back:#1E1E1E
style.cpp.10=font:Courier New,size:10,fore:#E6931F,back:#1E1E1E
style.cpp.1=font:Courier New,size:10,fore:#7EAD69,back:#1E1E1E
style.cpp.2=font:Courier New,size:10,fore:#6A9955,back:#1E1E1E
style.cpp.5=font:Courier New,size:10,fore:#358CD6,back:#1E1E1E
style.cpp.6=font:Courier New,size:10,fore:#CE846D,back:#1E1E1E
style.cpp.11=font:Courier New,size:10,fore:#9CDCFE,back:#1E1E1E
style.cpp.9=font:Courier New,size:10,fore:#C57A97,back:#1E1E1E
style.cpp.7=font:Courier New,size:10,fore:#E6931F,back:#1E1E1E
style.cpp.34=font:Courier New,size:10,fore:#500000,back:#008080
style.cpp.35=font:Courier New,size:10,fore:#FF0000,back:#CCE8CF
style.cpp.16=font:Courier New,size:10,fore:#FF0080,back:#1E1E1E
style.cpp.12=font:Courier New,size:10,fore:#FFFF00,back:#008000
style.cpp.86=font:Courier New,size:10,fore:#E3E3E3,back:#1E1E1E


# Asm Editor files
font.monospace.asm=Courier New
style.asm.32=font:Courier New,size:10,fore:#C0C0C0,back:#1E1E1E
style.asm.1=font:Courier New,size:10,fore:#00AA00,back:#1E1E1E
style.asm.2=font:Courier New,size:10,fore:#DF0000,back:#1E1E1E
style.asm.3=font:Courier New,size:10,fore:#FF8000,back:#1E1E1E
style.asm.4=font:Courier New,size:10,fore:#FF8080,back:#1E1E1E
style.asm.5=font:Courier New,size:10,fore:#8080FF,back:#1E1E1E
style.asm.6=font:Courier New,size:10,fore:#E3E300,back:#1E1E1E
style.asm.7=font:Courier New,size:10,fore:#F9F900,back:#1E1E1E
style.asm.9=font:Courier New,size:10,fore:#A2A2D0,back:#1E1E1E
style.asm.10=font:Courier New,size:10,fore:#F0F000,back:#1E1E1E
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:#00FF40,back:#1E1E1E


# Editor Text files
font.monospace.txt=Courier New
style.txt.32=font:Verdana,size:10,fore:#FF8040,back:#000000

关于使用汉化版的问题

1、汉化版汉化有时并不完全,还是需要一定的基础知识和英语能力

2、汉化版有时会出现奇奇怪怪的翻译,不过大部分都是正确的,还能接受

3、使用汉化版可能会使自动缩进失效,如下图所示

解决方法如下

首先,打开global.prop配置文件,找到第一项配置

如图所示 ,indent.automatic配置为-1,此时自动缩进不可用,关闭keil,将其修改为1再保存重启keil即可

需要注意的是,如果在keil的GUI界面中对界面的配置进行了任何的修改并保存后,该选项将自动恢复为-1,需要再次手动修改

未完待续....

 

 

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值