DSP28335教程3專業(yè)知識講座_第1頁
DSP28335教程3專業(yè)知識講座_第2頁
DSP28335教程3專業(yè)知識講座_第3頁
DSP28335教程3專業(yè)知識講座_第4頁
DSP28335教程3專業(yè)知識講座_第5頁
已閱讀5頁,還剩18頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

ProgrammingDevelopmentEnvironmentCopyright?2023TexasInstruments.Allrightsreserved.

TechnicalTrainingOrganizationT

TOModule2TMS320C28x?MCUWorkshop第1頁LearningObjectivesUseCodeComposerStudioto:CreateaProjectSetBuildOptionsCreateauserlinkercommandfilewhich:Describesasystem’savailablememoryIndicateswheresectionswillbeplacedinmemory第2頁LearningObjectivesUseCodeComposerStudioto:CreateaProjectSetBuildOptionsCreateauserlinkercommandfilewhich:Describesasystem’savailablememoryIndicateswheresectionswillbeplacedinmemory第3頁CodeComposerStudioCodeComposerStudioincludes:IntegratedEdit/DebugGUICodeGenerationToolsDSP/BIOSAsmLinkEditorDebugCompileGraphs,ProfilingCodeSimulatoreZdsp?ExternalEmulatorMCUBoardLibrarieslnk.cmdBuild第4頁CodeComposerStudio:IDEIntegrates:edit,codegeneration,anddebugSingle-clickaccessusingbuttonsPowerfulgraphing/profilingtoolsAutomatedtasksusingGELscriptsandCCSscriptingBuilt-inaccesstoBIOSfunctionsSupportsTIand3rdpartyplug-ins第5頁TheCCSProjectListoffiles:Source(C,assembly)LibrariesDSP/BIOSconfigurationfileLinkercommandfilesProjectsettings:Buildoptions(compiler,Linker,assembler,andDSP/BIOS)BuildconfigurationsProject(.pjt)filescontain:第6頁BuildOptionsGUI-CompilerGUIhas8pagesofcategoriesforcodegenerationtoolsControlsmanyaspectsofthebuildprocess,suchas:OptimizationlevelTargetdeviceCompiler/assembly/linkoptions第7頁BuildOptionsGUI-LinkerGUIhas3categoriesforlinkingSpecifyvariouslinkoptions.\DebugmeansthedirectorycalledDebugonelevelbelowthe.pjtfiledirectory$(Proj_dir)\Debugisanequivalentexpression第8頁DefaultBuildConfigurationsAdd/RemoveyourowncustombuildconfigurationsusingProjectConfigurationsEditaconfiguration:SetitactiveModifybuildoptionsSaveprojectFornewprojects,CCSautomaticallycreatestwobuildconfigurations:Debug (unoptimized)Release (optimized)Usethedrop-downmenutoquicklyselectthebuildconfiguration第9頁LearningObjectivesUseCodeComposerStudioto:CreateaProjectSetBuildOptionsCreateauserlinkercommandfilewhich:Describesasystem’savailablememoryIndicateswheresectionswillbeplacedinmemory第10頁SectionsAllcodeconsistsofdifferentpartscalledsectionsAlldefaultsectionnamesbeginwith“.”Thecompilerhasdefaultsectionnamesforinitializedanduninitializedsectionsint x=2;int y=7;voidmain(void){longz;z=x+y;}Globalvars(.ebss)Initvalues(.cinit)Localvars(.stack)Code(.text)第11頁CompilerSectionNamesName Description LinkLocation.text code FLASH.cinit initializationvaluesfor FLASH globalandstaticvariables.econst constants(e.g.constintk=3;) FLASH.switch tablesforswitchstatements FLASH.pinit tablesforglobalconstructors(C++)FLASHInitializedSectionsName Description LinkLocation.ebssglobalandstaticvariables RAM.stackstackspace low64KwRAM.esysmemmemoryforfarmallocfunctions RAMUninitializedSectionsNote: DuringdevelopmentinitializedsectionscouldbelinkedtoRAMsince theemulatorcanbeusedtoloadtheRAM第12頁P(yáng)lacingSectionsinMemory.ebss.cinit.textMemoryM0SARAM(0x400)0x0000000x3000000x000400M1SARAM(0x400)FLASH(0x40000)Sections.stack第13頁LinkingLinkerLink.cmd.map.obj.out

Memorydescription

Howtoplaces/wintoh/w第14頁LinkerCommandFileMEMORY{PAGE0:/*ProgramMemory*/FLASH:origin=0x300000,length=0x40000PAGE1:/*DataMemory*/M0SARAM:origin=0x000000,length=0x400M1SARAM:origin=0x000400,length=0x400}第15頁LinkerCommandFileMEMORY{PAGE0:/*ProgramMemory*/FLASH:origin=0x300000,length=0x40000PAGE1:/*DataMemory*/M0SARAM:origin=0x000000,length=0x400M1SARAM:origin=0x000400,length=0x400}SECTIONS{.text:>FLASHPAGE=0.ebss:>M0SARAMPAGE=1.cinit:>FLASHPAGE=0 .stack:> M1SARAM PAGE=1}第16頁Exercise2GenericF28xdeviceM0SARAM(0x400)M1SARAM(0x400)L0SARAM(0x1000)L1SARAM(0x1000)0x0000000x0004000x0080000x009000FLASH(0x40000)0x300000Createthelinkercommandfileforthegivenmemorymapbyfillingintheblanksonthefollowingslide第17頁MEMORY{PAGE__:/*ProgramMemory*/_____:origin=____

___,length=___

_________:/*DataMemory*/_______:origin=__

____,length=____________:origin=____

___,length=____________:origin=___

____,length=__

__________:origin=___

____,length=_

____}SECTIONS{.text:>FLASHPAGE=0.ebss:>M0SARAMPAGE=1.cinit:>FLASHPAGE=0.stack:>M1SARAMPAGE=1}Exercise2-CommandFile第18頁MEMORY{PAGE0:/*ProgramMemory*/

FLASH:origin=0x300000,length=0x40000

PAGE1:/*DataMemory*/

M0SARAM:origin=0x000000,length=0x400

M1SARAM:origin=0x000400,length=0x400

L0SARAM:origin=0x008000,length=0x1000

L1SARAM:origin=0x009000,length=0x1000}SECTIONS{.text:>FLASHPAGE=0.ebss:>M0SARAMPAGE=1.cinit:>FLASHPAGE=0.stack:>M1SARAMPAGE=1}Exercise2-Solution第19頁LinkerCommandFileSummaryMemoryMapDescriptionNameLocationSizeSectionsDescriptionDirectssoftwaresectionsintonamedmemoryregionsAllowsper-filediscriminationAllowsseparateload/runlocations第20頁Lab2:LinkerCommandFileSystemDescription:

TMS320F28335AllinternalRAMblocksallocatedPlacementofSections:

.textintoRAMBlockL0123SARAMonPAGE0(programmemory).cinitintoRAMBlockL0123SARAMonPAGE0(programmemory).ebssintoRAMBlockL4SARAMonPAGE1(datamemory).stackintoRAMBlockM1SARAMonPAGE1(datamemory)F28335Memoryon-chipmemory0x008000L0SARAM(0x1000)0x000400M1SARAM(0x400)0x00C000L4SARAM(0x1000)0x00B000L3SARAM(0x1000)0x000000M0SARAM(0x400)0x009000L1SARAM(0x1000)0x00A000L2SARAM(0x1000)0x00D000L5SARAM(0x1000)0x00E000L6SARAM(0x1000)0x00F000L7SARAM(0x1000)第21頁Lab2:Solution

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論