




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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页PlacingSectionsinMemory.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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 软件升级及维护合同
- 交通协管员聘用合同协议书
- 家禽购销合同
- 货品抵款结算协议书
- 应对市场变化的解决方案研究
- 兰州房屋租赁合同
- 机械租赁协议合同
- 第19课 治学须有疑无疑不成学-《怀疑与学问》(教学设计)九年级语文上册同步高效课堂(统编版)
- 第一单元学习任务《如何阐述自己的观点》教学设计 2023-2024学年统编版高中语文必修下册
- Unit 4 Fun with numbers 第二课时(教学设计)-2024-2025学年外研版(三起)(2024)英语三年级上册
- 光伏机器人行业报告
- 屋顶分布式光伏发电施工组织设计
- 践行志愿服务(下)
- 环境监测课件20-在线环境监测技术
- 《纸杯变变变》课件
- 《月历上的数字的奥秘》
- 汽车人才需求调查研究报告
- 班级公约(完美版)
- 医疗卫生监督协管巡查记录表
- 水利工程资料汇编全套
- 教科版科学四年级下册第一单元《植物的生长变化》单元作业设计
评论
0/150
提交评论