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.

c2000程序编译的error,求大神解答

Building file: "../sourse/F2806x_CSMPasswords.asm"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_CSMPasswords.d_raw" --obj_directory="sourse" "../sourse/F2806x_CSMPasswords.asm"
Finished building: "../sourse/F2806x_CSMPasswords.asm"

Building file: "../F2806x_headers/source/F2806x_GlobalVariableDefs.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="F2806x_headers/source/F2806x_GlobalVariableDefs.d_raw" --obj_directory="F2806x_headers/source" "../F2806x_headers/source/F2806x_GlobalVariableDefs.c"
F2806x_headers/source/subdir_rules.mk:9: recipe for target 'F2806x_headers/source/F2806x_GlobalVariableDefs.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../F2806x_headers/source/F2806x_GlobalVariableDefs.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [F2806x_headers/source/F2806x_GlobalVariableDefs.obj] Error 2
Building file: "../sourse/F2806x_CodeStartBranch.asm"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_CodeStartBranch.d_raw" --obj_directory="sourse" "../sourse/F2806x_CodeStartBranch.asm"
Finished building: "../sourse/F2806x_CodeStartBranch.asm"

Building file: "../sourse/F2806x_CpuTimers.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_CpuTimers.d_raw" --obj_directory="sourse" "../sourse/F2806x_CpuTimers.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_CpuTimers.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_CpuTimers.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_CpuTimers.obj] Error 2
Building file: "../sourse/F2806x_DBGIER.asm"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_DBGIER.d_raw" --obj_directory="sourse" "../sourse/F2806x_DBGIER.asm"
Finished building: "../sourse/F2806x_DBGIER.asm"

Building file: "../sourse/F2806x_DefaultIsr.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_DefaultIsr.d_raw" --obj_directory="sourse" "../sourse/F2806x_DefaultIsr.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_DefaultIsr.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_DefaultIsr.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_DefaultIsr.obj] Error 2
Building file: "../sourse/F2806x_Comp.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_Comp.d_raw" --obj_directory="sourse" "../sourse/F2806x_Comp.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_Comp.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_Comp.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_Comp.obj] Error 2
Building file: "../sourse/F2806x_DisInt.asm"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_DisInt.d_raw" --obj_directory="sourse" "../sourse/F2806x_DisInt.asm"
Finished building: "../sourse/F2806x_DisInt.asm"

Building file: "../sourse/F2806x_ECan.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_ECan.d_raw" --obj_directory="sourse" "../sourse/F2806x_ECan.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_ECan.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_ECan.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_ECan.obj] Error 2
Building file: "../sourse/F2806x_ECap.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_ECap.d_raw" --obj_directory="sourse" "../sourse/F2806x_ECap.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_ECap.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_ECap.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_ECap.obj] Error 2
Building file: "../sourse/F2806x_Dma.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_Dma.d_raw" --obj_directory="sourse" "../sourse/F2806x_Dma.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_Dma.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_Dma.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_Dma.obj] Error 2
Building file: "../sourse/F2806x_EPwm.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_EPwm.d_raw" --obj_directory="sourse" "../sourse/F2806x_EPwm.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_EPwm.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_EPwm.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_EPwm.obj] Error 2
Building file: "../sourse/F2806x_GlobalVariableDefs.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_GlobalVariableDefs.d_raw" --obj_directory="sourse" "../sourse/F2806x_GlobalVariableDefs.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_GlobalVariableDefs.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_GlobalVariableDefs.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_GlobalVariableDefs.obj] Error 2
Building file: "../sourse/F2806x_EQep.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_EQep.d_raw" --obj_directory="sourse" "../sourse/F2806x_EQep.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_EQep.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_EQep.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

gmake: *** [sourse/F2806x_EQep.obj] Error 2
Building file: "../sourse/F2806x_Gpio.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_Gpio.d_raw" --obj_directory="sourse" "../sourse/F2806x_Gpio.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_Gpio.obj' failed
Building file: "../sourse/F2806x_I2C.c"
Invoking: C2000 Compiler
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla0 --float_support=fpu32 --vcu_support=vcu0 --include_path="E:/ccs/workspace_v9/buck" --include_path="E:/ccs/workspace_v9/buck/F2806x_common/include" --include_path="E:/ccs/workspace_v9/buck/F2806x_headers/include" --include_path="C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/include" -g --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --preproc_with_compile --preproc_dependency="sourse/F2806x_I2C.d_raw" --obj_directory="sourse" "../sourse/F2806x_I2C.c"
sourse/subdir_rules.mk:9: recipe for target 'sourse/F2806x_I2C.obj' failed

INTERNAL ERROR: C:/ti/ccs901/ccs/tools/compiler/ti-cgt-c2000_18.12.1.LTS/bin/cl2000 had an internal inconsistency and aborted
while processing file ../sourse/F2806x_Gpio.c

This is caused by a defect in the TI C/C++ Compiler.
TI Customer Support may be able to suggest a workaround to avoid this.

Upgrading to the newest version of the compiler may fix this problem.

Contact TI in the E2E support forums at http://e2e.ti.com under
"Development Tools", "TI C/C++ Compiler". See the link titled
"Submitting an issue".

We need to see this ENTIRE error message and a complete, reproducible
test case including ALL of the command-line options.

  • 好多一堆
    你工程是自己建立的,还是导入官方的。程序是自己写的吗?大部分都是由于环境配置不正确导致的。
  • 您现在使用的哪个芯片?哪个版本的CCS?您是否有使用TI例程测试过?请您详细说明一下,谢谢
  • 工程是自己建立的,程序也是借鉴其他人之后自己码上去的
    程序:
    #include"F2806x_device.h"
    #include"F2806x_SysCtrl.h"
    #include"F2806x_Examples.h"
    #include "string.h"
    #include "math.h"


    // These are defined by the linker (see F2808.cmd)
    //extern Uint16 RamfuncsLoadStart; //与将程序写入flash相关?
    //extern Uint16 RamfuncsLoadEnd;
    //extern Uint16 RamfuncsRunStart;
    //extern Uint16 RamfuncsLoadSize;


    #define EPWM_TIMER_TBPRD 750 //224=200kHz PWM
    //#define EPWM_CMPA 112 //duty cycle is set at 0.5
    //#define EPWM_CMPB 112
    #define EPWM_PHASE_BUS 0 //switch phase delay(GPIO0 and GPIO1 represent bridge driving signal;GPIO2 and GPIO3 are the same)
    #define EPWM_PHASE_HVB1 108 //45 equals 0.5us
    #define EPWM_PHASE_HVB2 108 //45 equals 0.5us

    #define PI 3.14159
    #define Fs 1000
    #define F1 100

    void InitSysCtrl(void);
    void InitFlash(void);
    _CODE_ACCESS void *memcpy(void *s1, const void *s2, size_t n);
    void EPWM_GPIO();
    //void EPWM_GPIO1();
    //void EPWM_GPIO2();
    void EPWM1_Config_INIT();
    void EPWM2_Config_INIT();
    void EPWM3_Config_INIT();
    void EPWM4_Config_INIT();



    void main()
    {


    InitSysCtrl(); //initiate system
    InitPieVectTable();
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (Uint32)&RamfuncsLoadSize);
    // symbols are created by the linker. Refer to the F2808.cmd file.
    InitFlash(); //不太懂

    EALLOW;
    SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0; // make TBCLK of enabled EPWM stop
    EDIS;

    EPWM_GPIO();

    EPWM1_Config_INIT(); //EPWM configure
    //EPWM2_Config_INIT();
    //EPWM3_Config_INIT();
    //EPWM4_Config_INIT();

    EALLOW;
    SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // make TBCLK of enabled EPWM start at the rising edge of TBCLK
    /*
    GpioCtrlRegs.GPADIR.bit.GPIO4 = 1;
    GpioDataRegs.GPADAT.bit.GPIO4 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO5 = 1;
    GpioDataRegs.GPADAT.bit.GPIO5 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO6 = 1;
    GpioDataRegs.GPADAT.bit.GPIO6 = 0;
    GpioCtrlRegs.GPADIR.bit.GPIO7 = 1;
    GpioDataRegs.GPADAT.bit.GPIO7 = 0;
    */
    EDIS;

    }


    // configure four phases GPIO GPIO0~GPIO7
    void EPWM_GPIO()
    {
    // Make GPIO0\1 for EPWM1A\1B; make GPIO2\3 for EPWM2A\2B; make GPIO4\5 for EPWM3A\3B; make GPIO6\7 for EPWM4A\4B
    EALLOW; //written enable
    //GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0; // Enable pull up on GPIO0
    //GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0; // Enable pull up on GPIO1

    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // GPIO0=EPWM1A //configure GPIO0 output as EPWM1A
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // GPIO1=EPWM1B
    GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1; // GPIO2=EPWM2A
    GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1; // GPIO3=EPWM2B
    GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1; // GPIO4=EPWM3A
    GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1; // GPIO5=EPWM3B
    GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1; // GPIO6=EPWM4A
    GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1; // GPIO7=EPWM4B
    EDIS;//written disable
    }

    /*
    void EPWM_GPIO1()
    {
    // Make GPIO0\1 for EPWM1A\1B; make GPIO2\3 for EPWM2A\2B; make GPIO4\5 for EPWM3A\3B; make GPIO6\7 for EPWM4A\4B
    EALLOW; //written enable
    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // GPIO0=EPWM1A //configure GPIO0 output as EPWM1A
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // GPIO1=EPWM1B
    GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1; // GPIO2=EPWM2A
    GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1; // GPIO3=EPWM2B
    EDIS;//written disable
    }

    */


    // configure EPWMx registers
    void EPWM1_Config_INIT() //for BUS side s1 and S2 driving signal, master module
    {
    EALLOW;
    // Setup TBCLK
    EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Count up-down mode
    EPwm1Regs.TBPRD = EPWM_TIMER_TBPRD; // Set timer period
    EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE; // Disable phase loading
    EPwm1Regs.TBCTL.bit.PRDLD = TB_SHADOW;
    EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO; //give synchronous signal when TBCTR=0
    //EPwm1Regs.TBPHS.half.TBPHS = 0x0000; // initial phase? still need to configure ?
    EPwm1Regs.TBCTR = 0x0000; // Clear counter
    EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; // Clock ratio to SYSCLKOUT(1 fs of system clock)
    EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1;

    // Setup shadow register load on ZERO? shadow mode 数据寄存器是哪一个?
    EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW; //shadow mode
    EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; //load mode: load when CTR=0
    EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

    // Set Compare values
    EPwm1Regs.CMPA.half.CMPA = EPWM_TIMER_TBPRD/2; // Set compare A value?为什么用half结构,可以用bit吗?
    //EPwm1Regs.CMPB = EPWM1_CMPB; // Set Compare B value

    // Set actions
    EPwm1Regs.AQCTLA.bit.CAU = AQ_SET; // Set PWM1A on event A, up count
    EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR; // Clear PWM1A on event A, down count

    //EPwm1Regs.AQCTLB.bit.CAU = AQ_CLEAR; // Clear PWM1B on event A,up count
    //EPwm1Regs.AQCTLB.bit.CAD = AQ_SET; // Set PWM1B on Period

    //dead time configure for complementary PWM waveforms(watch out the righting sequence!)
    EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // Enable Dead-band module
    EPwm1Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // Active High complementary mode(output inverted)
    EPwm1Regs.DBRED = 27; // RED = 18(equal 200ns) rising edge delay
    EPwm1Regs.DBFED = 27; // FED = 18(equal 200ns) falling edge delay
    EDIS;

    }

    void EPWM2_Config_INIT() //for BUS side s3 and S4 driving signal
    {
    EALLOW;
    // Setup TBCLK
    EPwm2Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Count up-down mode
    EPwm2Regs.TBPRD = EPWM_TIMER_TBPRD; // Set timer period
    EPwm2Regs.TBPHS.half.TBPHS = EPWM_PHASE_BUS; // Phase set
    EPwm2Regs.TBCTL.bit.PHSDIR = TB_DOWN; // down count when synchronization events occur
    EPwm2Regs.TBCTL.bit.PHSEN = TB_ENABLE; // Enable phase loading
    EPwm2Regs.TBCTL.bit.PRDLD = TB_SHADOW; //TBPRD immediately without using a shadow register??
    EPwm2Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; //give synchronous signal when TBCTR=0
    EPwm2Regs.TBCTR = 0x0000; // Clear counter
    EPwm2Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; // Clock ratio to SYSCLKOUT(1 fs of system clock)
    EPwm2Regs.TBCTL.bit.CLKDIV = TB_DIV1;

    // Setup shadow register load on ZERO? shadow mode 数据寄存器是哪一个?
    EPwm2Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW; //shadow mode
    EPwm2Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm2Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; //load mode: load when CTR=0
    EPwm2Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

    // Set Compare values
    EPwm2Regs.CMPA.half.CMPA = EPWM_TIMER_TBPRD/2; // Set compare A value?为什么用half结构,可以用bit吗?
    //EPwm1Regs.CMPB = EPWM1_CMPB; // Set Compare B value

    // Set actions
    EPwm2Regs.AQCTLA.bit.CAU = AQ_SET; // set PWM1A on event A, up count
    EPwm2Regs.AQCTLA.bit.CAD = AQ_CLEAR; // clear PWM1A on event A, down count

    //EPwm2Regs.AQCTLB.bit.CAU = AQ_CLEAR; // Clear PWM1B on event A,up count
    //EPwm2Regs.AQCTLB.bit.CAD = AQ_SET; // Set PWM1B on Period

    //dead time configure for complementary PWM waveforms(watch out the righting sequence!)
    EPwm2Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // Enable Dead-band module
    EPwm2Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // Active High complementary mode(output inverted)
    EPwm2Regs.DBRED = 27; // RED = 18(equal 200ns) rising edge delay
    EPwm2Regs.DBFED = 27; // FED = 18(equal 200ns) falling edge delay
    EDIS;

    }


    void EPWM3_Config_INIT() //for HVB side s5 and S6 driving signal
    {
    EALLOW;
    // Setup TBCLK
    EPwm3Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Count up-down mode
    EPwm3Regs.TBPRD = EPWM_TIMER_TBPRD; // Set timer period
    EPwm3Regs.TBPHS.half.TBPHS = EPWM_PHASE_HVB1; // Phase is 0?phase loading已经disable,还要设置phase?
    EPwm3Regs.TBCTL.bit.PHSDIR = TB_DOWN;
    EPwm3Regs.TBCTL.bit.PHSEN = TB_ENABLE; // Enable phase loading
    EPwm3Regs.TBCTL.bit.PRDLD = TB_SHADOW; //TBPRD immediately without using a shadow register??
    EPwm3Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; //give synchronous signal when TBCTR=0 ?
    EPwm3Regs.TBCTR = 0x0000; // Clear counter
    EPwm3Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; // Clock ratio to SYSCLKOUT(1 fs of system clock)
    EPwm3Regs.TBCTL.bit.CLKDIV = TB_DIV1;

    // Setup shadow register load on ZERO? shadow mode 数据寄存器是哪一个?
    EPwm3Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW; //shadow mode
    EPwm3Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm3Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; //load mode: load when CTR=0
    EPwm3Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

    // Set Compare values
    EPwm3Regs.CMPA.half.CMPA = EPWM_TIMER_TBPRD/2; // Set compare A value?为什么用half结构,可以用bit吗?
    //EPwm1Regs.CMPB = EPWM1_CMPB; // Set Compare B value

    // Set actions
    EPwm3Regs.AQCTLA.bit.CAU = AQ_SET; // set PWM1A on event A, up count
    EPwm3Regs.AQCTLA.bit.CAD = AQ_CLEAR; // clear PWM1A on event A, down count

    //EPwm3Regs.AQCTLB.bit.CAU = AQ_CLEAR; // Clear PWM1B on event A,up count
    //EPwm3Regs.AQCTLB.bit.CAD = AQ_SET; // Set PWM1B on Period

    //dead time configure for complementary PWM waveforms(watch out the righting sequence!)
    EPwm3Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // Enable Dead-band module
    EPwm3Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // Active High complementary mode(output inverted)
    EPwm3Regs.DBRED = 27; // RED = 18(equal 200ns) rising edge delay, DBRED=tdead*fosc
    EPwm3Regs.DBFED = 27; // FED = 18(equal 200ns) falling edge delay
    EDIS;

    }

    void EPWM4_Config_INIT() //for HVB side s5 and S6 driving signal
    {
    EALLOW;
    // Setup TBCLK
    EPwm4Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Count up-down mode
    EPwm4Regs.TBPRD = EPWM_TIMER_TBPRD; // Set timer period
    EPwm4Regs.TBPHS.half.TBPHS = EPWM_PHASE_HVB2; // Phase is 0?phase loading已经disable,还要设置phase?
    EPwm4Regs.TBCTL.bit.PHSDIR = TB_DOWN;
    EPwm4Regs.TBCTL.bit.PHSEN = TB_ENABLE; // Enable phase loading
    EPwm4Regs.TBCTL.bit.PRDLD = TB_SHADOW; //TBPRD immediately without using a shadow register??
    EPwm4Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN; //give synchronous signal when TBCTR=0 ?
    EPwm4Regs.TBCTR = 0x0000; // Clear counter
    EPwm4Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; // Clock ratio to SYSCLKOUT(1 fs of system clock)
    EPwm4Regs.TBCTL.bit.CLKDIV = TB_DIV1;

    // Setup shadow register load on ZERO? shadow mode 数据寄存器是哪一个?
    EPwm4Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW; //shadow mode
    EPwm4Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW;
    EPwm4Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO; //load mode: load when CTR=0
    EPwm4Regs.CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;

    // Set Compare values
    EPwm4Regs.CMPA.half.CMPA = EPWM_TIMER_TBPRD/2; // Set compare A value?为什么用half结构,可以用bit吗?
    //EPwm1Regs.CMPB = EPWM1_CMPB; // Set Compare B value

    // Set actions
    EPwm4Regs.AQCTLA.bit.CAU = AQ_SET; // set PWM1A on event A, up count
    EPwm4Regs.AQCTLA.bit.CAD = AQ_CLEAR; // clear PWM1A on event A, down count

    //EPwm3Regs.AQCTLB.bit.CAU = AQ_CLEAR; // Clear PWM1B on event A,up count
    //EPwm3Regs.AQCTLB.bit.CAD = AQ_SET; // Set PWM1B on Period

    //dead time configure for complementary PWM waveforms(watch out the righting sequence!)
    EPwm4Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; // Enable Dead-band module
    EPwm4Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // Active High complementary mode(output inverted)
    EPwm4Regs.DBRED = 27; // RED = 18(equal 200ns) rising edge delay, DBRED=tdead*fosc
    EPwm4Regs.DBFED = 27; // FED = 18(equal 200ns) falling edge delay
    EDIS;

    }
  • 芯片使用的是c2000,ccs是9.0.1,TI例程我从compiler里面试了一个,和之前的error几乎一模一样
  • 对了,安装ccs之前电脑上有安装eclipse,这个会造成这样的错误吗
  • 怀疑是你工程没有配置好导致的。你直接导入官方的例程,在例程上面修改试试。你这样,只操作简单的IO,编译可以通过吗?
  • 例程也不行,也会出现这样的错误?您是直接import例程的?

    请您先安装最新版本的compiler试一下

    另外可以参考 e2e.ti.com/.../415548
  • 你可以按着TI官方给的例程进行代码移植,但是前提是你要清楚CCS工程的文件架构
  • 从程序逻辑上找一下吧,参照数据手册看一下

  • 建议看一下例程
  • In the very first version of the product, we had the possibility of Vin exceeding 7 volts under certain conditions. However, we put a clamp on the input side to limit that to 6.5V or less. When the regulator is enabled, the input rails will drop to the nominal 3.7V (battery) or 5V (USB) depending on what power source is connected.