ADS开发工具的基本使用

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.目录ADS安装与简介1J-Link使用方法简介2跑马灯:简单嵌入式开发入门3RTC:中断服务程序入门42开发工具链安装:ADS与Jlink3Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS:ARMDeveloperSuite常用ARM开发工具(Windows平台)ARMSDT(ARMSoftwareDevelopmentKit)ARMDeveloperSuite(V1.2)KeiluVision(MDK)(V3.24)IAREmbeddedWorkBench(V5.20)RealViewDeveloperSuite(RVDS)ADS组成部分集成开发环境(CodeWarriorIDEfromMetrowerks)调试器(Debuggers):AXD、armsd代码生成工具(CodeGenerationTools)指令集模拟器(InstructionSetSimulators)ARM应用库(ARMApplicationsLibrary)ARM开发包(ARMFirmwareSuite)4Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep1:双击Setup.exe5Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep2:一路Next,程序开始安装Step3:直到安装完毕6Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep3:跳出ARMLisenceWinzard,点击下一步7Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep3:选择InstallLisence,点击下一步8Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep4:填入你的Code,点击下一步9Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep5:点击下一步,直至完成10Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.ADS安装-StepbyStepStep6:在程序安装主界面点击“Finish”,完成安装11Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.CodeWarrior用户界面12Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.J-Link安装点击“Setup_JLinkARM_V400.exe”,一路Next,直至安装完成13开发工具链安装:配置开发环境14Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.配置AXD调试器正确连接开发板电源,并用Jlink将PC的USB接口与开发板的20PinJTAG接口正确连接,将开发板上电点击“开始”-所有程序-ARMDeveloperSuitev1.2-AXDDebugger,打开AXD调试器15Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.配置AXD调试器点击“Options”-ConfigureTarget…点击“ADD”,在弹出的文件选择框中选择JlinkRDI.dll路径:C:\ProgramFiles\SEGGER\JLinkARM_V400\JlinkRDI.dll16Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.配置AXD调试器点击OK,结束配置17Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.配置AXD调试器验证AXD配置在AXD的Memory窗口输入0x10001000地址并回车,如果看到相似数据,则表明AXD配置成功,仿真器可以正确识别开发板上的CPU如果在AXD的界面中看不到Memory窗口,请点击ProcessorViews-Memory18开发一个简单的ADS工程:GPIO控制LED19Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程在D盘新建目录LED,并从Sample代码中拷贝boot、include、misc文件夹及int_vec_handler.c文件到LED目录Step1:建立工程目录,并拷贝必要文件20Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程打开CodeWarrior,File-New…选择Project标签在Projectname内填入工程名在Location内填入路径点击“确定”注意:无论工程名还是路径,都不要出现中文、空格等Step1:建立新的工程21Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step2:向新工程内添加刚才拷贝的文件:注意:使用鼠标拖拽LED_DATA及LED.mcp不要添加进去22Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step3:在跳出的对话框中选“OK”,完成文件添加:23Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step4:添加Main.c文件:File-new…选择File选项卡输入文件名:main.c勾选“AddtoProject”,并选择当前工程LED.mcp依次勾选Targets内的选项24Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step5:完成自己的main函数在打开的main.c文件中输入以下内容#includestdio.h#includeub4020evb.h#includeintc.hintmain(){while(1);return0;}25Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step6:尝试编译:Project-make根据错误提示,删除misc文件夹下的“pmu.c”修改int_vec_handler.c,将vector数组的handler全部替换为NULL,并去掉不需要的头文件,仅保留intc.h和studio.h再次编译,已经去掉所有Error26Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step7:更改工程设置Edit-DebugrelSetting…languageSetting:将ARMAssembler等选项的TargetandSource选项卡中的“ArchitectureofProcessor”选项均设为“ARM720T”27Copyright2007ProchipElectronicsCo,ltd.AllRightsReserved.Nottobereproducedbyanymeanswithoutpriorwrittenconsent.入门:新建一个工程Step8:更改工程设置Edit-DebugrelSetting…ARMLinker:OutPut:Linkertype-Simple,ROBase-0x04000000Options:Imageentrypoint-0x04000000Layout:PlaceatbeginningofimageObject/Symbol-boot_gfd.oSection-BOOT至此,我们已经成功建立了一个空白工程,并可以在Main函数中添加自己的功能代码,下面我们将一步步实现LED的控制。28Copyright2007ProchipElectronicsCo,

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功