CCS编译错误与解决办法 :fatal error: #error NO CHIP DEFINED错误内型:
"C:/CCStudio_v3.3/C5500/csl/include/csl_chiphal.h", line 201:
fatal error: #error NO CHIP DEFINED
解决办法:
Project --> Build Options --> Preprocessor --> Pre-define Symbols 中加入CHIP_5502
错误原因分析:
查看文件 C:/CCStudio_v3.3/C5500/csl/include/csl_chiphal.h
[cpp]
view plaincopy#ifdef CHIP_5501
#undef CHIP_5501
#define CHIP_5501 1
#else
#define CHIP_5501 0
#endif
#ifdef CHIP_5502
#undef CHIP_5502
#define CHIP_5502 1
#else
#define CHIP_5502 0
#endif
#ifdef CHIP_5509
#undef CHIP_5509
#define CHIP_5509 1
#else
#define CHIP_5509 0
#endif
#ifdef CHIP_5509A
#undef CHIP_5509A
#define CHIP_5509A 1
#else
#define CHIP_5509A 0
#endif
#ifdef CHIP_5510
#undef CHIP_5510
#define CHIP_5510 1
#else
#define CHIP_5510 0
#endif
#ifdef CHIP_5510PG1_0
#undef CHIP_5510PG1_0
#define CHIP_5510PG1_0 1
#else
#define CHIP_5510PG1_0 0
#endif
#ifdef CHIP_5510PG2_0
#undef CHIP_5510PG2_0
#define CHIP_5510PG2_0 1
#else
#define CHIP_5510PG2_0 0
#endif
#ifdef CHIP_5510PG2_1
#undef CHIP_5510PG2_1
#define CHIP_5510PG2_1 1
#else
#define CHIP_5510PG2_1 0
#endif
#ifdef CHIP_5510PG2_2
#undef CHIP_5510PG2_2
#define CHIP_5510PG2_2 1
#else
#define CHIP_5510PG2_2 0
#endif
#ifdef CHIP_5510PG1_2
#undef CHIP_5510PG1_2
#define CHIP_5510PG1_2 1
#else
#define CHIP_5510PG1_2 0
#endif
#if CHIP_5510PG1_0
#undef CHIP_5510
#define CHIP_5510 1
#endif
#if CHIP_5510PG1_2
#undef CHIP_5510
#define CHIP_5510 1
#endif
#if (CHIP_5510PG2_1) || (CHIP_5510PG2_2)
#undef CHIP_5510PG2_0
#define CHIP_5510PG2_0 1
#endif
#ifndef BIOS_CNT
#define BIOS_CNT 0
#endif
.. ..
.. ..
#if ((CHIP_5510)==0) & ((CHIP_5510PG1_0)==0) & ((CHIP_5510PG1_2)==0) & ((CHIP_5510PG2_0)==0)
#define CSL_CHIP_GRPA 0
#define CHIP_5510_FAMILY 0
#else
#define CSL_CHIP_GRPA 1
#define CHIP_5510_FAMILY 1
#endif
#if ((CHIP_5509)==0) & ((CHIP_5509A)==0)
#define CSL_CHIP_GRPB 0
#define CHIP_5509_FAMILY 0
#else
#define CSL_CHIP_GRPB 1
#define CHIP_5509_FAMILY 1
#endif
#if ((CHIP_5502==0) & (CHIP_5501==0))
#define CSL_CHIP_GRPC 0
#define CHIP_5502_FAMILY 0
#else
#define CSL_CHIP_GRPC 1
#define CHIP_5502_FAMILY 1
#endif
#if (CSL_CHIP_GRPA == 0) & (CSL_CHIP_GRPB == 0) & (CSL_CHIP_GRPC == 0)
#error NO CHIP DEFINED
#endif
仔细查看上面代码不难发现,在没有定义芯片时 CSL_CHIP_GRPA == 0) & (CSL_CHIP_GRPB == 0) & (CSL_CHIP_GRPC == 0)成立
所以会提示错误 #error NO CHIP DEFINED
在Project Build options 中没有定义任何芯片型号,导致错误: error NO CHIP DEFINED
只需要加上Pre-Define Symbol 就可以了
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。