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: Build on CM on F28388x with TI-CGT-ARMLLVM and C200Ware

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, ARM-CGT

Tool/software:

Hi Experts,

Using TI-CGT-ARMLLVM 3.2.2.LTS and C2000Ware 5.02, I noticed the driverlib_cm isn't updated to support clang. I get this issue: 

/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");

Modifying the SDK to replace CODE_SECTION with __attribute__ would not be an option for me. 

I tried to include $(TOOLCHAIN)/include/c/ti_compatibility.h, but this do not solve that issue. 

My current workaround is to monkey patch the SDK with 

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


Please advise.


Regards,

Josel