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.

[参考译文] CCSTUDIO-THEIA:警告#1853-D 和#169-D、仅来自 CCS 20.4.0、CGT 22.6.3.LTS 和 C2000Ware 6.00.01.00 上的 driverlib

Guru**** 2797825 points

Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1604619/ccstudio-theia-warning-1853-d-and-169-d-from-driverlib-only-on-ccs-20-4-0-cgt-22-6-3-lts-and-c2000ware-6-00-01-00

部件号: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)

进行编译。 (但我没有真正测试)。

搜索论坛,它似乎真的与这个问题有关: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1590089/tms320f280039-modifications-to-int16_t-and-uint16_t-type-in-c2000-cgt-v22-6-3

真正的修复方法或权变措施是什么、它实际上使工程在没有警告的情况下进行编译、而不修改 driverlib 中的文件?