Keil5使用说明.doc
-/双击Keil uVision5快捷方式,运行Keil uVision51、新建工程Project->New uVision Project.选择文件夹(自定义),输入文件名(例Test01)保存2、选择CPU型号展开Freescale,选择K60 Series下MK60DN512xxx10OK3、选择运行环境勾选Device->StartupOK4、设置属性Project->Options for TargetTarget1. ALT+F7或选中Target1后,鼠标右键,选择Options for TargetTarget1. ALT+F7Target属性页,根据开发板上硬件,填入相应晶体频率如图红框所示C/C+属性页,选择Include Paths后.按纽,如图红框如示选择工具栏上New/Insert按纽,如图红框如示选择C:Keil_v5ARMPackARMCMSIS4.2.0CMSISInclude目录OKDebug属性页,选择PEMicro Debugger调试器,如图红框所示OK5、例程展开Target1选择Source Group1,单击鼠标右键,选择Add New Item to Source Group 1选择C File(.c),选择文件夹路径(自定义),填写文件名Test01加入如下代码#include "MK60D10.h"void delay(void)int i,j;for(i=0;i<1000;i+)for(j=0;j<1000;j+);int main(void)unsigned int counter=0;SIM->SCGC5 |= (0x1f<<9);/Turn on all port clocks /Set PTA28, and PTA29 (LEDs) for GPIO functionalityPORTA->PCR28 |= (1<<8);PORTA->PCR29 |= (1<<8); /Change PTA28, PTA29 to outputsPTA->PDDR |= (0x03<<28);/turn on PTA29PTA->PDOR |= (0x01<<29);for(;) PTA->PTOR |= 1<<28;counter+;delay();6、编译Project->Build Target F7或单击编译工具栏中Build图标修改并编译至0 Error(s), 0 Warning(s).7、调试Debug->Start/Stop Debug Session Ctrl+F5或单击调试工具栏中Start/Stop Debug Session图标Connect ( Reset)