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.

新建6678工程问题,请大侠们指导



各位大侠,我现在自己新建一个CCS5.0的一个6678的工程程序,当我添加完所有的文件,编译时,出现很多未定义字符。我查找了,这些字符都在#include <c6x.h>定义。我文件里面引用了这个文件,另外,我也是用了CSL库。请高手指点,是否我有文件没有加入,或者我是否有加入错误的文件。谢谢。

"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 420: error: identifier "TSCL" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 461: error: identifier "TSCH" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 501: error: identifier "ARP" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 541: error: identifier "ILC" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 582: error: identifier "RILC" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 623: error: identifier "REP" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 663: error: identifier "PCE1" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 704: error: identifier "DNUM" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 744: error: identifier "SSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 784: error: identifier "GPLYA" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 824: error: identifier "GPLYB" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 865: error: identifier "GFPGFR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 906: error: identifier "DIER" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 946: error: identifier "TSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 987: error: identifier "ITSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1027: error: identifier "NTSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1067: error: identifier "EFR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1108: error: identifier "IERR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1609: error: identifier "TSCL" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1658: error: identifier "ARP" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1707: error: identifier "ILC" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1756: error: identifier "RILC" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1805: error: identifier "REP" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1854: error: identifier "SSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1903: error: identifier "GPLYA" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 1952: error: identifier "GPLYB" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2001: error: identifier "GFPGFR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2050: error: identifier "DIER" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2099: error: identifier "TSR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2148: error: identifier "ITSR" is undefined

"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2197: error: identifier "NTSR" is undefined
>> Compilation failure
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2250: error: identifier "EFR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2251: error: identifier "ECR" is undefined
"D:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\csl_chipAux.h", line 2299: error: identifier "IERR" is undefined

  • 这些字符都在#include <c6x.h>定义。我文件里面引用了这个文件”,根据你的描述,肯定是你应用的方法不对,没有引用到。请直接使用CCS添加头文件的include对话框后面的file system指定#include <c6x.h>所在的文件夹,试试。

  • 这些关键字不是在c6x.h里面定义的,c6x.h只是引用了这些关键字,比如:

    extern __cregister volatile unsigned int REP;

    这些关键字还是在CSL库里面,所以如果你使用了这些关键字请确保CSL库的路径在你的工程路径下面,同时include <csl_chipAux.h>.