GettingStartedwithMDKCreateApplicationswithµVision®forARM®Cortex®-MMicrocontrollers2PrefaceInformationinthisdocumentissubjecttochangewithoutnoticeanddoesnotrepresentacommitmentonthepartofthemanufacturer.Thesoftwaredescribedinthisdocumentisfurnishedunderlicenseagreementornondisclosureagreementandmaybeusedorcopiedonlyinaccordancewiththetermsoftheagreement.Itisagainstthelawtocopythesoftwareonanymediumexceptasspecificallyallowedinthelicenseornondisclosureagreement.Thepurchasermaymakeonecopyofthesoftwareforbackuppurposes.Nopartofthismanualmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,includingphotocopying,recording,orinformationstorageandretrievalsystems,foranypurposeotherthanforthepurchaser’spersonaluse,withoutwrittenpermission.Copyright©1997-2016ARMGermanyGmbHAllrightsreserved.Keil®,µVision®,Cortex®,CoreSight™andULINK™aretrademarksorregisteredtrademarksofARMGermanyGmbHandARMLtd.Microsoft®andWindows™aretrademarksorregisteredtrademarksofMicrosoftCorporation.PC®isaregisteredtrademarkofInternationalBusinessMachinesCorporation.NOTEWeassumeyouarefamiliarwithMicrosoftWindows,thehardware,andtheinstructionsetoftheARM®Cortex®-Mprocessor.Everyeffortwasmadetoensureaccuracyinthismanualandtogiveappropriatecredittopersons,companies,andtrademarksreferencedherein.GettingStartedwithMDK:CreateApplicationswithµVision3PrefaceThankyouforusingtheMDKVersion5MicrocontrollerDevelopmentKitavailablefromARM®Keil®.ToprovideyouwiththeverybestsoftwaretoolsfordevelopingARM®Cortex®-Mprocessorbasedembeddedapplicationswedesignourtoolstomakesoftwareengineeringeasyandproductive.ARMalsoofferscomplementaryproductssuchastheULINK™debugandtraceadaptersandarangeofevaluationboards.MDKisexpandablewithvariousthirdpartytools,starterkits,anddebugadapters.ChapterOverviewThebookstartswiththeinstallationofMDKanddescribesthesoftwarecomponentsalongwithcompleteworkflowfromstartingaprojectuptodebuggingonhardware.Itcontainsthefollowingchapters:MDKIntroductionprovidesanoverviewabouttheMDKTools,theSoftwarePacks,anddescribestheproductinstallationalongwiththeuseofexampleprojects.CMSISisasoftwareframeworkforembeddedapplicationsthatrunonCortex-Mbasedmicrocontrollers.Itprovidesconsistentsoftwareinterfacesandhardwareabstractionlayersthatsimplifysoftwarereuse.SoftwareComponentsenableretargetingofI/OfunctionsforvariousstandardI/Ochannelsandaddboardsupportforawiderangeofevaluationboards.CreateApplicationsguidesyoutowardscreatingandmodifyingprojectsusingCMSISanddevice-relatedsoftwarecomponents.Ahands-ontutorialshowsthemainconfigurationdialogsforsettingtooloptions.DebugApplicationsdescribestheprocessofdebuggingapplicationsonrealhardwareandexplainshowtoconnecttodevelopmentboardsusingawiderangeofdebugadapters.MiddlewaregivesfurtherdetailsonthemiddlewarethatisavailableforusersoftheMDK-ProfessionalandMDK-Pluseditions.UsingMiddlewareexplainshowtocreateapplicationsthatusethemiddlewareavailablewithMDK-ProfessionalandMDK-Plusandcontainsessentialtipsandtrickstogetyoustartedquickly.4PrefaceContentsPreface........................................................................................................3MDKIntroduction....................................................................................7MDKTools.............................................................................................................7SoftwarePacks.......................................................................................................8MDKEditions.........................................................................................................8Installation..............................................................................................................9SoftwareandHardwareRequirements...........................................................9InstallMDKCore...........................................................................................9InstallSoftwarePacks...................................................................................10MDK-ProfessionalTrialLicense..................................................................11VerifyInstallationusingExampleProjects..................................................12UseSoftwarePacks......................................................................................16AccessDocumentation.........................................................................................20RequestAssistance...............................................................................................20LearningPlatform.................................................................................................21QuickStartGuides................................................................................................21CMSIS......................................................................................................22CMSIS-CORE......................................................................................................23UsingCMSIS-CORE.................................