項(xiàng)目場景:
使用keil5 進(jìn)行點(diǎn)燈程序時(shí)
問題描述
在使用keil5編程時(shí)發(fā)現(xiàn)編寫的代碼都是黑白色的,關(guān)鍵字沒有顏色
并且在字體設(shè)置的時(shí)候沒有如圖標(biāo)記的選項(xiàng)
?
?
原因分析:
#include "stm32f10x.h"
int ? ?main ()
{
?? ?//打開 GPIOB 的時(shí)鐘
?? ?*(?? ?unsigned int ?*)0x40021018 |=((1)<<3);
?? ?//配置IO口為輸入
?? ?*(?? ?unsigned int ?*)0x40010c00 |=((1)<<(4*0));
?? ?//控制 ODR寄存器?
?? ?*(?? ?unsigned int ?*)0x40010c0c &=~(1<<0);
}
void SystemInit(void)
{
}
解決方案:
在keil5的安裝路徑下是中文,需要將路徑改成英文
解決方案可以參考以下鏈接文章來源:http://www.zghlxwxcb.cn/news/detail-402119.html
http://t.csdn.cn/21SJ8文章來源地址http://www.zghlxwxcb.cn/news/detail-402119.html
到了這里,關(guān)于Keil MDK5代碼關(guān)鍵字沒有顏色的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!