MTK入门.docx
《MTK入门.docx》由会员分享,可在线阅读,更多相关《MTK入门.docx(16页珍藏版)》请在冰豆网上搜索。
MTK入门
MTK入门
(一)
来源:
作者:
发布时间:
2007-06-03
文档内容:
-》MTK软件架构
-》如何编译
-》开发目录结构解析
-》开发工具的了解
-》程序入口,程序导读
-》MMI的制作
1. MTK软件构架
参考文档:
MT6218_SW_ReleaseNote.pdf
MTK为MediaTek公司提供的GSM软件方案。
它包含5个部分:
-》L1协议
-》设备驱动
-》协议栈
-》MMI
-》WAP应用
MediaTek为用户提供3个工具:
-》Catcher
-》META
-》MCT
MTK软件架构图:
下面3个部分组成该软件方案:
1.MSExecutableSoftware,whichisthesoftwarerunningontheMS,includesthefollowingmodules
-OS:
NucleusOS.
-L1ProtocolStack:
GSMphysicallayer.
-Drivers:
devicedriver,likeSIM,UART,GPIO,etc.
-L2/L3protocolstack:
GSMprotocolstacklayer.
-MMI:
man-machineinterface.
-WAP:
Wirelessapplicationprotocol.
-JAVA:
J2MESoftware
2.TheMobileEngineeringTestingArchitecture,alsoknownasMETA
3.Catcher
-》OS
MediaTek采用NucleusOS实时操作系统。
KALOS层为MediaTek’s软件和Nucleus操作系统的接口。
它为任务提供许多系统服务函数,比如计时器,队列,内存管理,事件等等。
-》L1ProtocolStack
ThephysicallayerorLayer1supportsthetransferofbitstreamsontheradiomediumaccordingtotheTechnicalSpecificationsofthe05-series.Itprovidesservicetoupperlayersandcontrolthemappingandschedulingbetweenthelogicalandphysicalchannels.TheTDMAframingandradiocontrolpartsarealsoimplemented.
Layer1Asynchronous:
handlesthemessagerequestfromupperlayersandforwardtheresultgeneratedbylayer1toupperlayer.
SurroundingCellEngine:
handlestheneighborcellpowermeasurementandneighborcellsynchronizationinformationacquisition.
Layer1Control:
handlestheTDMAschedulingontheradioenvironment,includingtimingadvanceandpowercontrolcommandfromservingbasestation.
Layer1Driver:
handlestheDSPandRadiocontrol
MTK入门
(二)
来源:
作者:
发布时间:
2007-06-03
-》Drivers
MCU外围设备的驱动,如下:
SIM:
SubscriberIdentityModule
UART:
UniversalAsynchronous Receiver/Transmitter
SPI:
SerialPortInterface
LCD:
Liquid CrystalDisplay
GPIO:
GeneralPurposeInput/Output
GPT:
General PurposeTimer
RTC:
RealTimeClock
WDT:
WatchDogTimer
PWM:
PulseWidthModulation
Alerter
Keypad
PMIC:
Power ManagementIC
BMT:
BatteryChargingManagementtask
AUXtask:
Auxiliarytask
ADCSched.:
AnalogtoDigitalConverterScheduler
USBtask:
TheUSB1.1protocolanddriver
IrDAtask:
TheIrDAanddriver
Camera:
Cameradriverforintegratingwith3rdpartycameramodule
MSDC:
Memorycarddriver,supportingSD,MMCcardsandMemoryStick
JPEGDecoder:
SoftwareforcontrollinghardwareJPEGdecoder
-》L2/L3/L4ProtocolStack
这部分包含大量的GSM/GPRS需求以及提供一个优秀的GSM/GPRS平台给应用程序。
本地MMI和远程PC通过AT命令可以方便的使用该软件平台。
详细的结构如下:
RMI:
远程MMI,比如PC端,可以使用AT命令通过串口与协议栈进行通讯。
FMI:
FeaturerichMMI,described intheabovesection.Thisistheproductionco-workedwithPixtel.
L4:
Layer4.L4isataskthroughwhichFMIand/orRMIcommunicatewithPS.L4taskincludesseveralsub-modules.
ATCI:
ATcommandinterpreter.Interprets theATcommandsfromPCsideandcommandstheL4Ctodotherelativeactions.
L4A:
L4adaptationlayerforFMI.TheSAPbetweenFMIandL4Ais primitivebase.
L4C:
L4controlentity.Handlesallapplicationsrequest andresponse.
UEM:
Userequipmentsadaptation.Adaptationfordrivers, likeKeypad,LED,GPIO,Audio…etc.
PHB:
Phonebookmanagement.Handles thephonebooksrelatedprocessing,like:
sorting…etc.
SMU:
SIM managementunit.Handlethesecuritymanagement,andSTK.
CSM:
Circuit switchingprotocolstackmanagement.
RAC:
Registrationaccesscontrol.
SMSAL:
Shortmessageserviceapplicationlayer.
TCM:
Terminal contextmanagement.
NVRAM:
Non-volatileRAM.Thisisadaptationlayerto flashmemory.
SIM:
Subscriberidentitymodule.HandleSIMbehavioras ETSI11.11description.
DATA:
Circuitswitcheddataservice.Datatask includesseveralsub-modules.
FAX:
Group3Facsimile.
TDT:
Transparentcircuitswitchingdata.
L2R:
Layer2relayprotocolfor non-transparentcircuitswitchingdata.
RLP:
Radiolinkprotocolfor non-transparentcircuitswitchingdata.
CC:
Circuit-switchedcall control.
SS:
Supplementaryservice.
SMS:
Shortmessageservice.
SM:
Sessionmanagement.
MM/GMM:
Mobilitymanagement/GPRSmobility management.
SNDCP:
Subnetworkdependentconvergenceprotocol.
LLC:
Logicallinkcontrol.
RR:
Radioresourcemanagement.RRtaskincludes severalsub-modules.
RRM:
HandlescellselectionandPLMNselection.
RMPC:
HandlestheproceduresinIdle/Dedicatedstateincludingthe surroundingcellschemeandmeasurementreporting.
LAPDM:
Handlesthe proceduredefinedinGSMlayer2.
RLC:
Radiolinkcontrolprotocol.
MAC:
Mediumaccesscontrolprotocol.
MPAL:
AdaptationlayerforRRand L1A.
PPP:
PointtoPointprotocollayer.ThisisclientPPPlayer.
MTK入门(三)
来源:
作者:
发布时间:
2007-06-03
-》MMI
这部分包括用户的接口架构,应用以及和协议栈的通讯。
Framework:
Thiscoversthat
OSL:
OSadaptationlayer
Task:
communicationwithL4task.
Filesystem:
communicationwith storagedevice.
GUI:
Thiscoversthat
Theme
UIcomponent
Categoryscreen
Font
Editor
T9orEziinputmethod.
AccessLCDdriver.
Customizationtool.
Application
Phonebook
Messages(SMS,EMS4.0,CB)
Callhistory
Setting.(Phonesetting,networksetting,securitysetup)
5kindsof userprofiles
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.bat
Itwillparsecommandlinetodetermineprojectname,platform,andaction.Meanwhile,checking\makedirectoryexistornotandcheckingcommandlineargumentislegalornot.Afterchecking,toexecutebuildscriptGSM2.makbuildscripttoperformaction.
使用:
Usage:
Make[custom=customername][module]"
custom=Monza
project=GPRS(GSMonly)
action=new(clean,scan,compile,link)(default)
=update(scan,compile,link)
=remake(compile,link)
=clean(clean)
module=componentmodulename(nucleus,l1,...)
Example:
Tomake/buildnewGPRSproject,cleanalloldobjects,libraries,andlogfilesetc.,thenewactionalsocreatesnecessarydirectoriesandremovesalltemporaryfiles,andflusheslogfilesautomatically.
d:
>\pvcs\maui\mcu\Makecustom=MonzaGPRSnew
Toupdateprojectdependency,andcompilechangedmodules,link.Noticethat,updateandremakeactionwon’tremovetemporaryfiles,andflushlogfile.Buildresultswillbeappendafterlastlogfile.
d:
>\pvcs\maui\mcu\Makecustom=MonzaGPRSupdate
Torecompilechangedfiles,andlink
d:
>\pvcs\maui\mcu\Makecustom=MonzaGPRSremake
Tocleanallobjects,temporaryfiles,libraries,andexecutablebinaries.Meanwhilelogfilewillalsobeflushed.
d:
>\pvcs\maui\mcu\Makecustom=MonzaGPRSclean
Tocleandedicatedinitmodules’objectslibraries.Meanwhilelogfilewillalsobeflushed.
d:
>\pvcs\maui\mcu\Makecustom=MonzaGPRScleaninit
-》howtocustomizeyourbuildenvironment
!
!
!
Toaddsomemodulesintoorremovesomemodulesfromthebuildingprocedure.
Tocompletethiskindofconfiguration,itisnecessarytounderstandthefollowingvariablesinthemakefile
Monza_GPRS.mak
COMPLIST:
listallsourcecodemodulescanbebuiltto.lib.Ininitialcustomrelease,COMPLIST
shouldbethesumofCUS_REL_SRC_COMPandCUS_REL_PAR_SRC_COMP.Thefollowingistheinitialsettingincustomrelease.
ifeq($(strip$(CUSTOM_RELEASE)),TRUE)
COMPLIST=$(strip$(CUS_REL_SRC_COMP))
COMPLIST+=$(strip$(CUS_REL_PAR_SRC_COMP))
endif
CUS_REL_MTK_COMP:
listallmodulesprovidedwith.libonly.These.libareputin\mcu\mtk_libs.
Ifyouwanttoaddasourcemodule
1、addthemodule"xyz"(inlowercase)intoCOMPLIST.
ifeq($(strip$(CUSTOM_RELEASE)),TRUE)
COMPLIST=$(strip$(CUS_REL_SRC_COMP))
COMPLIST+=$(strip$(CUS_REL_PAR_SRC_COMP))
COMPLIST+=xyz
endif
2、addafolder“mcu\make\xyz”forxyz.lis,xyz.inc,xyz.pth,xyz.def.
-》编译生成的文件以及log
1.编译的log在目录C:
\code_100\build\a100中的MT6218B.log。
目录C:
\code_100\build\a100\log下的log文件为各个模块编译时生成的log。
2.编译生成的bin为C:
\code_100\build\a100下的a100_PCB01_gprs_MT6218B_FN.W05_12.bin。
3.编译生成的目标文件在C:
\code_100\build\a100\gprs\MT6218Bo目录中。
3、开发目录结构解析
参考文档:
wcr-MTK_MakeBuild_Design_Customer_040930.pdf
目录结构:
MTK入门(四)
来源:
作者:
发布时间:
2007-06-03
4.开发工具的了解
参考目录《工具》中的文件。
工具:
-》Catcher
CatcherisaPC-sidetoolforMTKGSM/GPRSProducts.ThemainpurposeofCatcherisforloggingprimitivesanddebuginformation.EngineerscanuseCatchertoanalyzethebehaviorofmobilephones.
-》META
META(MobileEngineeringTestingArchitecture)isdesignedtoprovidethefunctionalityofRFtesting,NVRAMaccesstesting,speechrelatedtestingofadvancedfeature–melodyandvoicememo.
-》MCT
UI制作工具,包括菜单制作,图片制作,字体制作等等。
5.程序入口,程序导读
-》MMI任务入口:
C:
\code_100\plutommi\mmi\Framework\Tasks\TasksSrc
中文件MMITask.c函数MMI_task。
-》MMI任务的建立:
C:
\code_100\plutommi\mmi\Framework\Osl\OslSrc
中文件pixtelMMI.c函数WinMain调用InitApplication函数,在该函数中建立MMI任务,建立任务的接口函数为:
osl_create_task。
-》MMI任务信息:
{"MMITASK"(任务名称),"MMIQ"(队列名称),127(优先级),4096(堆栈大小),MAX_PRT_NODES(队列结点个数),MMI_task(任务入口)}。
-》MMI模块入口:
目录C:
\code_100\plutommi\mmi中为MMI各个模块的代码。
比如闹钟模块,源代码在C:
\code_100\plutommi\mmi\Alarm\AlarmSrc中,头文件在C:
\code_100\plutommi\mmi\Alarm\AlarmInc中。
首先找到初始化闹钟的函数AlmInit,该函数定义在选择闹钟菜单项时调用函数HighlightAlmMenu进入闹钟功能。
6.MMI的制作
参考文档:
文件名
文件内容描述
APIForWritingApplicationsUsingPixtelMMIPlatform.pdf
各类窗口列表
WritingApplicationsUsingPixtelMMIPlatform.pdf
如何写应用程序
MMI2.0DesignDOC和MMIDesignDoc目录中对MMI中的各个模块进行描述,因此在研究某一模块时可以在这两个文件夹中找到该模块的介绍,通过