专家你好,
我在编译过程中出现了一下警告信息:
Description Resource Path Location Type
#161-D declaration is incompatible with previous "InitECana" (declared at line 24) DSP2803x_ECan.c /DCDC1500W_Compile line 27 C/C++ Problem
Description Resource Path Location Type
#161-D declaration is incompatible with previous "InitECanaGpio" (declared at line 158) DSP2803x_ECan.c /DCDC1500W_Compile line 161 C/C++ Problem
Description Resource Path Location Type
<a href="file:/F:/ti/ccsv6/tools/compiler/dmed/HTML/225.html">#225-D</a> function "InitECan" declared implicitly Ecan.c /DCDC1500W_Compile/source line 48 C/C++ Problem
Description Resource Path Location Type
<a href="file:/F:/ti/ccsv6/tools/compiler/dmed/HTML/225.html">#225-D</a> function "InitECana" declared implicitly DSP2803x_ECan.c /DCDC1500W_Compile line 24 C/C++ Problem
Description Resource Path Location Type
<a href="file:/F:/ti/ccsv6/tools/compiler/dmed/HTML/225.html">#225-D</a> function "InitECanaGpio" declared implicitly DSP2803x_ECan.c /DCDC1500W_Compile line 158 C/C++ Problem
Description Resource Path Location Type
<a href="file:/F:/ti/ccsv6/tools/compiler/dmed/HTML/225.html">#225-D</a> function "InitECanGpio" declared implicitly Ecan.c /DCDC1500W_Compile/source line 49 C/C++ Problem
函数在【DSP2803x_GlobalPrototypes.h】中已声明,内容如下:
#if DSP28_ECANA
extern void InitECan(void);
extern void InitECana(void);
extern void InitECanGpio(void);
extern void InitECanaGpio(void);
#endif // endif DSP28_ECANA
DSP28_ECANA在【DSP2803x_Device.h】中定义:
#define TARGET 1
#define DSP28_28035PN TARGET
#if (DSP28_28035PN||DSP28_28034PN||DSP28_28033PN||DSP28_28032PN||DSP28_28031PN||DSP28_28030PN)
……..
#define DSP28_ECANA 1
…….
#endif
我将函数声明处的开关注释掉,Warning就被消除了,如下
//#if DSP28_ECANA
extern void InitECan(void);
extern void InitECana(void);
extern void InitECanGpio(void);
extern void InitECanaGpio(void);
//#endif // endif DSP28_ECANA
但是这个【DSP2803x_Device.h】文件是标准库文件,一般不应该修改,而且这里的开关DSP28_ECANA用法也应该没什么问题,为什么会出现这种情况呢?是我的CCS环境配置问题吗?我用的是编译版本是v6.4.2
Shine:
用的是C2000系列的芯片吧?请到专门的论坛咨询更快捷。
C2000论坛链接:C2000™ 32位实时 MCU
user5194104:
回复 Shine:
好的