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.

lab02c编译出错

Other Parts Discussed in Thread: DRV8305, MOTORWARE

Win10家庭版操作系统,CCS6.1.3 开发板用的LAUNCHXLF28027F+DRV8305。

编译lab02c时报错,好多变量被重定义了,编译lab02b时顺利通过。

不知道为什么?

  • 我用CCS6.2导入例程编译,并没有出现错误
  • 您现在是否有改动过例程?请您将错误信息拷贝发上来,我去查一下

  • **** Build of configuration Flash for project proj_lab02c ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: proj_lab02c.out'
    'Invoking: C2000 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/bin/cl2000" -v28 -ml -mt -O4 -g --define=FLASH --define=FAST_ROM_V1p7 --define=F2802xF --display_error_number --diag_warning=225 --asm_listing -z -m"proj_lab02c.map" --stack_size=0x180 --warn_sections -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c2000_15.12.1.LTS/include" --priority --reread_libs --disable_auto_rts --diag_suppress=16002 --diag_suppress=10063-D --xml_link_info="proj_lab02c_linkInfo.xml" --entry_point=code_start --rom_model -o "proj_lab02c.out" "C:/ti/motorware/motorware_1_01_00_18/sw/modules/fast/lib/32b/f28x/f2802x/2802xRevB_Fast_IQ_ROMSymbols.lib" "C:/ti/motorware/motorware_1_01_00_18/sw/modules/fast/lib/32b/f28x/f2802x/2802xRevB_Fast_ONLY_ROMSymbols.lib" "C:/ti/motorware/motorware_1_01_00_18/sw/modules/fast/lib/32b/f28x/f2802x/2802xRevB_Fast_RTS_ROMSymbols.lib" "C:/ti/motorware/motorware_1_01_00_18/sw/modules/fast/lib/32b/f28x/f2802x/fast_public.lib" "C:/ti/motorware/motorware_1_01_00_18/sw/modules/iqmath/lib/f28x/32b/IQmath.lib" "./CodeStartBranch.obj" "./adc.obj" "./clarke.obj" "./clk.obj" "./cpu.obj" "./ctrl.obj" "./drv8305.obj" "./filter_fo.obj" "./flash.obj" "./gpio.obj" "./hal.obj" "./ipark.obj" "./memCopy.obj" "./offset.obj" "./osc.obj" "./park.obj" "./pid.obj" "./pie.obj" "./pll.obj" "./proj_lab02c.obj" "./pwm.obj" "./pwr.obj" "./spi.obj" "./svgen.obj" "./timer.obj" "./traj.obj" "./usDelay.obj" "./user.obj" "./wdog.obj" "C:/ti/motorware/motorware_1_01_00_18/sw/ide/ccs/cmd/f2802x/F28027F.cmd" -lrts2800_ml.lib
    <Linking>
    error: symbol "EST_getState" redeclared with incompatible type:
    "EST_State_e(EST_Handle)[enum $fake36
    EST_State_Error = 0
    EST_State_Idle = 1
    EST_State_RoverL = 2
    EST_State_Rs = 3
    EST_State_RampUp = 4
    EST_State_IdRated = 5
    EST_State_RatedFlux_OL = 6
    EST_State_RatedFlux = 7
    EST_State_RampDown = 8
    EST_State_LockRotor = 9
    EST_State_Ls = 10
    EST_State_Rr = 11
    EST_State_MotorIdentified = 12
    EST_State_OnLine = 13
    EST_numStates = 14]"
    in "C:/mw_git/dmc_mw/sw/modules/est/src/32b/est.h" at line 524 and:
    "EST_State_e(EST_Handle)[enum $fake6
    EST_State_Error = 0
    EST_State_Idle = 1
    EST_State_RoverL = 2
    EST_State_Rs = 3
    EST_State_RampUp = 4
    EST_State_IdRated = 5
    EST_State_RatedFlux_OL = 6
    EST_State_RatedFlux = 7
    EST_State_RampDown = 8
    EST_State_LockRotor = 9
    EST_State_Ls = 10
    EST_State_Rr = 11
    EST_State_MotorIdentified = 12
    EST_State_OnLine = 13
    EST_numStates = 14]"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/32b/est.h" at
    line 1218)
    error: symbol "EST_isMotorIdentified" redeclared with incompatible type:
    "bool_t(EST_Handle)[char ]"
    in "C:/mw_git/dmc_mw/sw/modules/est/src/32b/est.h" at line 560 and:
    "unsigned char [ExplSign](EST_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/est/src/32b/est.h" at
    line 1254)
    error: symbol "CTRL_setGains" redeclared with incompatible type:
    "void(CTRL_Handle, const CTRL_Type_e, const _iq, const _iq, const _iq)"
    in "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl.h"
    at line 1314 and:
    "void(CTRL_Handle, const CTRL_Type_e, const _iq, const _iq, const _iq)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.c" at
    line 262)
    error: symbol "CTRL_setSpd_ref_pu" redeclared with incompatible type:
    "void(CTRL_Handle, const _iq)"
    in "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl.h"
    at line 1667 and:
    "void(CTRL_Handle, const _iq)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.c" at
    line 467)
    error: symbol "CTRL_setEstParams" redeclared with incompatible type:
    "void(EST_Handle, USER_Params *)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 55 and:
    "void(EST_Handle, USER_Params *)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1204)
    error: symbol "CTRL_setupEstIdleState" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 499 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1854)
    error: symbol "CTRL_setupEstOnLineState" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 621 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1859)
    error: symbol "CTRL_setUserMotorParams" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 666 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1876)
    error: symbol "CTRL_setupCtrl" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 770 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1950)
    error: symbol "CTRL_setupTraj" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 984 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1960)
    error: symbol "CTRL_runTraj" redeclared with incompatible type:
    "void(CTRL_Handle)"
    in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c" at line 1164 and:
    "void(CTRL_Handle)"
    in "C:/ti/motorware/motorware_1_01_00_18/sw/modules/ctrl/src/32b/ctrl.h" at
    line 1144)
    error: option --float_support=softlib was set in previous files, but not in
    "C:/mw_git/dmc_priv/sw/modules/fast/lib/build/32b/f28x/f2802x/src/ctrl_priv.
    c"

    >> Compilation failure

    >> Compilation failure

    >> Compilation failure
    makefile:173: recipe for target 'proj_lab02c.out' failed
    fatal error #10192: Failed linktime optimization
    gmake: *** [proj_lab02c.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • 下载的是motorware吗?里面的例程直接用CCS打开肯定都是能编译通过的
    如果拷贝到其他地方就编译不过,因很多搜索路径下文件找不到
  • 您使用的是CCS 6? 编译器版本呢?之前有客户反应,这个是编译器的问题,使用新版的编译器就没有这种问题了

    https://processors.wiki.ti.com/index.php/Compiler_Releases 

    参考下

    https://e2e.ti.com/support/tools/ccs/f/81/t/415548 

  • 编译器版本 TIv15.12.7.LTS

  • 您的--opt_level 设置时多少?若是4的话,请修改到3或以下

    另外强烈建议升级CCS版本
  • 我今天上午把CCS6卸载了,之后从TI网站下载了一个CCS9.3.0,成功安装,编译lab02c,还是一样报错。
  • 问题解决了,我从TI网站下载了最新版的motoware,将之前的motoware彻底删除,重新安装。打开CCS把之前的CCS project删除再重新导入,再编译,搞定。
  • 看一下您的工程中下图的设置,我用CCS9.2测试了,改成4就会出现这样的错误,按照之前说的,改到2

  • 好的 那就有可能是旧版本软件内的工程设置有问题