This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] 编译器/MSP430FR5994:编译器内部错误

Guru**** 2589265 points
Other Parts Discussed in Thread: MSP430FR5994

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/766647/compiler-msp430fr5994-compiler-internal-error

器件型号:MSP430FR5994

工具/软件:TI C/C++编译器

当我编译下面的简短程序时、我会遇到编译器内部错误。

有关详细信息、请参阅以下来源。

谢谢你。

源文件"hello.cpp"

#include
#include
#include

命名空间数据


   类别 DATE_t
   {
   公共:
       constexpr date_t();
       内联 bool is_leap_yeon() const;
       uint8_t days_in_month() const;
       uint8_t 年;
       uint8_t 月;
       uint8_t Day;
   专用:
   };

   constexpr date_t::date_t ()
   :年(0)、月(1)、日(1)
   {}

   内联 bool date_t:::is_leap_year () const
   {
       返回(年份和3)==0;
   }

   uint8_t DATE_t::days_in_month()常量
   {
       静态常量 uint8_t DaysOfMonthTable[16]={
               /* 0    */ 30,/*预防措施*/
               /* 1..12 */ 31、28、31、30、31、 30、31、31、30、31、 30、31、
               /* 13..15 */ 30、30、30 /*预防措施*/};
       uint8_t 结果;

       结果= DaysOfMonthTable[Month & 15];
       如果((month ==2)和 is_leap_year ())
       {
           Result ++;
       }
       返回结果;
   }



/**
 * hello.c
 *
int main (空)

   WDTCTL = WDTPW | WDTHOLD;   //停止看门狗计时器

   printf ("Hello World!\n");

   返回0;

控制台:

****项目 Error_1的配置调试构建****

"C:\\ti\\ccsv7\\utils\\bin\\gmake"-k -j 8 all -O
'生成文件:./hello.cpp'
'调用:MSP430编译器'
"c:/ti/ccsv7/tools/compiler/ti-cgt-msp430_18.1.4.LTS/bin/cl430 -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="C:/ti/ccsv7/ccs_base/msp430/include --include_path="D:/sontex/dev/Produit/Integr/731/4_FW/ESSAIS_JMM/Error_1 --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-msp430_18.1.4.LTS/include --use_path="C:--advice:power=all --advice:hw_config=all --include_erratiation="_msp430_erratina-us=cep_support/capsility=cepsi-support/cp_cp_support/capsility=us_support/capacitive-cepsility=us-up_cp_cp.cp_up_up_up_up_up_guide=us-up_up_up_up_up_guidature=us-up_up_cp.cp.cp.cp_up_up_up_up_up_up_up_up_up_up_up_support  

>>编译失败
subdir_rules.mk:9:目标'hello.obj'的配方失败

内部错误:C:\ti\ccsv7\tools\compiler\ti-cgt-msp430_18.1.4.sps\bin\acpia430.exe 遇到分段错误
                 处理函数时(未知或文件范围)文件./hello.cpp 行43

这是由 TI EABI C/C++解析器中的缺陷导致的。
TI 客户支持可能会建议解决方法来避免这种情况。

升级到编译器的最新版本可能会解决此问题。

在 E2E 支持论坛中联系 TI、网址 为 http://e2e.ti.com 、位于
"开发工具"、"TI C/C++编译器"。  请参阅标题为的链接
"提交问题"。

我们需要看到整个错误消息以及完整、可重现的消息
包括所有命令行选项的测试用例。
包含由选项--preproc_with_comment 创建的.pp 文件

gmake:***[hello.obj]错误1.
gmake:目标"全部"不会由于错误而重新生成。

****构建完成****

编译器

编译器版本:  TI v18.1.4.LTS

编译器标志:
   vmspx
   --data_model=受限
   --use_hw_mpy=F5
   --include_path="${ccs_base_root}/msp430/include "
   --include_path="${project_root}"
   --include_path="${cG_tool_root}/include"
   --advice:power=all
   --advice:hw_config=all
   --define=__MSP430FR5994__
   --define=_MPU_enable
   -g
   --printf_support=minimal
   --diag_warning=225
   --diag_wrap=off
   --display_error_number
   --silicon_errater=CPU21
   --silicon_errater=CPU22
   --silicon_errater=CPU40

链接器标志:
   -m"${ProjName}.map"
   --heap_size=300
   --stack_size=300
   -cinit_hold_wdt=on
   -i"${ccs_base_root}/msp430/include"
   -i"${CCS_base_root}/MSP430/lib/5xx_6xx_FRxx"
   -i"${CCS_base_root}/MSP430/lib/FR59xx"
   -i"${CG_TOOL_ROOT}/lib"
   -i"${CG_TOOL_ROOT}/include"
   --优先级
   --reread_libs
   --define=_MPU_enable
   --diag_wrap=off
   --display_error_number
   --warn_sections
   -xml_link_info="${ProjName}_linkInfo.xml"
   --use_hw_mpy=F5
   -rom_model

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    18.1.4.LTS 失败。
    18.12.0.LTS 编译无错误。
    如果您愿意、请尝试18.1.5.LTS。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您报告此问题、并提交一份简明的测试案例。  我可以重现相同的行为。  我在 SDOWP 中提交了 CodeGen-5830以进行调查。  欢迎您在我的签名中使用下面的 SDOWP 链接进行访问。

    谢谢、此致、

    乔治

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    关于闰年:
    步骤
    开始使用您要计算的年份。
    查看它是否可以被4除(一个没有余数的整数)。 如果不是,就像1997年,那不是一个飞跃年。 (笑声)
    查看年份是否可以被100除。 如果一年可以被4除,但不能被100除,就像2012年,这是一个飞跃年。 (笑声)
    查看年份是否可被400除。