TI中文支持网
TI专业的中文技术问题搜集分享网站

ccs6 编译出现未定义错误与 gmake错误?

#35 #error directive: "You must define CPU1 or CPU2 in your project properties. Otherwise, the offsets in your header files will be inaccurate." 

gmake: *** [main.obj] Error 1

gmake: *** [source/Analog.obj] Error 1

gmake: *** [source/CANSetup.obj] Error 1

gmake: *** [source/Current.obj] Error 1 

gmake: Target 'all' not remade because of errors.

Susan Yang:

source/subdir_rules.mk:9: recipe for target 'source/Analog.obj' failed
"C:/ti/c2000/C2000Ware_3_01_00_00/device_support/f2837xd/common/include/driverlib.h", line 47: fatal error #1965: cannot open source file "adc.h"
1 catastrophic error detected in the compilation of "../source/Analog.c".
Compilation terminated.
gmake: *** [source/Analog.obj] Error 1

我这边显示的错误是这样的,在添加了对应的路径后会消除这个报错。请复制您现在的详细报错信息,另外您程序中是否要使用driverlib?

user6072174:

回复 Susan Yang:

gmake: *** [source/main.obj] Error 1
gmake: Target 'all' not remade because of errors.

gmake: *** [source/Voltage.obj] Error 1

gmake: *** [source/TEMPERATURE.obj] Error 1

gmake: *** [source/GATEDRIVER.obj] Error 1

gmake: *** [source/F2837xD_GlobalVariableDefs.obj] Error 1

gmake: *** [source/Current.obj] Error 1

gmake: *** [source/CANSetup.obj] Error 1

gmake: *** [source/Analog.obj] Error

"C:/Users/Administrator/workspace_v6_1_3/XM3_inverter/include/F2837xD_device.h", line 18: fatal error #35: #error directive: "You must define CPU1 or CPU2 in your project properties.Otherwise, the offsets in your header files will be inaccurate."

如果可以,就使用driverlib

user6072174:

回复 Susan Yang:

我发现定义了CPU1后,可以解决,可以会出现一堆的警告

Susan Yang:

回复 user6072174:

能否详细复制一下或者给出截图?

user6072174:

回复 Susan Yang:

已私信,你试试定义CPU1,出现警告与错误

Susan Yang:

回复 user6072174:

看到了,这些都是路径包含的问题,请您根据提示在CCS内添加对应的路径

右击工程名,选择Properties–>Build–>C2000 compiler –>include options

user6072174:

回复 Susan Yang:

嗯嗯,现在有一个问题
#1965 cannot open source file "inc/hw_memmap.h" 在driverlib.h里面
请问这个头文件inc/hw_memmap.h哪里有呢

Susan Yang:

回复 user6072174:

C:\ti\c2000\C2000Ware …\driverlib\f2837xd\driverlib\inc

user6072174:

回复 Susan Yang:

好的,又有一个问题
#20 identifier "float32_t" is undefined
怎么处理呢

Susan Yang:

回复 user6072174:

请在出现错误的文件内包含 device.h,float32_t是在device.h内定义的

C:\ti\c2000\C2000Ware_3_01_00_00\device_support\f2837xd\common\include

另外请将上面的路径包含一下右击工程名,选择Properties–>Build–>C2000 compiler –>include options

赞(0)
未经允许不得转载:TI中文支持网 » ccs6 编译出现未定义错误与 gmake错误?
分享到: 更多 (0)