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.

[参考译文] TMS320F28388D:在具有 TI-CGT-ARMLLVM 和 C200Ware 的 F28388x 上基于 CM 构建

Guru**** 2539570 points
Other Parts Discussed in Thread: ARM-CGT, C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1375584/tms320f28388d-build-on-cm-on-f28388x-with-ti-cgt-armllvm-and-c200ware

器件型号:TMS320F28388D
Thread 中讨论的其他器件:C2000WARE、ARM-CGT

工具与软件:

尊敬的专家:

使用 TI-CGT-ARMLLVM 3.2.2.LTS 和 C2000Ware 5.02、我注意到未更新 driverlib_cm 来支持 clang。 我收到此问题:  

/opt/ti/C2000Ware/driverlib/f2838x/driverlib_cm/flash.h:267:9: warning: pragma CODE_SECTION is a legacy TI pragma and not supported in clang compilers. use '__attribute__((section("scn_name")))' instead [-Wti-pragmas]
#pragma CODE_SECTION(".TI.ramfunc");

修改 SDK 以使用__attribute__替换 code_section 不适合我使用。  

我曾尝试添加$(toolchain)/include/c/ti_compatibility.h、但这样做无法解决该问题。  

我当前的权变措施是使用猴子修补 SDK  

find C2000Ware/driverlib/f2838x/driverlib_cm -type f | xargs  perl -pi -e 's/CODE_SECTION\("(.*?)"\)/__attribute((section("$1")))/gm'

perl -pi -e 's/CODE_SECTION\("(.*?)"\)/__attribute((section("$1")))/gm' C2000Ware/device_support/f2838x/common/include/driverlib_cm.h


请提供建议。


此致、

Josel