STM8开发环境建立.ppt
《STM8开发环境建立.ppt》由会员分享,可在线阅读,更多相关《STM8开发环境建立.ppt(36页珍藏版)》请在装配图网上搜索。
STM8开发环境建立,STM8开发环境建立,STM8处理器特点,通用特点MaxfCPU:Upto24MHz。1.6cycles/instruction。upto128KbytesFlash。upto2KbytestruedataEPROM。upto6Kbytes。Upto70userI/Os。,STM8处理器特点,CAN控制器特点Highspeed1Mbit/sactiveCAN2.0Binterface。3transmitmailboxes。1receiveFIFOwiththreestages。6scalablefilterbanks。TimeStamponSOFreceptionandtransmission。Errormanagement。,STM8处理器特点,MEMORYMAP,开发工具,软件:编译器:CXSTM8(cpstm8,cgstm8,costm8,castm8)连接器:CLNK编程支持工具:chex,clabs,clib,cobj,cv695,cvdwarf调试器:STVisualDevelop编程器:STVisualProgrammer硬件:仿真器Rlink仿真器STICE,CXSTM8,CompilerArchitecture(CXSTM8):cpstm8:theCpreprocessorandlanguageparser.cpstm8expandsdirectivesinyourCsourceandparsestheresultingtext.cgstm8-thecodegenerator.cgstm8acceptstheoutputofcpstm8andgeneratesassemblylanguagestatements.,CXSTM8,costm8-theassemblylanguageoptimizer.costm8optimizestheassemblylanguagecodethatcgstm8generates.castm8-theassembler.castm8convertstheassemblylanguageoutputofcostm8toarelocatableobjectmodule.,CLNK,CLINKclnkcombinesalltheobjectmodulesthatmaketheappropriatemodulesfromtheClibrary.,PROGRAMMING,编程支持工具:chex-absolutehexfilegenerator.clabs-absolutelistingutility.clib-buildandmaintainobjectmodulelibraries.cobj-objectmoduleinspector.cv695-IEEE695formatconverter.cvdwarf-ELF/DWARFformatconverter.,COMPILER,FileNamingConventions,COMPILER,MemoryModelsZeroPage:0 x000 xff,moreefficientthanLongRangevariables.longrange:0 x10017ff。,COMPILER,Step1:Compilingcxstm8options.c|sStep2:LinkingclnkoptionsStep3:GeneratinghexfilechexoptionsfileStep4:Generatingupdatafile,COMPILER,BUILD.BATcxstm8options:-l:createlisting+debug:producedebuginformation+modsl:selecttheStackLongmode.+warn:enablewarnings.+strict:enforcestrongertypechecking.,COMPILER,ce*:specifyapathfortheerrorfiles.-e:logerrorsfile.t*:specifypathfortemporaryfiles.-co*:specifyapathfortheobjectfiles.,CLNK,Clnkoption:-bs#:banksize-m*:mapfilename-o*:outputfilename-sa:sortsymbolbyaddress,CLNK,SV64E0_M8.lkf+seg-a*:makethecurrentsegmentfollowthesegment*-b*:setthephysicalstartaddressofthesegmentto*-ic:markthissegmentasmoveablesegment-m*:setthemaximumsizeofthesegmentto*bytes.,CLNK,-n:settheoutputnameofthesegmentto*.,CLNK,Segmenttype:.text:code(orprogram)section.fconst:largeconstantandliteraldata.const:constantandliteraldata.data:initializeddatainlongaddressingrangememory.bss:allnoninitializeddatainlongrangememory,CLNK,.bsct:initializeddatainthefirst256bytes.ubsct:noninitializeddatainthezeropage.fdata:largevariables.eeprom:anyvariableineeprom.bit:bitvariablesinthezeropage,RuntimeStartup,RuntimeStartup(crtsxf.s):EstablisharuntimeenvironmentforC.Include:Initializationofthedatasectionifany,ROMintoRAMcopyifrequired,Initializationofthestackpointer,mainorotherprogramentrypointcall,AnexitsequencetoreturnfromtheCenvironment.,RuntimeStartup,ROMCOPYTORAMAutomaticDataInitializationMoveableCode,RuntimeStartup,AutomaticDataInitializationThelinkerisabletoconfiguretheexecutableforanautomaticdatainitialization.Thismechanismisinitiatedautomaticallywhenthelinkerfindsthesymbol_idesc_inthesymboltable.,RuntimeStartup,MoveableCodeThelinkerallowsacodesegmenttobestoredintheROMpart,butlinkedatanotheraddresswhichissupposedtobelocatedinRAM.ThisfeatureisspeciallydesignedtoallowanapplicationtorunFLASHprogrammingroutinesorbootloaderfromtheRAMspace.,RuntimeStartup,Descriptor:ThestartingaddressandlengthofeachsegmenttobecopyedtoRAM.Format:dc.wstart_prom_address;dc.bflag;segmenttypedc.wstart_ram_addressdc.wend_prom_addressdc.b0;endofthedescriptor,RuntimeStartup,_idesc_:Theaddressofthedescriptor,builtbyclnk。,clabs,clabsoptionsfile-v:beverbose.ThenameofeachmoduleoftheapplicationisoutputtoSTDOUT.,chex,chexoptionsinputfileoutfile-f?:defineoutputfileformat.Default-fm,cvdwarf,cvdwarfoptionsinputfile-o*:outputfilename,DEBUG,Debug1.RunSTVisualDevelop.2.File|NewWorkspace,SelectWrapExecutable.SelectSV64E0.elf.,DEBUG,3.Enterok!,DEBUG,4.SelectMCUSTM8AF51AA.,DEBUG,5.Insertfilesintoproject.Project|Insertfilesintoproject.Selectallthe*.c,*.h*.sfilesoftheprojectintheopenwindow.,DEBUG,6.Selecttheemluator.BypressingDebuginstrument|TargetSettings.Thedialogforchoosetheemulutorwillbeopened.,DEBUG,.SelectSwimRlinkfortheRlinkemluator.SelectSwimSTicefortheSTiceemluator.TargetPortSelection:usb:/usb,DEBUG,7.StartDebug.BypressingDebug|StartDebugging,Startdebugtheproject.,UPDATA,HEXtoUPDATA.imgSV64平台MCU升级软件制作流程.doc,- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- STM8 开发 环境 建立
装配图网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文