MDKARMarmcc编译器预定义宏精.docx

上传人:b****8 文档编号:28333086 上传时间:2023-07-10 格式:DOCX 页数:8 大小:16.66KB
下载 相关 举报
MDKARMarmcc编译器预定义宏精.docx_第1页
第1页 / 共8页
MDKARMarmcc编译器预定义宏精.docx_第2页
第2页 / 共8页
MDKARMarmcc编译器预定义宏精.docx_第3页
第3页 / 共8页
MDKARMarmcc编译器预定义宏精.docx_第4页
第4页 / 共8页
MDKARMarmcc编译器预定义宏精.docx_第5页
第5页 / 共8页
点击查看更多>>
下载资源
资源描述

MDKARMarmcc编译器预定义宏精.docx

《MDKARMarmcc编译器预定义宏精.docx》由会员分享,可在线阅读,更多相关《MDKARMarmcc编译器预定义宏精.docx(8页珍藏版)》请在冰豆网上搜索。

MDKARMarmcc编译器预定义宏精.docx

MDKARMarmcc编译器预定义宏精

Predefinedmacros

ThistopicdocumentsthepredefinedmacrosoftheARMcompiler.

liststhemacronamespredefinedbytheARMcompilerforCandC++.Wherethevaluefieldisempty,thesymbolisonlydefined.Table28.PredefinedmacrosName__arm__

ValueWhendefined-AlwaysdefinedfortheARMcompiler,evenwhenyouspecifythe--thumboption.Seealso__ARMCC_VERSION.

__ARMCC_VERSION

ver

Alwaysdefined.Itisadecimalnumber,andisguaranteedtoincreasebetweenreleases.TheformatisPVVbbbbwhere:

⏹⏹⏹

PisthemajorversionVVistheminorversionbbbbisthebuildnumber.

Note

UsethismacrotodistinguishbetweenARMCompiler4.1orlater,andothertoolsthatdefine__arm__.

__APCS_INTERWORK

-Whenyouspecifythe--apcs/interworkoptionorsettheCPUarchitecturetoARMv5Torlater.

Whenyouspecifythe--apcs/ropioption.Whenyouspecifythe--apcs/rwpioption.Whenyouspecifythe--apcs/fpicoption.InC++compilermode,tospecifythatarraynewanddeleteareenabled.

Alwaysdefined.Similarto__FILE__,butindicatestheprimarysourcefileratherthanthecurrentone(thatis,whenthecurrentfileisanincludedfile.

Ifcompilingforabig-endiantarget.

InC++compilermode,tospecifythatboolisakeyword.

InC++compilermode.

__APCS_ROPI__APCS_RWPI__APCS_FPIC__ARRAY_OPERATORS__BASE_FILE__

----name

__BIG_ENDIAN_BOOL__cplusplus

---

__CC_ARM

1date---

Alwayssetto1fortheARMcompiler,evenwhenyouspecifythe--thumboption.Alwaysdefined.Alwaysdefined.

InC++modewhenyouspecifythe--using_stdoption.

AlwayssettoanintegervaluethatrepresentstheversionnumberoftheEdisonDesignGroup(EDGfront-end.Forexample,version3.8isrepresentedas308.

TheversionnumberoftheEDGfront-enddoesnotnecessarilymatchtheversionnumberoftheARMcompilertoolchain.

__DATE____EDG__

__EDG_IMPLICIT_USING_STD

__EDG_VERSION__

__EXCEPTIONS

1-name----

InC++modewhenyouspecifythe--exceptionsoption.

Whenyouspecifythe--signed_charsoption(usedbyCHAR_MINandCHAR_MAX.Alwaysdefinedasastringliteral.

Whenyouspecifythe--fpmode=fastoption.Whenyouspecifythe--fpmode=ieee_fullor--fpmode=ieee_fixedoptions.

Whenyouspecifythe--fpmode=ieee_fulloption.

Whenyouspecifythe--fpmode=ieee_full,--fpmode=ieee_fixed,or--fpmode=ieee_no_fenvoptions.

Whenyouspecifythe--fpmode=ieee_fulloption.

Whenyouspecifythe--implicit_includeoption.

Alwaysset.Itisthesourcelinenumberofthelineofcodecontainingthismacro.

Containsthefilenamepartofthevalueof__FILE__.

Whenyouexplicitlyorimplicitlyusethe--multifileoption.[]

Alwayssetto2bydefault,unlessyouchangetheoptimizationlevelusingthe-Onumoption.[a]

__FEATURE_SIGNED_CHAR

__FILE____FP_FAST

__FP_FENV_EXCEPTIONS

__FP_FENV_ROUNDING

__FP_IEEE

__FP_INEXACT_EXCEPTION

--nummod-num

__IMPLICIT_INCLUDE

__LINE____MODULE__

__MULTIFILE

__OPTIMISE_LEVEL

__OPTIMISE_SPACE__OPTIMISE_TIME__PLACEMENT_DELETE

---

Whenyouspecifythe-Ospaceoption.Whenyouspecifythe-Otimeoption.

InC++modetospecifythatplacementdelete(thatis,anoperatordeletecorrespondingtoaplacementoperatornew,tobecallediftheconstructorthrowsanexceptionisenabled.Thisisonlyrelevantwhenusingexceptions.InC++modewhenRTTIisenabled.

Forsizeof(int,butavailableinpreprocessorexpressions.

Forsizeof(long,butavailableinpreprocessorexpressions.

Forsizeof(void*,butavailableinpreprocessorexpressions.

Ifcompilingtousethesoftwarefloating-pointcallingstandardandlibrary.Setwhenyouspecifythe--fpu=softvfpoptionforARMorThumb,orwhenyouspecify--fpu=softvfp+vfpv2forThumb.Inallcompilermodes.Standardversioninformation.

Whenyouspecifythe--strictoption.SupportforsignallingNaNswhenyouspecify--fpmode=ieee_fixedor--fpmode=ieee_full.ThenumberoftheARMbasearchitectureofthetargetCPUirrespectiveofwhetherthecompileriscompilingforARMorThumb.Forpossiblevaluesof__TARGET_ARCH_ARMin

relationtotheARMarchitectureversions,see.

ThenumberoftheThumbbasearchitectureofthetargetCPUirrespectiveofwhetherthecompileriscompilingforARMorThumb.ThevalueisdefinedaszeroifthetargetdoesnotsupportThumb.Forpossiblevaluesof

__TARGET_ARCH_THUMBinrelationtotheARMarchitectureversions,see.

XXrepresentsthetargetarchitectureanditsvaluedependsonthetargetarchitecture.Forexample,ifyouspecifythecompileroptions--cpu=4Tor--cpu=ARM7TDMIthen__TARGET_ARCH_4Tisdefined.

XXrepresentsthetargetCPU.ThevalueofXX

__RTTI__sizeof_int

-444-

__sizeof_long

__sizeof_ptr

__SOFTFP__

__STDC__

__STDC_VERSION____STRICT_ANSI____SUPPORT_SNAN__

----num

__TARGET_ARCH_ARM

__TARGET_ARCH_THUMBnum

__TARGET_ARCH_XX

-

__TARGET_CPU_XX

-

isderivedfromthe--cpucompileroption,orthedefaultifnoneisspecified.Forexample,ifyouspecifythecompileroption--cpu=ARM7TMthen__TARGET_CPU_ARM7TMisdefinedandnoothersymbolstartingwith__TARGET_CPU_isdefined.

Ifyouspecifythetargetarchitecture,then__TARGET_CPU_genericisdefined.

IftheCPUnamespecifiedwith--cpuisinlowercase,itisconvertedtouppercase.Forexample,--cpu=Cortex-R4resultsin__TARGET_CPU_CORTEX_R4beingdefined(ratherthan__TARGET_CPU_Cortex_R4.Iftheprocessornamecontainshyphen(-

characters,thesearemappedtoanunderscore(_.Forexample,--cpu=ARM1136JF-Sismappedto__TARGET_CPU_ARM1136JF_S.

__TARGET_FEATURE_DOUBLEWORD__TARGET_FEATURE_DSPMUL__TARGET_FEATURE_MULTIPLY

----ARMv5Tandabove.

IftheDSP-enhancedmultiplierisavailable,forexampleARMv5TE.

IfthetargetarchitecturesupportsthelongmultiplyinstructionsMULLandMULAL.

Ifthetargetarchitecturesupportsthe

hardwaredivideinstruction(thatis,ARMv7-MorARMv7-R.

IfthetargetarchitecturesupportsThumb,ARMv4Torlater.

OneofthefollowingissettoindicatetheFPUusage:

⏹⏹⏹

__TARGET_FEATURE_DIVIDE

__TARGET_FEATURE_THUMB__TARGET_FPU_xx

--

__TARGET_FPU_NONE__TARGET_FPU_VFP__TARGET_FPU_SOFTVFP

Inaddition,ifcompilingwithoneofthefollowing--fpuoptions,thecorrespondingtargetnameisset:

--fpu=softvfp+vfpv2,

__TARGET_FPU_SOFTVFP_VFPV2--fpu=softvfp+vfpv3,

__TARGET_FPU_SOFTVFP_VFPV3

--fpu=softvfp+vfpv3_fp16,

__TARGET_FPU_SOFTVFP_VFPV3_FP16--fpu=softvfp+vfpv3_d16,

__TARGET_FPU_SOFTVFP_VFPV3_D16--fpu=softvfp+vfpv3_d16_fp16,

__TARGET_FPU_SOFTVFP_VFPV3_D16_FP16--fpu=vfpv2,__TARGET_FPU_VFPV2--fpu=vfpv3,__TARGET_FPU_VFPV3--fpu=vfpv3_fp16,

__TARGET_FPU_VFPV3_FP16--fpu=vfpv3_d16,

__TARGET_FPU_VFPV3_D16--fpu=vfpv3_d16_fp16,

__TARGET_FPU_VFPV3_D16_FP16--fpu=vfpv4,__TARGET_FPU_VFPV4--fpu=vfpv4_d16,

__TARGET_FPU_VFPV4_D16

⏹⏹⏹

⏹⏹

Seeformoreinformation.

__TARGET_PROFILE_R__TARGET_PROFILE_M

Whenyouspecifythe--cpu=7-Roption.Whenyouspecifyanyofthefollowingoptions:

⏹⏹⏹

--cpu=6-M--cpu=6S-M--cpu=7-M

__thumb__

-

WhenthecompilerisinThumbstate.Thatis,youhaveeitherspecifiedthe--thumboptiononthecommand-lineor#pragmathumbinyoursourcecode.

Note

ThecompilermightgeneratesomeARMcodeevenifitiscompilingforThumb.__thumband__thumb__becomedefinedorundefinedwhenusing#pragmathumbor#pragmaarm,butdonotchangeincaseswhereThumbfunctionsare

generatedasARMcodeforotherreasons

CompilerReferenceGuide:

PredefinedmacrosPage6of6(forexample,afunctionspecifiedas__irq.__TIME___WCHAR_T[a]time-Alwaysdefined.InC++mode,tospecifythatwchar_tisakeyword.ARMrecommendsthatifyouhavesourcecodereliantonthe__OPTIMISE_LEVELmacrotodeterminewhetherornot--multifileisineffect,youchangetousing__MULTIFILE.Table29showsthepossiblevaluesfor__TARGET_ARCH_THUMB(seeTable28,andhowthesevaluesrelatetoversionsoftheARMarchitecture.Table29.ThumbarchitectureversionsinrelationtoARMarchitectureversionsARMarchitecture__TARGET_ARCH_ARM__TARGET_ARCH_THUMBv4v4Tv5T,v5TE,v5TEJv6,v6K,v6Zv6T2v6-M,v6S-Mv7-Rv7-M,v7E-M4456607001234344Built-infunctionnamevariables.Copyright©Keil,AnARMCompany.Allrightsreserved.mk:

@MSITStore:

C:

\Keil_v5\ARM\HLP\armccref.chm:

:

/armccref_babjf...2014-6-20

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > PPT模板 > 动态背景

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1