Other Parts Discussed in Thread: C2000WARE
器件型号: TMS320F280039
主题: C2000WARE 中讨论的其他器件
C2000ware 版本:6.00.01
在我的工程中、我同时使用了 bitfield 和 driverlib、并使用相对路径引用了它们的头文件、如下所示:

我发现、当我将编译器版本从 22.6.2 升级到 22.6.3 时、在开始出现编译错误之前可以正常编译的工程。
Building file: "../Sources/device.c"
Invoking: C2000 Compiler
"C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-c2000_22.6.3.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --idiv_support=idiv0 --isr_save_vcu_regs=off --tmu_support=tmu1 --vcu_support=vcrc -O0 --opt_for_speed=3 --fp_mode=relaxed --include_path="C:/ti/c2000/C2000Ware_6_00_01_00" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/utilities/clb_tool/clb_syscfg/systemc/include" --include_path="C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers" --include_path="C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/FLASH_DEBUG/syscfg" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/device_support/f28003x/headers/include" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/flash_api/f28003x/include/FlashAPI" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/calibration/hrpwm/f28003x/include" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/math/FPUfastRTS/c28/include" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/dsp/FPU/c28/examples/common" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/dsp/FPU/c28/include" --include_path="C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/math/CLAmath/c28/include" --include_path="C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-c2000_22.6.3.LTS/include" --include_path="C:/ti/c2000/C2000Ware_6_00_01_00/libraries/dsp/VCU/c28/include" --advice:performance=all --define=FLASH --define=_FLASH --define=_DEBUG -g --float_operations_allowed=32 --fp_single_precision_constant --diag_suppress=303 --diag_suppress=148 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --cla_signed_compare_workaround=on -k --preproc_with_compile --preproc_dependency="Sources/device.d_raw" --include_path="C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/FLASH_DEBUG/syscfg" --obj_directory="Sources" --cmd_file="syscfg/board.opt" --cmd_file="syscfg/c2000ware_libraries.opt" "../Sources/device.c"
>> Compilation failure
Sources/subdir_rules.mk:9: recipe for target 'Sources/device.obj' failed
"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f28003x\driverlib\cpu.h", line 61: error #148: declaration is incompatible with "volatile unsigned int IFR" (declared at line 55 of "C:/ti/c2000/C2000Ware_6_00_01_00/device_support/f28003x/headers/include/f28003x_device.h")
"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f28003x\driverlib\cpu.h", line 68: error #148: declaration is incompatible with "volatile unsigned int IER" (declared at line 56 of "C:/ti/c2000/C2000Ware_6_00_01_00/device_support/f28003x/headers/include/f28003x_device.h")
"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f28003x\driverlib\interrupt.h", line 481: warning #1853-D: declaration hides built-in function "__disable_interrupts"
"C:\ti\c2000\C2000Ware_6_00_01_00\driverlib\f28003x\driverlib\interrupt.h", line 482: warning #1853-D: declaration hides built-in function "__enable_interrupts"
"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib/can.h", line 359: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib/can.h", line 407: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib/can.h", line 456: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib/can.h", line 497: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
"C:/ti/c2000/C2000Ware_6_00_01_00/driverlib/f28003x/driverlib/lin.h", line 696: warning #169-D: argument of type "int16_t *" is incompatible with parameter of type "int *"
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 379: error #148: declaration is incompatible with "Uint16 RamfuncsLoadStart" (declared at line 242 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 380: error #148: declaration is incompatible with "Uint16 RamfuncsLoadEnd" (declared at line 243 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 381: error #148: declaration is incompatible with "Uint16 RamfuncsLoadSize" (declared at line 244 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 382: error #148: declaration is incompatible with "Uint16 RamfuncsRunStart" (declared at line 245 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 383: error #148: declaration is incompatible with "Uint16 RamfuncsRunEnd" (declared at line 246 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
"C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/device.h", line 384: error #148: declaration is incompatible with "Uint16 RamfuncsRunSize" (declared at line 247 of "C:/Users/pcbcj/Git_Project/server_psu_54v_3200w_llc_28003x/Headers/f28003x_globalprototypes.h")
8 errors detected in the compilation of "../Sources/device.c".
gmake: *** [Sources/device.obj] Error 1
这是因为在版本 22.6.3 中、uint16_t 的定义从 unsigned int 更改为 unsigned short。 但是、在 C2000ware 中、Uint16 的定义仍然是 unsigned int。 因此、在使用以下头文件编译源文件时、我的工程会出错。


虽然 int 和 short 在 C2000 中是等效的、但编译器认为它们是不同的类型并报告错误。