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.

新导入的项目出现一些问题,没有有效的头文件,需要怎么解决

  • 您现在是使用的例程还是您自己的程序? 能给出控制台Console中的详细信息吗?
  • 我使用的是别人给我发的程序,我不太明白Console是什么意思,抱歉,
  • 就是复制一下下图位置内的信息

  • **** Build of configuration Debug for project lab3-timer0_LED ****

    "D:\\CCS workspace\\ccsv7\\utils\\bin\\gmake" -k all
    'Building file: ../SRC/FBPS-DevInit_F280x.c'
    'Invoking: C2000 Compiler'
    "D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" --silicon_version=28 -g --define=_DEBUG --define=LARGE_MODEL --include_path="D:/DSP licheng/dsplicheng/lab3-timer0_LED/INCLUDE" --include_path="D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="/packages/ti/xdais" --diag_warning=225 --large_memory_model --float_support=fpu32 --preproc_with_compile --preproc_dependency="SRC/FBPS-DevInit_F280x.d" "../SRC/FBPS-DevInit_F280x.c"

    >> Compilation failure
    SRC/subdir_rules.mk:86: recipe for target 'FBPS-DevInit_F280x.obj' failed
    "../SRC/FBPS-DevInit_F280x.c", line 11: fatal error: cannot open source file "PeripheralHeaderIncludes.h"
    1 catastrophic error detected in the compilation of "../SRC/FBPS-DevInit_F280x.c".
    Compilation terminated.
    'Building file: ../SRC/FBPS-DevInit_F2833x.c'
    'Invoking: C2000 Compiler'
    "D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" --silicon_version=28 -g --define=_DEBUG --define=LARGE_MODEL --include_path="D:/DSP licheng/dsplicheng/lab3-timer0_LED/INCLUDE" --include_path="D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="/packages/ti/xdais" --diag_warning=225 --large_memory_model --float_support=fpu32 --preproc_with_compile --preproc_dependency="SRC/FBPS-DevInit_F2833x.d" "../SRC/FBPS-DevInit_F2833x.c"

    >> Compilation failure
    SRC/subdir_rules.mk:93: recipe for target 'FBPS-DevInit_F2833x.obj' failed
    gmake: *** [FBPS-DevInit_F280x.obj] Error 1
    "../SRC/FBPS-DevInit_F2833x.c", line 22: fatal error: cannot open source file "PeripheralHeaderIncludes.h"
    1 catastrophic error detected in the compilation of "../SRC/FBPS-DevInit_F2833x.c".
    Compilation terminated.
    gmake: *** [FBPS-DevInit_F2833x.obj] Error 1
    'Building file: ../SRC/FBPS-ISR.asm'
    'Invoking: C2000 Compiler'
    "D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" --silicon_version=28 -g --define=_DEBUG --define=LARGE_MODEL --include_path="D:/DSP licheng/dsplicheng/lab3-timer0_LED/INCLUDE" --include_path="D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="/packages/ti/xdais" --diag_warning=225 --large_memory_model --float_support=fpu32 --preproc_with_compile --preproc_dependency="SRC/FBPS-ISR.d" "../SRC/FBPS-ISR.asm"
    16 Assembly Errors, No Assembly Warnings

    >> Compilation failure
    SRC/subdir_rules.mk:100: recipe for target 'FBPS-ISR.obj' failed
    "../SRC/FBPS-ISR.asm", ERROR! at line 25: [E1000] Include/Copy file not found
    or opened
    .include "PeripheralAddress_ASM.h"

    "../SRC/FBPS-ISR.asm", ERROR! at line 31: [E1000] Include/Copy file not found
    or opened
    .include "ADC_NchDrv.asm"

    "../SRC/FBPS-ISR.asm", ERROR! at line 32: [E1000] Include/Copy file not found
    or opened
    .include "ControlLaw2P2Z.asm"

    "../SRC/FBPS-ISR.asm", ERROR! at line 33: [E1000] Include/Copy file not found
    or opened
    .include "DLOG4CHC.asm"

    "../SRC/FBPS-ISR.asm", ERROR! at line 34: [E1000] Include/Copy file not found
    or opened
    .include "FullBridgePS_PwmDrv.asm"

    "../SRC/FBPS-ISR.asm", ERROR! at line 73: [E0300] '_DLOG_4CH_init' is not
    defined in this source file
    .def _DLOG_4CH_init

    "../SRC/FBPS-ISR.asm", ERROR! at line 120: [E0002] Invalid mnemonic
    specification
    FullBridgePS_DRV_INIT 2 ; Run the PWM driver init on EPWM2 and EPWM3

    "../SRC/FBPS-ISR.asm", ERROR! at line 121: [E0002] Invalid mnemonic
    specification
    ADC_NchDRV_INIT 3 ; 3 Channel, (i.e. N=3)

    "../SRC/FBPS-ISR.asm", ERROR! at line 122: [E0002] Invalid mnemonic
    specification
    ControlLaw_2P2Z_INIT 2 ; FBPS Current Controller

    "../SRC/FBPS-ISR.asm", ERROR! at line 123: [E0002] Invalid mnemonic
    specification
    ControlLaw_2P2Z_INIT 1 ; FBPS Voltage Controller

    "../SRC/FBPS-ISR.asm", ERROR! at line 221: [E0002] Invalid mnemonic
    specification
    ADC_NchDRV 3 ; 3 Channel, (i.e. N=3)

    "../SRC/FBPS-ISR.asm", ERROR! at line 227: [E0002] Invalid mnemonic
    specification
    ControlLaw_2P2Z 1 ; FBPS Voltage Controller

    "../SRC/FBPS-ISR.asm", ERROR! at line 229: [E0002] Invalid mnemonic
    specification
    ControlLaw_2P2Z 2 ; FBPS Current Controller

    "../SRC/FBPS-ISR.asm", ERROR! at line 231: [E0002] Invalid mnemonic
    specification
    FullBridgePS_DRV 2 ; Run the PWM driver on EPWM2 and EPWM3

    "../SRC/FBPS-ISR.asm", ERROR! at line 250: [E0002] Invalid mnemonic
    specification
    DLOG_4CH_update

    "../SRC/FBPS-ISR.asm", ERROR! at EOF: [E0300] The following symbols are
    undefined:
    TBPRD3
    CMPB3
    TBPHS3
    PIEACK
    ADCTRL2
    PIEACK_GROUP3
    ETCLR3
    ADCST

    Errors in Source - Assembler Aborted
    gmake: *** [FBPS-ISR.obj] Error 1
    'Building file: ../SRC/FBPS-Main.c'
    'Invoking: C2000 Compiler'
    "D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/bin/cl2000" --silicon_version=28 -g --define=_DEBUG --define=LARGE_MODEL --include_path="D:/DSP licheng/dsplicheng/lab3-timer0_LED/INCLUDE" --include_path="D:/CCS workspace/ccsv7/tools/compiler/ti-cgt-c2000_16.9.1.LTS/include" --include_path="/packages/ti/xdais" --diag_warning=225 --large_memory_model --float_support=fpu32 --preproc_with_compile --preproc_dependency="SRC/FBPS-Main.d" "../SRC/FBPS-Main.c"

    >> Compilation failure
    SRC/subdir_rules.mk:107: recipe for target 'FBPS-Main.obj' failed
    "../SRC/FBPS-Main.c", line 53: fatal error: cannot open source file "PeripheralHeaderIncludes.h"
    1 catastrophic error detected in the compilation of "../SRC/FBPS-Main.c".
    Compilation terminated.
    gmake: *** [FBPS-Main.obj] Error 1
    gmake: Target 'all' not remade because of errors.
  • 我是在原有的例程上面,把文件放进去的。
  • 那您这些PeripheralHeaderIncludes.h等文件路径是什么?是否有像下图这样添加进去?

    另外参考下

    http://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#adding-or-linking-source-files-to-project 

  • 我直接就是ADD Files了,没有像您所说的这样
  • 那您试一下上面包含路径

    另外您ADD Files是COPY 还是Link file?