T2_ASM_Project_R3 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh Introduction ThepurposeofthisdocumentistoenableastudenttoquicklycreateaprojectunderCCSfor assembling,andlinkinganassemblyfile.Tocompletethistutorialyouwillneedtwoadditional files:ex0.asmandKG_RAM_Link1.cmdAfterobtainingthemfromourclasswebpage,copy themintoadirectorycalledc:\eel4744\ccs\projects\example0orsomeotherdirectorywhere thefileswillnotbecorruptedsimilartotheoneyoucreatedforthefirsttutorial. ex0.asmisanelementaryassemblyfilethatillustratesvariousassemblerdirectivesand TMS320F28335DSPassemblycode.KG_RAM_Link1.cmdisalinkercommandfilethatisrequired tosettheproperaddressesforeachcodesectionandtoinstructthelinkerhowtobuildthefinal machinecodeoutput.ThislinkercommandfileisanadaptationofTexasInstrument'slinker commandfile"28335_RAM_lnk.cmd". Procedure 1.ThistutorialassumesthatyoualreadyhaveCodeComposerStudioinstalledandhavesetyour workspacedirectorylocationonyourharddisk.Formoreinformationonthistopicseethe tutorial:CCS_Install_R1.pdf 2.OpenCCSandcreateanewprojectviathefollowingcommands:FileNewCCSProject T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh TypeinyourProjectName.i.e.example0Next,uncheckthebox"Usedefaultlocation"to placetheprojectinanotherlocationotherthanyourworkspacefolder.Itisrecommendedthat youcreateanewdirectorycalledprojectsoffofthedirectoryyoucreatedintheCCSinstallation tutorial,CCS_Install_R1.pdf.Inthisdirectoryyoushouldthencreateanewdirectoryforevery project.i.e.c:\eel4744\ccs\projects\example0Note:CCSdoesnotcreateaspecificfileto containtheprojectinformationbutinsteadlooksforfilesunderaparticularnameinagiven directory.Thiswillbediscussedfurtherandtheimportantruleistocreateadirectoryforevery newproject(examples,labcode,experimentation,etc.).Seethescreensnapshotbelow. 3.SelectyourProjectType:C2000andpressNext. T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh 4.SkipthroughtheAdditionalProjectSettingswindowbypressingNextagain. 5.SelectGenericC28xxDeviceandpointtoLinkerCommandFile:KG_RAM_Link1.cmd AlsochecktheboxTreatasanAssemblyonlyProjectsincethisisanassemblyonlyproject. Youshouldseethe"RuntimeSupportLibrary:"fieldbecomeinactiveasillustratedbelow. NowpressFinish. T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh 6.Wenowhavecreatedtheprojectdependencies(librariestobeusedforassemblyand memorymapforthemachinecodeoutput)andwillnowcreatetheactualassemblyfile. TocreateanewASMfilepress:FileNewFileandtypeinthenewfilename(ex0.asm inthiscase)andthenpressthe+insidetheexample0directoryorselecttheexample0 directorybyclickingonitandthenpressFinish. Note:Makesuretowritethe.asmextensionfollowingyourfilename.Failuretodothiswill generateanerrorwhentryingtocompileyourcode.Ifyoutypethe.asmextensioncorrectly,a linenumber"1"willappearnexttothecursorinthenewfile(window)youhavejustcreated. T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh 7.Youshouldnowseethefollowingcreatedproject.Notetheincludedfilesintheleftmost window.Thenewasmwindowhasa"1"indicatinglinenumberoneaspreviousdescribed. AtthispointyoucantypeinnewASMcodeinthecenterwindow.However,sinceyouprobably arenotproficientatwritingF28335DSPassemblyyet,youshouldcopyintheassemblycodefrom ourexamplecodefile:ex0.asmTodothispressFileOpenFilenowgoselectex0.asm fromthedirectorywhereyouoriginallyplacedthefile.Whenex0.asmisopen,copythecontents usingEditSelectAllandthenEditCopyintheex0.asmwindowtocopythecodetoyour newex0.asmwindowwithEditPaste.Pressthesmalldisketteontheleftofthetoptoolbarto savetheex0.asmfile. Note:Hadyouplacedtheex0.asminitiallyintheExample0(project)directory,thefile wouldhavebeenautomaticallyincludedintotheprojectwhentheprojectwascreated. WearenowalmostreadytocompilethecodebutmustcreateatargetconfigurationfiletotellCCS whatemulator/programmeryouwillbeusingtodownloadthecode. T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh 8.CreateanewTargetConfigurationFilebypressingTargetNewTargetConfiguration.The targetconfigurationfilewillidentifythetypeofemulatorCCSwilluseforprogrammingand emulatingtheDSPboard.Inourcasetheprogrammer/emulatorhardwareisactuallyonour labboard. Typeinafilenameexample0tomatchtheprojectname.Next,unchecktheUseshared locationboxandthenpressBrowsetoselectthecurrentprojectlocation.Ifthecurrent projectlocationshowsupintheLocation:field(i.e./example0),youcanleaveUseshared locationcheckedandjustpressFinish.Wewanttomakesureweaddthetargetconfiguration filetoourcurrentprojectfiles. ClickFinishafterthelocationandfilenamehavebeenset. Anewwindowshouldnowappearthatistitledexample0.ccxml.Thisisthepreliminarytarget configurationwindowwhereparametersmustbesettoselectouremulator/programmerthat correspondstotheoneonourlabboard. T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh 9.InthetargetconfigurationwindowselectTexasInstrumentsXDS100USBEmulatorinthe Connectionpulldown.NextchecktheTMS320F28335deviceintheDevicescrollbar area.Seethecorrectsettingsbelow.OurtargetDSPistheF28335andtheemulator circuitrywehaveplacedonthelabboardisequivalenttothatusedbytheXDS100originally designedasastandaloneprogrammerbyTI. Savethisfileintheproject.Youcannowcloseitsincenofuturemodificationswillbemadetoit whenyouarewritingnewcodeordebuggingmachinecode. 10.Finallywearereadytobuild(assemble&link)theproject.PressProjectBuildActive Projectorsimplypresstheicononthetoolbar(recommendedtosavetimesinceyouwilldo thisseveralthousandtimesinthisclass)thatcorrespondstoBuildActiveProjectnearbythe printer(print)icon.Youshouldseezeroerrorsandwarningswhenyoubuildtheproject containingex0.asmandyoushouldalsoseethatamachinecodeoutputfileisgenerated calledexample0.out(seeFinishedbuildingtarget:example0.outintheconsolewindow). T2:CreatingaNewASMProjectwithCodeComposerStudio(CCS)Version4 EEL4744IntroductiontoMicroprocessorsUniversityofFlorida,Electrical&ComputerEng. DocumentRevision:3.0May,2009Authors:Dr.K.Gugel,W.Goh Thisendstheprojectcreation/buildtutorial.Refertothedebugtutorialtorun&testmachine codeExample0.out.Also,seetheFrequentlyAskedQuestionssectiononthenextpageformore informationrelatingtotimesavingtimewhenperformingCCScodedevelopment. FAQRelatingtoASMProjectCreation&Build: 1.DoIalwayshavetosavemyASMfileeverytimeImakeachangebeforebuilding? No,everytimeyoupresstheBuildActiveProjecticon,yourASMfileisautomaticallysavedfirst. 2.Iwanttostartwriting&debuggingcoderightaway,howdoIstartthedebugger? Createanewtargetfilewithanewname.i.e.NoBoardAttached.ccxmlInthisnewtargetfile,select Connection:TISimulatorandthenclickF283xCPUCycleAccurateSimulator.Nextclosethis windowtosavetheinformation.Youcannowselectbetweenthetwotargetfilesbyrightclicking oneandsettingit"active".Nowpressthelittlebugicon. 3.DoIneedtocreateanewworkspaceforeverylab? No,youcan(andshould)createallyouprojectsorlabsinthesameworkspace.Youcanjusthidethe projectsyouarenotusingbypressingthe""symboltotheleftoftheprojectname. 4.DoIneedadifferentLinkerCommandFileforeveryproject? No,insteadpointthelinkertothesamefileKG_RAM_Link1.cmdusedinyourfirstproject.Orsimply copytheKG_RAM_Link1.cmdfileintoeachnewprojectdirectoryandpointthelinkertoit. 5.CanIcreatetwoormoreprojectsinthesamedirectory? No,youneedtosaveeachprojectinadifferentdirectory.Ifyoutrytosavetwoprojectsinthesame folder,anerrormessageindicatingthatyournewprojectoverlapsthelocationofanotherproject willbeshowninthescreen.Itisrecommendedthatyoucreateadirectoryforeachlab(i.e.labs19) atthebeginningofthesemestersothatwhencreatinganewproject,allyouhavetodoisselectthe specificdirectorycreatedforthatproject. 6.WhenIhavemultipleprojectsopen,howdoIchoosewhichprojectisactive? ThisisperformedbyrightclickingontheprojectthatyouwanttomakeactiveandselectSetas activeproject.Allotherprojectswillbeignoredwhenyoubuildtheactiveone. ...
View Full Document

Ask a homework question - tutors are online