首页 MTK学习文档\官方文档MTK6225\System_and_Debug\System_Service\System_Service_FAQ_V0.4

MTK学习文档\官方文档MTK6225\System_and_Debug\System_Service\System_Service_FAQ_V0.4

举报
开通vip

MTK学习文档\官方文档MTK6225\System_and_Debug\System_Service\System_Service_FAQ_V0.4MediaTekSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FileSystemandFlashDiskDocumentsNumber:Preliminary(Released)InformationRevision:0.40ReleaseDate:December,16,2005SystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,Filesyste...

MTK学习文档\官方文档MTK6225\System_and_Debug\System_Service\System_Service_FAQ_V0.4
MediaTekSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FileSystemandFlashDiskDocumentsNumber:Preliminary(Released)InformationRevision:0.40ReleaseDate:December,16,2005SystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDiskRevisionHistoryRevisionDateAuthorComments0.1001/26/2005ShalynChuaInitialversion.0.2008/23/2005ShalynChuaAddFAQ4.1.0.3008/26/2005KarenHsuAddchapter5forfilesystem(5.1~5.10)0.4012/16/2005ShalynChua/Add6.1KarenHsuMediaTekConfidentialRevision0.40–December,16,2005Page:2of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDiskIndexTableRevisionHistory...........................................................................................................................................................2IndexTable....................................................................................................................................................................31CompilingTool....................................................................................................................................................41.1Howtoresolvethelinkerror“Error:L6218E:UndefinedsymbolImage$$ZI$$Limit”?...................................42NucleusPlus.......................................................................................................................................................52.1MayIknowyourNucleusPlusversion?.........................................................................................................52.2MayIknowtheMTKmodificationlistonNucleusPlus?.................................................................................53KAL.......................................................................................................................................................................64SystemConfiguration.........................................................................................................................................74.1Isitpossibletoloadanimageon2+6,dual-banksNOR-flash?.....................................................................75FileSystem..........................................................................................................................................................85.1MyNANDflashis128MBbutthetotalsizeinfilemanagerisonly120MB.Why?.........................................85.2WhycannotformatmyUSBdrive(32MB)inwindowstoFAT32?..................................................................85.3HowmanypartitionssupportedinNOR/NANDflash?Howtomakepartitionsonit?.....................................85.4Mydiskisnotfull.ButwhycannotIputmorethingsintorootfolder?............................................................95.5What’sisquotafull(-50)?HowcanIdealwithit?........................................................................................105.6WhycanIseeNVRAMfolderonPCinUSBmode?....................................................................................105.7CanImovesystemdrive(withNVRAM)toNANDflash?.............................................................................105.8IsthereanylimitationonRead/Writedatasizeinfilesystem?.....................................................................105.9Afterdeletingsomefiles,thefreespaceisshrinking1KB.Why?Whydoesfilesystemtake10KBwhileIaddafilewithonly9KB?..................................................................................................................................................115.10Whydoesfreespacekeepchangingafterbootingup?Whyisn’tthefreespaceequaltothedrivespacedisplayedinfilemanagerevenifIcleanupallthefiles/folders?...............................................................................116FlashDisk..........................................................................................................................................................126.1IsthereanylimitationonblocknumberofNORflash-driver?.......................................................................12MediaTekConfidentialRevision0.40–December,16,2005Page:3of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk1CompilingTool1.1Howtoresolvethelinkerror“Error:L6218E:UndefinedsymbolImage$$ZI$$Limit”?DescriptionfromADS1.2ReleaseNoteJanuary2002asbelow,Thedefaultimplementationof__user_initial_stackheap()providedinClibraryusesImage$$ZI$$LimitandSWISYS_HEAPINFO(0x16).Librarywhichneedsheapfunction,forinstancemalloc,calloc,realloc,free,assertetc.,linkerwilldefinitelylookforthelinkersymbol.InMAUI,weuseourownscatterloadingfile,furthermore,__user_initial_stackheap()isapseudofunction;inotherwords,wedonotrelyonADSrun-timememorymodellikeheap.Theerrorisinevitableifheapfunctionlibraryiscalled.Toresolvethelinkerror,pleasereplacethefunctionswithKALprovidedutilities.PleaserefertoSystemServiceUserManual_200xxxxx.docfortheirdetailedusage.ADSLibraryMAUImallocget_ctrl_bufferfreefree_ctrl_bufferassertASSERTorEXT_ASSERTMediaTekConfidentialRevision0.40–December,16,2005Page:4of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk2NucleusPlus2.1MayIknowyourNucleusPlusversion?OurNucleusPlusversionisV1.11.19.2.2MayIknowtheMTKmodificationlistonNucleusPlus?Pleaseclick!NucleusModificationItems. ppt 关于艾滋病ppt课件精益管理ppt下载地图下载ppt可编辑假如ppt教学课件下载triz基础知识ppt foryouranswer.MediaTekConfidentialRevision0.40–December,16,2005Page:5of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk3KALMediaTekConfidentialRevision0.40–December,16,2005Page:6of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk4SystemConfiguration4.1Isitpossibletoloadanimageon2+6,dual-banksNOR-flash?Yes,itispossible,butslightmodificationonmemorylayout.Pleasereferto!Maui_load@dual_bank_flash_disk.pptfordetaileddescription.MediaTekConfidentialRevision0.40–December,16,2005Page:7of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk5FileSystem5.1MyNANDflashis128MBbutthetotalsizeinfilemanagerisonly120MB.Why?Driverwillreservesomediskspaceforitsmanagementdata.Youcouldseemostofthedisksdonotprovidetheavailablediskspaceaslargeastheydeclaretobe.(Iftheydo,theymayactuallymanufacturelargerdiskspaceastheydeclare.)Hereisthereservedspaceinourflashdriver(unit:Bytes):[NORflash]1.5*MAX_BLOCK_SIZE+8K[NANDflash](NUMBER_OF_BLOCK–POOL_SIZE*(NUMBER_OF_REGION+1))*PAGES_PER_BLOCK*512PS.thePOOL_SIZEiscustomizableinflashconfigurationfile5.2WhycannotformatmyUSBdrive(32MB)inwindowstoFAT32?Thereasonyoucannotformat32MBNANDflashtoFAT32is"SPECrestriction".(1)InFAT32SPEC,theminimumnumberofclusteris65525andtheminimumsizeofsectoris512bytes.Evenifoneclusterisequalto1sector,theminimumsizeofFAT32cansupportis31.995MB(~32MB).(2)Foranykindofdisk,theflashdriverwillreservesomespaceforitsmanagementdata.Youcouldseeallkindsofdisk,includingharddisk,doesnotprovideallofthediskspaceforuserstorageasthesizetheydeclare.(3)Whenyoutrytoformat32MBNAND,thedriverwillreportonlyabout30MB(not32MB)disksizetowindows.That'swhywindowscannotformatittoFAT32.(4)Inourfilemanager,weusethealgorithmtopickupthebetterformattypefordifferentdisk"usable"size,i.e.inthiscase,wepickupFAT16insteadofFAT32.That'swhyitcanbeformattedsuccessfullyinphone.5.3HowmanypartitionssupportedinNOR/NANDflash?Howtomakepartitionsonit?Tohavebettercontrolonresource,wesupportuptotwopartitions(drives)onthesameflashdisksimultaneously.Thestepstomakepartitionsasfollows:(1)Specifythetotalnumberofpartitions(drives)inyourprojectforbetterRAMutilization.\mcu\custom\system\PROJECT\fs_config.cconstUINTFS_MAX_DRIVES=X;“X”isthetotalnumberofyourdrive.Forexamples,ifthereareonedriveonNORflash,onedriveonNANDflash,andmemorycard,thenXis3here.IfyouhavetwodrivesonNORflashandmemorycard,thenXisalso3here.(2)Designthesizeofyourfirstpartition.\mcu\custom\flash\PROJECT\NANDFlashConf.c#definePARTITION_SIZEYMediaTekConfidentialRevision0.40–December,16,2005Page:8of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDiskTheunitof“Y”is512Bytes(sector).[Note]Thesizeofthesecondpartitionisnottheflashsizeminus“Y”directly!Rememberthatflashdriverwillreservesomespaceforhimself(section5.1).Foranexample,ifyourNANDflashis32MBandyouspecifyYis28MB,thesecondpartitionmayonlybe2MBinsteadof4MB!(3)Writeprogramtogetthedrivename.YoucouldrefertofilesystemAPIdocumentforusageofFS_GetDrive().FileSystem_Document_20050216_W05.09.pdf(filenameillustratethereleasedateandSWversion)ThereissamplecodeinsidewhichcanteachyoutousetheAPItogetthedriveletterinyourprogram.Foranexample,ifyoumaketwopartitionsonyourNANDflash,andyouwanttoknowthedriveletterofthesecondpartitioninyourproject,youcouldusethefollowingcode:FS_GetDrive(FS_DRIVE_I_SYSTEM,2,FS_NO_ALT_DRIVE);[Note]Onceyouknowthedrivenameinyourproject,youcouldeasilyaccessitthroughtheMETAtool,too.Ifyoudon’twanttowriteprogramtogetit,youstillcanlookupthedrivetablemappinginthefilesystemdocumentviatakealookatthedescriptionofFS_GetDrive().(4)Besuretodolow-levelformatonyourflashdisktomakeittakeeffectiveviaflashtool.5.4Mydiskisnotfull.ButwhycannotIputmorethingsintorootfolder?InFATSPEC,underrootdirectory,thereismaximumnumberof"DIRECTORYENTRY"restriction.Hereisoursetting:FAT12Î128FAT16(FAT)Î512FAT32ÎnorestrictionWhentheDIRECTORYENTRYisrunout,evenifthereisstillfreespace,youcannotaddanythingintorootdirectory.However,thereisnosuchrestrictioninothersub-folder.HowtocounttheDIRECTORYENTRY?Itonlydependson"file/foldername".SFN:ShortFileName(EachDIRECTORYENTRYcancontain11bytesfororiginalencoding)LFN:LongFileName(EachDIRECTORYENTRYcancontain13wordsforunicodeencoding)[Example1]file/foldername:12345678.txtIt'sallASCIIandfit8.3formatÎItcosts1DIRECTORYENTRY[Example2]file/foldername:中文.txtBecausethereisnon-ASCIIÎItcosts1DIRECTORYENTRYforSFN(big5encoding)+1DIRECTORYENTRYforLFN(unicodeencoding)ÎTotal2DIRECTORYENTRY[Example3]file/foldername:12345678901234567.txtAlthoughtheyareallASCII,butitexceeds8.3formatÎItcosts1DIRECTORYENTRYforSFN+2DIRECTORYENTRYforLFN(1234567890123and4567.txt)ÎTotal3DIRECTORYENTRYIfyourfile/foldernamecontainsnon-ASCIIcodeortoolong(over8.3format),itwillcostmorethan1DIRECTORYENTRY,i.e.youonlycanputmaybe(dependsonyourname)100~300files/folderinsiderootdirectoryforFAT16.MediaTekConfidentialRevision0.40–December,16,2005Page:9of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk5.5What’sisquotafull(-50)?HowcanIdealwithit?Weimplementquotamanagementonsystemdrive(thedrivewithNVRAMfolder).Manyapplicationtaskswillneedahiddenspacetoputtheirprivatedata.Tomakesurethesystemdriveisbigenoughtotoleratethesedata,quotamanagementisturnedon.Allofthesystemdriveusershavetoregistertheirownfoldersinthefollowingcustomizablefile:(moredetailsaboutquotamanagementisdescribedinthisfile)\mcu\custom\system\PROJECT\fs_config.cTheapplicationtaskscanspecifythereservedspaceorlimitationbythemselves.Atruntime,ifyougetthiserror,itmeansyourtaskrunoutofitsquotaorit’saninvalid(un-registered)useronsystemdriveandthereisnofreespaceforinvaliduser(usuallyaninvaliduserisalsoallowedtooccupysystemdrivespaceifthereisstillfreespaceleftfromthetotalreservedspaceandNVRAM).Trytoregisteryourfolderinsystemdriveorenlargethereservedspaceinthiscaseifthereisstillhavespaceinsystemdrive.(Innon-productionrelease,ifthesystemdriveisnotbigenoughtocontainallofyourapplicationfeatures,itwilltakeassertionatbootuptime.)Orredesignyourprogramtolessrelyonputtingfilesintosystemdrive.Ifyoustillneedhiddenspacetoputyourprivatefiles,youcouldtrytomakesecondpartitionsonNANDflash(section5.3)ifyouhaveit.[Note]Thisfeatureiscustomizable,youcouldasktoturnoffthisfeatureinmakefile(FS_QM_SUPPORT=FALSE)andre-newyourprojecttotakeeffective.5.6WhycanIseeNVRAMfolderonPCinUSBmode?ItmeansyouforgettodotherightUSBcustomization.BecausewindowssystemonlycanseethefirstpartitionoftheUSBdevice,ifyoudon’thavetwopartitionsonyourNORflash,i.e.youonlyhavesystemdriveonNORflash,youshouldnotregisteryourNORflashdriverintoUSBtaskasfollows:\mcu\custom\drv\misc_drv\PROJECT\custom_drv_init.c//USB_Ms_Register_DiskDriver(&USB_NOR_drv);5.7CanImovesystemdrive(withNVRAM)toNANDflash?Inournewerdesign,thereisoptioninmakefiletoallowthischange:SYSTEM_DRIVE_ON_NANDIfyouturnonthisfeature,filesystemwilltrytoallocatesomememoryforsanitycheckonyoursystemdrivewheneachtimebootingupafterpowerlossunexpectedly.Also,youshouldmakesurethatyouhavemadepartitionsonyourNANDflashfirstifyoustillwanttokeepamassstoragedataspaceonNAND.5.8IsthereanylimitationonRead/Writedatasizeinfilesystem?No.Thereisnolimitation.Inourfilesystem,aslongasyouhaveenoughdatabuffer,thereisnosizelimitationonthefilesystemAPIforreadorwriteatonetime.MediaTekConfidentialRevision0.40–December,16,2005Page:10of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk5.9Afterdeletingsomefiles,thefreespaceisshrinking1KB.Why?Whydoesfilesystemtake10KBwhileIaddafilewithonly9KB?ThisisrelatedtoFATsystemdesign.InFATsystem,ifyouaddafile,youwillneedtoallocatemultipleof32bytesspaceforyourfilerelatedinformation(DIRENTRY).ItwillcostonemoreclusteroftheparentfolderifthereisnofreespaceforadditionalDIRENTRYunfortunately.Whenyoudeleteyourfile,theDIRENTRYismarkedasdeleted(0xE5)onthefirstbyeinsteadoferasingitandreleasingthecluster.ThedeletedDIRENTRYwillbereusedwhenyouaddanewfileintothisfoldernexttime.Ifyourclusterisequaltotwosectors(1clusterisequalto1KB),youwillseethisphenomenon.Theshrinkingspaceisrelatedtoyourclustersizeandyourscenario.Ifyouaddmanyfilesintosamefolder,theshrinkingspacewillincreaseduetoDIRENTRYallocationandthisallocationiscountedasthedatacontentofthisfolder.However,whenyouremovethewholefolder,thedeletedclusterwillbereleasedautomatically.5.10Whydoesfreespacekeepchangingafterbootingup?Whyisn’tthefreespaceequaltothedrivespacedisplayedinfilemanagerevenifIcleanupallthefiles/folders?Ourapplicationtasksmaycreatesomehiddenfiles/foldersintheuserdrive.Theywilltrytoadd/delete/updatetheirhiddendataespeciallyatthebootuptime.That’swhyyoucanseethefreespaceiskeepingchangingandapproachtobestableafterseveralminutes.Ifyouwanttoremovethehiddenfiles,youhavetoformatthisdriveortrytoremovetheminUSBmassstoragemode.BecauseonlyinUSBmode,youcouldseethishiddenfileviaconfigureyourPC.MediaTekConfidentialRevision0.40–December,16,2005Page:11of12©2005MediaTekInc.TheinformationcontainedinthisdocumentcanbemodifiedwithoutnoticeSystemServiceFAQCompilingTool,NucleusPlus,KAL,SystemConfiguration,FilesystemandFlashDisk6FlashDisk6.1IsthereanylimitationonblocknumberofNORflash-driver?我們使用16MNorFlash,由于已將程序降到7M以下,想使用16MNorFlash的后兩個Bank,也就是后8M空間做文件系統。但是在修改Flashconf.c時發現有下面一行﹕#defineTOTAL_BLOCKS39//Maximum127如果用后8M做文件系統TOTAL_BLOCKS應定義為135,但是否這里最大只能是127?也就是說必須舍棄最后8個Block?是否正如客戶所說的.我們必須舍棄最后8個Block.即﹕我們在FlashConf.c就要像下面一樣定義﹕/************Step1.************/#defineFLASH_BASE_ADDRESS0x0800000/************Step2.************/#defineALLOCATED_FAT_SPACE0x800000-8*0x2000/***********//*Step3.*//***********/staticconstFlashRegionInfoRegionInfo[]={{0x10000,127},ThereisnolimitationonFATassuchconfiguration.Butindeed,maximum127blocksinNORflashdriver.Ifyouhave1270x10000bytesand80x2000bytesblocks(total135blocks)inyourlasttwobanks,youhavetogiveupthelast8blocksinstep2.Wewilltrytoimprovethisdesigninthefuture.MediaTekConfidentialRevision0.40–December,16,2005Page:12of12©2005MediaTekInc.Theinformationcontainedinthisdocumentcanbemodifiedwithoutnotice
本文档为【MTK学习文档\官方文档MTK6225\System_and_Debug\System_Service\System_Service_FAQ_V0.4】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_297927
暂无简介~
格式:pdf
大小:455KB
软件:PDF阅读器
页数:0
分类:互联网
上传时间:2018-09-07
浏览量:18