2023年11月29日发(作者:)
C28x编译器错误和警告消息
FromTexasInstrumentsWiki从德州仪器维基
Jumpto:跳转到:navigation导航,search搜索
TranslatethispagetoTranslateShoworiginal
C28xCompilerErrorandWarningMessagesC28x编译器错误和警告消息
Contents内容
[hide]
11Introduction介绍
22PossibleErrors,WarningsandRemarks可能的错误、警告和言论
33CommonErrorsandWarnings常见的错误和警告
o
3.13.1Warning:buildattributevendorsectionTImissingin
" 警告:构建属性供应商部分TI失踪”<图书馆或对象>:兼容性不能 确定 o 3.23.2fatalerror:file.....rts2800_ 错误:文件.....rts2800_<引导。obj>"specifiesISA revision"C28FPU32",whichisnotcompatiblewithISA revision"C2800"specifiedinapreviousfileoronthe commandlineobj>“指定ISA修订“C28FPU32”,这不是兼容ISA 修订“C2800”之前的文件中指定或在命令行上 o 3.33.3Warning:entry-pointsymbolotherthan"_c_int00" specified:"code_start"警告:入口点符号除了“_c_int00”规 定:“code_start” o 3.43.4Error:unresolvedsymbols错误:未解决符号 保持.... o 3.53.5Error:Tag_ISAattributevalueof"2"thatis differentthanonepreviouslyseen("1");combining incompatiblefiles错误:Tag_ISA属性值的“2”是不同于一个以 前见过(“1”);结合不兼容的文件 o 3.63.6Error:Tag_Memory_Modelattributevalueof"1"that isdifferentthanonepreviouslyseen("2");combining incompatiblefiles错误:Tag_Memory_Model属性值“1”,是不同 o o o o o o 于一个以前见过(“2”);结合不兼容的文件 3.73.7Error:placementfailsforobject"csmpasswds"错误: 放置失败对象“csmpasswds” 3.83.8Warning:functiondeclaredimplicitly警告:数 的隐式声明 3.93.9Error:placementfailsforobject错误:放置失败的对 象 3.103.10Error:placementfailsforobject".text错误:对 象放置失败”text。设置 3.113.11externcregistervolatileunsignedintIFR; "../include/DSP2802x_Device.走读生cregister波动unsigned int仪表;“../include/DSP2802x_Device。h",line51: error:omissionofexplicittypeisnonstandard("int" assumed)h”,51行:错误:遗漏显式类型的非标准(“int”假设) 3.123.12typedefinterruptvoid(*PINT)(void); "..includeDSP2802x_f中断无效(*品脱)(空 白);“..DSP2802x_PieVect包括。h",line26:error: omissionofexplicittypeisnonstandard("int"assumed)h” 第26行:错误:遗漏显式类型的非标准(“int”假设) Introduction介绍 Oftenitishelpfultoknowwhaterrorsandwarningscanbegeneratedas wellasthesourceofcommonerrors.通常它有助于知道错误和警告可以生 成以及常见错误的来源。Thisarticleincludesalistoftheerror,warning andremarkmessagesgeneratedaswellasalistofcommonerrorsandtheir resolution.本文包含的错误、警告和备注信息生成以及常见错误的列表和他们 的决议。 PossibleErrors,Warningsand Remarks可能的错误、警告和言论 Thefollowingfileliststheerror/warning/remarkmessagesgeneratedby theTexasInstrumentsC/C++parser.以下文件列出了错误/警告/备注信息由 德州仪器C/c++生成解析器。Thepurposeofthislisttoprovidesome indicationastowhicherror/warningid#correspondstowhich error/warningmessage.这个列表的目的提供一些指示哪个错误/警告id号对应 哪个错误/警告信息。 C28xCompilerErrorList:C28x编译器错误列表: TICompiler_C28_ompiler_C28_ CommonErrorsandWarnings常见的错 误和警告 Warning:buildattributevendorsectionTImissingin" object>:compatibilitycannotbedetermined警告:构建属性供应商部分 TI失踪”<图书馆或对象>:兼容性不能确定 Thelibrarywasbuiltwithanoldertoolsetthantheapplication itisbeinglinkedinto.与一个较年长的工具集图书馆建于不是被链 接到应用程序。Oldertoolsdidnotdefinethisattribution.旧的 工具没有定义这个属性。Buildattributeshaveexistedforquite sometimesothiswarningistheexception.构建属性已经存在了很 长时间内所以这个警告是例外。Previouslythetoolsinterpretedfiles withnobuildattributesashaving0values,butthisisincorrect. 以前没有构建的工具解释文件属性为0值,但这是不正确的。Theyarenow treatedascompatiblewitheverything,butwarntheuserthatthey areontheirown.他们现在视为兼容一切,但警告用户,他们在他们自己 的。 Examples:例子: TheIQmathLibrarywhichisbuiltwithanoldercompilerbut iscompatiblewithcurrent库构建一个老的 编译器,但当前编译器兼容。 FlashAPIwhichisbuiltwitholdercompilersdueto API构建与老的编译器测试。 SFOlibraryusedfortheHRPWM库用于HRPWM模块。 NOTE:注意:Tosuppressthewarningyoucanusethelinkeroption --diag_suppress=16002whichcanbeplacedinthelinkercommand file抑制警告你可以使用链接器选项——diag_suppress=16002,可以 放置在链接器命令文件 fatalerror:file.....rts2800_ rts2800_<引导。obj>"specifiesISArevision"C28FPU32",which isnotcompatiblewithISArevision"C2800"specifiedinapreviousfile oronthecommandlineobj>“指定ISA修订“C28FPU32”,这不是兼容ISA 修订“C2800”之前的文件中指定或在命令行上 Thisisanattempttolinksourcecompiledwith --float_support=FPU32withanon-FPU32objectfile.这是一个试图 编译链接来源与——float_support=FPU32non-FPU32对象文件。In thiscasetheRTSlibrarywasbuiltwith--float_support=fpu32.在 这种情况下,RTS——float_support=fpu32图书馆建成。Thiscould, instead,beanotherlibraryoraprojectsourcefile.相反,这可能 成为另一个库或者一个项目源文件。 Checkeachlibraryandmakesureeachwasbuiltwiththe-v28 --float_support=FPU32switch.检查每个库和确保每个建于 -v28——float_support=FPU32开关。 Makesureall.确保所有。cfilesarecompiledusingthe-v28 --float_support=FPU32switch.c文件编译使用 -v28——float_support=FPU32开关。(InCodeComposerStudio youcansetthisasaglobalbuildoptionoraper-filebuild option).(在代码作曲家工作室可以设置这个作为全球构建是选择 或构建选项)。 IftheprojectisnotforadevicewiththeC28x+FPUunit,thenthe RTSlibraryshouldbechangedtothenonFPU32version.如果项目 不是C28x+FPU的设备单元,那么RTS图书馆应该改为非FPU32版本。See 看到C28xCodeGenerationTipsandTricksWikiArticleC28x代码生 成Wiki文章的技巧和窍门forinformationontheruntimesupport library.信息在运行时支持库。 Thetwocannotbelinkedbecausethecallingconventionsforfloat aredifferent.这两个不能联系因为浮动的调用约定是不同的。Ifitis afixed-pointdevicethen“float”numbersarepassedonthestack. 然后如果是定点装置“浮动”数字传递到栈上。Ifitisa28x+FPU device,then“float”ispassedinFPUregisters.如果它是一个 28x+FPU设备,然后在FPU寄存器传递“浮动”。 Warning:entry-pointsymbolotherthan"_c_int00"specified: "code_start"警告:入口点符号除了“_c_int00”规定:“code_start” Thiswarningisfineandcanbeignored.很好,可以忽略这个警告。 Itisjusttellingyouthattheentrypointfortheprogramisset tocode_startinsteadofthedefault_c_int00whichiswhatweneed intheseexamples.它只是告诉你程序的入口点设置为code_start而不 是默认的_c_int00哪些是我们需要在这些例子中。OtherPeripheral ExamplesprovidedbyTIwillalsogeneratethiswarning.其它外围 TI提供的示例会生成此警告。 Error:unresolvedsymbols错误:未解决符号保持.... Itmeanssomewhereinthesourcethesymbolhasbeenused,butthe linkerisunabletofindwhereitiscreated.这意味着在源符号被 使用,但是链接器无法找到了。Forexample,ifyourcodehadthe statementc=IQdiv(a,b);buttheIQmathlibraryhasnotbeen includedintheproject,thesymbolIQdivwillbeflaggedas undefined.例如,如果您的代码声明c=IQdiv(a,b);但是IQmath库没有 被包含在这个项目,象征IQdiv将标记为未定义。 Symbolsthatinclude$$inthem(forexample:FD$$MPYorFD$$TOL) likelycomefromtheruntimesupportlibrary.他们的符号,包括$ $(例如:FDMPY或FD美元美元TOL)可能来自运行时支持库。See看到C28x CodeGenerationTipsandTricksWikiArticleC28x代码生成Wiki文 章的技巧和窍门forinformationontheruntimesupportlibrary.信 息在运行时支持库。 Error:Tag_ISAattributevalueof"2"thatisdifferentthanone previouslyseen("1");combiningincompatiblefiles错误:Tag_ISA属性 值的“2”是不同于一个以前见过(“1”);结合不兼容的文件 Thetoolsarecomplainingaboutmismatchedvaluesof"Tag_ISA", whichmeanstherearemismatchedISAversions.的工具都在抱怨的 不匹配值“Tag_ISA”,这意味着有不匹配的ISA版本。"1"isC27x, and"2"isC28x,sothistestcaseismixingC27xandC28xobject files.C27x“1”,“2”是C28x,所以这个测试用例是混合C27xC28x对 象文件。Afuturereleaseofcodegenwilluse"C2700"and"C2800" insteadof"1"and"2"intheerrorn的未来版本将 使用“C2700”和“C2800”而不是“1”和“2”的错误消息。 Makesureallfilesarecompiledwith-v28toavoidthiserror. 确保所有文件编译-v28为了避免这种错误。 Error:Tag_Memory_Modelattributevalueof"1"thatisdifferentthan onepreviouslyseen("2");combiningincompatiblefiles错 误:Tag_Memory_Model属性值“1”,是不同于一个以前见过(“2”);结合不兼 容的文件 Somefilesorlibrarieshavebeencompiledusingasmallmemory modelandotherswithalargememorymodel.一些文件或库编译使用 一个小的内存模型和其他大内存模型。Thelinkerwillnotallowyouto combinefileslinkedwithdifferentmemorymodels.链接器将不允许 您将文件与不同的内存模型。 ForC2000,largememorymodel(-mlcompilerswitch)isrecommended andusedinexamplesprovidedbyTI.C2000,大内存模型(-ml编译器 开关)推荐并使用电信提供的例子。 Error:placementfailsforobject"csmpasswds"错误:放置失败对象 “csmpasswds” Thisisanissueinanearlyversionofthe5.这是一个问题的一个 早期版本5。xcompiler/linker.x编译器和链接器。Thelinkeris complainingaboutasectionwiththesamenameonpage0andpage 1.链接器在抱怨一个具有相同名称的部分页面0和1。Youcanchange thenameofoneofthesesectionsintheliker.你可以改变其中一 个部分的名称的爱好者。cmdfile.cmd文件。Thesuggestedfix,however, istoupdatethecodegentools.然而,建议修复更新codegen工具。 Warning:functiondeclaredimplicitly警告:数的隐式声明 Thisisnotawarningtoignore.这不是一个警告,不容忽视。Itmeans afunctiondoesn'thaveaprototypeandthecompilerhasmadesome assumptionsaboutthevaluesyouarepassing/returning.这意味着 一个函数没有一个原型和编译器做了一些假设你传递/返回的值。That canquicklyleadtoabug.很快就会导致一个错误。Fixthiswarning! 解决这个警告! Error:placementfailsforobject错误:放置失败的对象 Thisisalinkererrorthatmeanstheobjectwillnotfitintomemory. 这是一个链接器错误这意味着对象将不适合到内存中。Thiscanbedueto datapageblocking.这可能是由数据页阻塞。Referto指C28x Compiler:UnderstandingLinkingWikiarticleC28x编译器:了解连接 维基文章formoreinformation.获得更多信息。 Error:placementfailsforobject".text错误:对象放置失败”text。设置 Thisisalinkererrorthatmeansnotenoughmemorywasavailable toallocatecode.这是一个链接器错误意味着没有足够的内存可用来分 配代码。Referto指C28xCompiler:UnderstandingLinkingWiki articleC28x编译器:了解连接维基文章formoreinformation.获得更多 信息。 externcregistervolatileunsignedintIFR;"../include/DSP2802x_Device. 走读生cregister波动unsignedint仪表;“../include/DSP2802x_Device。 h",line51:error:omissionofexplicittypeisnonstandard("int" assumed)h”,51行:错误:遗漏显式类型的非标准(“int”假设) MISRArulesrequirethatyoubuildinstrictANSImode.MISRA规 则要求你建立严格ANSI模式。Thismeansitisanerrortouseany featurenotspecifiedintheANSIstandard.这意味着一个错误使用 ANSI标准中没有指定的任何功能。Inyourcase,thesefeaturesarethe keywordscregisterandinterrupt.在你的案例中,这些特性是关键词 cregister和中断。Theneteffectisyoucannotuseinterruptand cregisterand,atthesametime,conformtoMISRA.净效应是不能使 用中断和cregister,与此同时,符合MISRA。 Thefixistoinsteadusealternatekeyword,__cregister,or __interrupt,or__asm(),ifyouarewritingcodeforstrict ANSI/ISOmode(usingthe--strict_ansicompileroption).解决办法 是用替代字,__cregister,或__interrupt或__asm(),如果您正在编写代 码严格ANSI/ISO模式(使用——strict_ansi编译器选项)。 typedefinterruptvoid(*PINT)(void); "..includeDSP2802x_f中断无效(*品脱)(空白);“.. DSP2802x_PieVect包括。h",line26:error:omissionofexplicittypeis nonstandard("int"assumed)h”第26行:错误:遗漏显式类型的非标准 (“int”假设) MISRArulesrequirethatyoubuildinstrictANSImode.MISRA规 则要求你建立严格ANSI模式。Thismeansitisanerrortouseany featurenotspecifiedintheANSIstandard.这意味着一个错误使用 ANSI标准中没有指定的任何功能。Inyourcase,thesefeaturesarethe keywordscregisterandinterrupt.在你的案例中,这些特性是关键词 cregister和中断。Theneteffectisyoucannotuseinterruptand cregisterand,atthesametime,conformtoMISRA.净效应是不能使 用中断和cregister,与此同时,符合MISRA。 Thefixistoinsteadusealternatekeyword,__cregister,or __interrupt,or__asm(),ifyouarewritingcodeforstrict ANSI/ISOmode(usingthe--strict_ansicompileroption).解决办法 是用替代字,__cregister,或__interrupt或__asm(),如果您正在编写代 码严格ANSI/ISO模式(使用——strict_ansi编译器选项)。


发布评论