添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
阳光的金鱼  ·  babel.config.js with ...·  2 月前    · 
可爱的豆芽  ·  serialize Cert ...·  10 月前    · 
Other Parts Discussed in Thread: C2000WARE

#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.

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?
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
请在出现错误的文件内包含 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