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.

[参考译文] TM4C1294NCPDT:错误:具有不平衡外部"C"定义的 TivaWare 示例头文件。

Guru**** 2350610 points
Other Parts Discussed in Thread: EK-TM4C1294XL, EK-TM4C123GXL, EK-TM4C129EXL
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/613021/tm4c1294ncpdt-bug-tivaware-example-headers-with-unbalanced-extern-c-definitions

器件型号:TM4C1294NCPDT
主题中讨论的其他器件:EK-TM4C1294XLEK-TM4C123GXLEK-TM4C129EXL

打开:TivaWare_C_Series-2.1.4.178

我从 senshub_IoT 示例中启动了一个项目、对其进行了修整、并获得了所需的最低工作电压。 但是、将 main.c 文件重命名为 main.cpp 会导致编译错误:

源末尾:错误#68:预期为"}"

我想这是因为一些文件具有不平衡的 C++外部保护。 受影响的文件:

/examples/boards/ek-tm4c123gxl-boostxl-senshub/drivers/buttons.h
/examples/boards/ek-tm4c1294xl/drivers/buttons.h
/examples/boards/ek-tm4c1294xl-boost-cc3100/drivers/buttons.h
/examples/boards/ek-tm4c1294xl-boostxl-senshub/drivers/buttons.h
/examples/boards/ek-tm4c123gxl/drivers/buttons.h
/examples/boards/ek-tm4c1294xl-boost-dlptrf7970abp/drivers/buttons.h
/examples/boards/ek-tm4c129exl/drivers/buttons.h
/examples/boards/dk-tm4c129x-boostxl-senshub/drivers/buttons.h
/examples/boards/ek-tm4c1294xl-boostxl-battpack/drivers/buttons.h
/examples/boards/dk-tm4c129x/drivers/buttons.h
/examples/boards/ek-tm4c123gxl-boost-dlptrf7970abp/drivers/buttons.h
/cc3100-sdk/simplelink/include/simplelink.h

所有 buttons.h 均打开防护罩两次、simplelink.h 将其关闭两次。 删除重复的防护装置解决了该问题。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    感谢您的反馈。 我将把更正转发给我们的软件团队。