欢迎来到天天文库
浏览记录
ID:8842779
大小:40.53 KB
页数:22页
时间:2018-04-09
《编译器keil的优化选项针对arm》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、编译器_keil的优化选项问题分类: 编译器类2013-01-1114:12 280人阅读 评论(0) 收藏 举报applicationApplicationcompilationcompileroptimizationperformancePerformance最近发现在keil编译的时候,出现莫名的问题,貌似代码有被优化掉的问题,后来查了下相关的资料,貌似懂了点。我选择的是默认的default优化方式,上网看了下,默认的是level2级别优化,最后选择level0就没有问题了下面是网上找的资料,介绍了优化功能介绍Get
2、tingtheBestOptimizedCodeforyourEmbeddedApplication ARMCompilationTools TheARMCompilationToolsaretheonlycompilationtoolsco-developedwiththeARMprocessors,andspecifically designedtooptimallysupporttheARMarchitecture.Theyarearesultof20yearsofdevelopment,andarerecogniz
3、edasthe industry-leadingCandC++compilationtoolsfortheARM,Thumb,andThumb-2instructionssets. TheARMCompilationtoolsconsistof: • TheARMCompiler,whichenablesyoutocompileCandC++code.Itisanoptimizingcompiler,andfeatures command-lineoptionstoenableyoutocontrolthelevelofo
4、ptimization • LinkerandUtilities,whichassignaddressesandlayoutsectionsofcodetoformafinalimage • Aselectionoflibraries,includingtheISOstandardClibraries,andtheMicroLIBClibrarywhichisoptimizedfor embeddedapplications • Assembler,whichgeneratesmachinecodeinstructions
5、from ARM,ThumborThumb-2assembly-level sourcecode CompilerOptionsforEmbeddedApplications TheARMCompilationToolsincludeanumberofcompileroptimizationstohelpyoubesttargetyourcodeforyourchosen microcontrollerdeviceand applicationarea. TheycanbeaccessedfromwithinµVis
6、ionbyclickingonProject– OptionsforTarget. Theoptionsdescribedthisdocument canbefoundontheTarget and C/C++ tabs of the OptionsforTargets dialog. MDKCompilerOptimizations • Cross-Module Optimization takesinformationfromapriorbuildandusesittoplaceUNUSEDfunctionsint
7、otheir ownELFsectioninthecorrespondingobjectfile.ThisoptionisalsoknownasLinkerFeedback,andrequiresyouto buildyourapplicationtwicetotakeadvantageofitforreducedcodesize. Cross-ModuleOptimizationhasbeenshowntoreducecodesize,byremovingunusedfunctionsfromyourapplicati
8、on.It canalsoimprovetheperformance ofyourapplication,byallowingmodulestoshareinlinecode. • The MicroLIB Clibrary hasbeenoptimizedtoreducethesizeofembed
此文档下载收益归作者所有