Other Parts Discussed in Thread: C2000WARE
部件号:CCSTUDIO-THEIA
主题: C2000WARE 中讨论的其他器件
I 从 CCS 20.2.0、CGT 22.6.2.LTS 和 C2000Ware 5.04.00.00 进行了更新。
更新为最新的 CCS 20.4.0、CGT 22.6.3.LTS 和 C2000Ware 6.00.01.00。
现在、当转换旧工程时、在编译期间、我会看到来自 driverlib 的 CAN 和 LIN 标头的这些警告反复重复:
[60]"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f280015x\driverlib\interrupt.h", line 481: warning #1853-D: declaration hides built-in function "__disable_interrupts"[61]"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f280015x\driverlib\interrupt.h", line 482: warning #1853-D: declaration hides built-in function "__enable_interrupts"[62]"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f280015x/driverlib/can.h", line 359: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"[63]"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f280015x/driverlib/can.h", line 407: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"[64]"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f280015x/driverlib/can.h", line 456: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"[65]"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f280015x/driverlib/can.h", line 497: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"[66]"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f280015x/driverlib/lin.h", line 695: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
driverlib 中的违规部分在不同版本之间没有更改、源代码也没有我的工程。
我可以对两个 driverlib 头文件进行一些细微修改来显示警告:
如果我 C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f280015x\driverlib\interrupt.h像这样删除声明:
#ifndef __TI_COMPILER_VERSION__ extern uint16_t __disable_interrupts(void); extern uint16_t __enable_interrupts(void); #endif
我可以抑制警告,显然没有不良影响。
的 HWREGB 宏中似乎存在指针类型不匹配 C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f280015x\driverlib\inc\hw_types.h
将其从进行更改
#define HWREGB(x) \ __byte((int16_t *)(x),0)
收件人:
#define HWREGB(x) \ __byte((int *)(x),0)
进行编译。 (但我没有真正测试)。
真正的修复方法或权变措施是什么、它实际上使工程在没有警告的情况下进行编译、而不修改 driverlib 中的文件?