MTK入门标签:MTK入门2008-04-1520:23文档内容:-》MTK软件架构-》如何编译-》开发目录结构解析-》开发工具的了解-》程序入口,程序导读-》MMI的制作1.MTK软件构架参考文档:MT6218_SW_ReleaseNote.pdfMTK为MediaTek公司提供的GSM软件方案。它包含5个部分:-》L1协议-》设备驱动-》协议栈-》MMI-》WAP应用MediaTek为用户提供3个工具:-》Catcher-》META-》MCTMTK软件架构图:下面3个部分组成该软件方案:1.MSExecutableSoftware,whichisthesoftwarerunningontheMS,includesthefollowingmodules-OS:NucleusOS.-L1ProtocolStack:GSMphysicallayer.-Drivers:devicedriver,likeSIM,UART,GPIO,etc.-L2/L3protocolstack:GSMprotocolstacklayer.-MMI:man-machineinterface.-WAP:Wirelessapplicationprotocol.-JAVA:J2MESoftware2.TheMobileEngineeringTestingArchitecture,alsoknownasMETA3.Catcher-》OSMediaTek采用NucleusOS实时操作系统。KALOS层为MediaTek’s软件和Nucleus操作系统的接口。它为任务提供许多系统服务函数,比如计时器,队列,内存管理,事件等等。-》L1ProtocolStackThephysicallayerorLayer1supportsthetransferofbitstreamsontheradiomediumaccordingtotheTechnicalSpecificationsofthe05-series.Itprovidesservicetoupperlayersandcontrolthemappingandschedulingbetweenthelogicalandphysicalchannels.TheTDMAframingandradiocontrolpartsarealsoimplemented.Layer1Asynchronous:handlesthemessagerequestfromupperlayersandforwardtheresultgeneratedbylayer1toupperlayer.SurroundingCellEngine:handlestheneighborcellpowermeasurementandneighborcellsynchronizationinformationacquisition.Layer1Control:handlestheTDMAschedulingontheradioenvironment,includingtimingadvanceandpowercontrolcommandfromservingbasestation.Layer1Driver:handlestheDSPandRadiocontrol-》DriversMCU外围设备的驱动,如下:?SIM:SubscriberIdentityModule?UART:UniversalAsynchronousReceiver/Transmitter?SPI:SerialPortInterface?LCD:LiquidCrystalDisplay?GPIO:GeneralPurposeInput/Output?GPT:GeneralPurposeTimer?RTC:RealTimeClock?WDT:WatchDogTimer?PWM:PulseWidthModulation?Alerter?Keypad?PMIC:PowerManagementIC?BMT:BatteryChargingManagementtask?AUXtask:Auxiliarytask?ADCSched.:AnalogtoDigitalConverterScheduler?USBtask:TheUSB1.1protocolanddriverIrDAtask:TheIrDAanddriverCamera:Cameradriverforintegratingwith3rdpartycameramoduleMSDC:Memorycarddriver,supportingSD,MMCcardsandMemoryStickJPEGDecoder:SoftwareforcontrollinghardwareJPEGdecoder-》L2/L3/L4ProtocolStack这部分包含大量的GSM/GPRS需求以及提供一个优秀的GSM/GPRS平台给应用程序。本地MMI和远程PC通过AT命令可以方便的使用该软件平台。详细的结构如下:?RMI:远程MMI,比如PC端,可以使用AT命令通过串口与协议栈进行通讯。?FMI:FeaturerichMMI,describedintheabovesection.Thisistheproductionco-workedwithPixtel.?L4:Layer4.L4isataskthroughwhichFMIand/orRMIcommunicatewithPS.L4taskincludesseveralsub-modules.?ATCI:ATcommandinterpreter.InterpretstheATcommandsfromPCsideandcommandstheL4Ctodotherelativeactions.?L4A:L4adaptationlayerforFMI.TheSAPbetweenFMIandL4Aisprimitivebase.?L4C:L4controlentity.Handlesallapplicationsrequestandresponse.?UEM:Userequipmentsadaptation.Adaptationfordrivers,likeKeypad,LED,GPIO,Audio…etc.?PHB:Phonebookmanagement.Handlesthephonebooksrelatedprocessing,like:sorting…etc.?SMU:SIMmanagementunit.Handlethesecuritymanagement,andSTK.?CSM:Circuitswitchingprotocolstackmanagement.?RAC:Registrationaccesscontrol.?SMSAL:Shortmessageserviceapplicationlayer.?TCM:Terminalcontextmanagement.?NVRAM:Non-volatileRAM.Thisisadaptationlayertoflashmemory.?SIM:Subscriberidentitymodule.HandleSIMbehaviorasETSI11.11description.?DATA:Circuitswitcheddataservice.Datataskincludesseveralsub-modules.?FAX:Group3Facsimile.?TDT:Transparentcircuitswitchingdata.?L2R:Layer2relayprotocolfornon-transparentcircuitswitchingdata.?RLP:Radiolinkprotocolfornon-transparentcircuitswitchingdata.?CC:Circuit-switchedcallcontrol.?SS:Supplementaryservice.?SMS:Shortmessageservice.?SM:Sessionmanagement.?MM/GMM:Mobilitymanagement/GPRSmobilitymanagement.?SNDCP:Subnetworkdependentconvergenceprotocol.?LLC:Logicallinkcontrol.?RR:Radioresourcemanagement.RRtaskincludesseveralsub-modules.?RRM:HandlescellselectionandPLMNselection.?RMPC:HandlestheproceduresinIdle/Dedicatedstateincludingthesurroundingcellschemeandmeasurementreporting.?LAPDM:HandlestheproceduredefinedinGSMlayer2.?RLC:Radiolinkcontrolprotocol.?MAC:Mediumaccesscontrolprotocol.?MPAL:AdaptationlayerforRRandL1A.?PPP:PointtoPointprotocollayer.ThisisclientPPPlayer.-》MMI这部分包括用户的接口架构,应用以及和协议栈的通讯。Framework:Thiscoversthat?OSL:OSadaptationlayer?Task:communicationwithL4task.?Filesystem:communicationwithstoragedevice.?GUI:Thiscoversthat?Theme?UIcomponent?Categoryscreen?Font?Editor?T9orEziinputmethod.?AccessLCDdriver.?Customizationtool.?Application?Phonebook?Messages(SMS,EMS4.0,CB)?Callhistory?Setting.(Phonesetting,networksetting,securitysetup)?5kindsofuserprofiles?Funandgames?Organizers?Services?Shortcuts?Incallmanagement.?Interruptevents,likecharging,alarm.-》WAP如何编译参考文档:wcr-MTK_MakeBuild_Design_Customer_040930.pdf-》编译环境操作系统:Windows2000,WinXP.推荐Windows2000withSP2orlater.编译器:ADS(ArmDeveloperSuite)v1.2.Perl解析:ActivePerl.推荐使用ActivePerl5.6.1版本-》make.batItwillparsecommandlinetodetermineprojectname,platform,andaction.Meanwhile,checking\makedirectoryexistornotandcheckingcommandlineargumentislegalornot.Afterchecking,toexecutebuildscriptGSM2.makbuildscripttoperformaction.使用:Usage:Make[custom=customername]projectplatformaction[module]custom=Monzaproject=GPRS(GSMonly)action=new(clean,scan,compile,link)(default)=upda