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.

Could not open source file "DSP2833x_Device.h"

Other Parts Discussed in Thread: CCSTUDIO

Dear All,

I just follow the tutorial give in "Texas Instrument C2000 Teaching Materials" module no.7 (PWM). When I am compiling my project, there are 7 errors but caused by same reason.

Fatal error : could not open source file "DSP2833x_Device.h".


I have done all the instruction. Uninstall Code Composer 3.3 and reinstall it.

Please advise

Adlan Bagus Pradana

IIT Delhi

  • My assumption is that the path described to the C compiler to look for header files is not accurate to allow the C compiler to find the DSP2833x_Device.h file.

    You should review the compiler include path via the Project build properties and ensure the path(s) are added that will lead to this above file on your PC's hard drive.

  • Also, if you perform a search on the phase "could not open source file" in the E2E forum search box, you will find a number of posts that suggest similar courses of action.

  • Dear BrandonAzbell,

    thank you for your response.

    First I want to add information that when compiling the tutorial says that I have to include 2 search paths;

    1. C:\tidcs\C28\DSP2833x\v131\DSP2833x_headers\include;

    2. C:\tidcs\C28\DSP2833x\v131\DSP2833x_common\include;

    I have seen again and when click open file dependencies option, realized there are 2 .h files which could not be opened; DSP2833x_Device.h and DSP2833x_example.h. I have check physically n found that both 2 .h files is physically existed in my include search paths

    1. DSP2833x_Device.h is in C:\tidcs\C28\DSP2833x\v131\DSP2833x_headers\include

    2. DSP2833x_example.h is in C:\tidcs\C28\DSP2833x\v131\DSP2833x_common\include

    But why Code Composer can not find it?

    Here is the complete error notification

    ------------------------------  pwm.pjt - Debug  ------------------------------
    [DSP2833x_CpuTimers.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_CpuTimers.c"
    "DSP2833x_CpuTimers.c", line 20: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_CpuTimers.c".
    Compilation terminated.

    >> Compilation failure

    [DSP2833x_DefaultIsr.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_DefaultIsr.c"
    "DSP2833x_DefaultIsr.c", line 24: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_DefaultIsr.c".
    Compilation terminated.

    >> Compilation failure

    [DSP2833x_PieCtrl.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_PieCtrl.c"
    "DSP2833x_PieCtrl.c", line 14: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_PieCtrl.c".
    Compilation terminated.

    >> Compilation failure

    [DSP2833x_PieVect.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_PieVect.c"
    "DSP2833x_PieVect.c", line 14: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_PieVect.c".
    Compilation terminated.

    >> Compilation failure

    [DSP2833x_SysCtrl.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_SysCtrl.c"
    "DSP2833x_SysCtrl.c", line 19: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_SysCtrl.c".
    Compilation terminated.

    >> Compilation failure

    [DSP2833x_GlobalVariableDefs.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"../../../../../../CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "DSP2833x_GlobalVariableDefs.c"
    "DSP2833x_GlobalVariableDefs.c", line 14: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "DSP2833x_GlobalVariableDefs.c".
    Compilation terminated.

    >> Compilation failure

    [Lab7_1.c] "C:\CCStudio_v3.3\C2000\cgtools\bin\cl2000" -g -pdsw225 -fr"C:/CCStudio_v3.3/MyProjects/pwm/Debug" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_headers /include" -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include" -d"_DEBUG" -d"LARGE_MODEL" -ml -v28 --float_support=fpu32 -@"C:/CCStudio_v3.3/MyProjects/pwm/Debug.lkf" "Lab7_1.c"
    "Lab7_1.c", line 20: fatal error: could not open source file "DSP2833x_Device.h"
    1 fatal error detected in the compilation of "Lab7_1.c".
    Compilation terminated.

    >> Compilation failure

    Build Complete,
      7 Errors, 0 Warnings, 0 Remarks.

  • The error messagese in the compiler output appears to have whitespaces between various directory levels.  For example:

    -i"C:/ tidcs / c28 / dsp2833x/ v131/ DSP2833x_common/ include"

    This seems very strange and I wonder if this is a cause of the issues you are seeing.  Would you retype these paths to ensure there are no whitespaces?