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.

ways to overcome error could not open source file "DSP281x_Device.h"

Other Parts Discussed in Thread: TMS320F2812, CCSTUDIO

Hi

I am using Code Composer Studio (v3)and the processor TMS320F2812.While i am trying to import an example project i.e PMSM3_3_281X (sprc178 which i got from ti site itself), showing an error like this

pmsm3_3.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"../build/Debug.lkf" "pmsm3_3.c"
"pmsm3_3.c", line 29: fatal error: could not open source file "DSP281x_Device.h"
1 fatal error detected in the compilation of "pmsm3_3.c".
Compilation terminated.

>> Compilation failure

[DSP281x_DefaultIsr.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"D:/ragi/ragu/v35x/sys/PMSM3_3_281x/cIQmath/build/Debug.lkf" "DSP281x_DefaultIsr.c"

[DSP281x_PieCtrl.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"D:/ragi/ragu/v35x/sys/PMSM3_3_281x/cIQmath/build/Debug.lkf" "DSP281x_PieCtrl.c"

[DSP281x_PieVect.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"D:/ragi/ragu/v35x/sys/PMSM3_3_281x/cIQmath/build/Debug.lkf" "DSP281x_PieVect.c"

[DSP281x_SysCtrl.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"D:/ragi/ragu/v35x/sys/PMSM3_3_281x/cIQmath/build/Debug.lkf" "DSP281x_SysCtrl.c"

[DSP281x_GlobalVariableDefs.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"D:/ragi/ragu/v35x/sys/PMSM3_3_281x/cIQmath/build/Debug.lkf" "DSP281x_GlobalVariableDefs.c"

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

But the file 'DSP281x_Device.h" is already been added in the project.

Could you please suggest ways to rectify this error?

Regards

Ragi

  • Ragi,

    Is the path where the DSP281x_Device.h file is located specified in the compiler include search path in your project build options.  If you go to the build options for your project you can specify where the compiler should look for header files.

    Regards,

    John

  • John

    Thanks for your valuable response. I checked this,DSP281x_Device.h file is located in the same path,but again its showing same error.Could you pls give me some suggestion regarding this?

    Regards

    Ragi

  • Ragi,

    If I download that package.  Import the example: pmsm3_3_281x_CCS3x.pjt and then build it builds with no issues.  I see that there are 2 projects there, one for CCSv2 and one for CCSv3.  Can you confirm that you are using the v3 one?

    When I look at the project I see that the file pmsm3_3.c is including this file.  It does it just with "" so there is no extra relative path info to worry about.

    When I look in my installation of the examples I see that the header file is located in: C:\tidcs\c28\dsp281x\v100\DSP281x_headers\include

    When I look at the include search path for the project it is set as: .\include;..\include;..\..\..\..\lib\dmclib\cIQmath\include;..\..\..\..\lib\drvlib280x\include;..\..\..\..\lib\drvlib281x\include;..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_headers\cmd;..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_headers\include;..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_common\include;..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_examples\include;..\..\..\..\..\..\..\c28\dsp280x\v110\DSP280x_common\include;..\..\..\..\..\..\..\c28\dsp280x\v110\DSP280x_examples\include;..\..\DSP281x_headers\include

    Thus the path is there.  It is actually there twice with different relative paths.  If you happened to move your project around at all then those relative paths are not going to work, just add one that is the absolute path to the location of the header file.

    John

  • John
    Thanks a lot for helping me. I am using CCS3.1, so i took "pmsm3_3_281x_CCS3x.pjt" file which supports version 3.
    It consists of pmsm3_3.c file and is mentioned like this


    History:
    -------------------------------------------------------------------------------------
     04-15-2005    Version 3.20: Support both F280x and F281x targets
     04-25-2005 Version 3.21: Move EINT and ERTM down to ensure that all initialization
                               is completed before interrupts are allowed.
    =====================================================================

    So i have a doubt that whether version 3.1 supports this file or not?


     I also looked  at the include search path for the project it is set as

    -g -q -fr"..\obj" -i".\include" -i"..\include" -i"..\..\..\..\lib\dmclib\cIQmath\include" -i"..\..\..\..\lib\drvlib280x\include" -i"..\..\..\..\lib\drvlib281x\include" -i"..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_headers\cmd" -i"..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_headers\include" -i"..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_common\include" -i"..\..\..\..\..\..\..\c28\dsp281x\v100\DSP281x_examples\include" -i"..\..\..\..\..\..\..\c28\dsp280x\v110\DSP280x_common\include" -i"..\..\..\..\..\..\..\c28\dsp280x\v110\DSP280x_examples\include" -i"..\..\DSP281x_headers\include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28

    and it seems to be almost similar to yours.

    Now after building again am getting an error like this


    -----------------------  pmsm3_3_281x_CCS3x.pjt - Debug  -----------------------
    [pmsm3_3.c] "C:\CCStudio_v3.1\C2000\cgtools\bin\cl2000" -g -q -fr"../obj" -i"./include" -i"../include" -i"../../../../lib/dmclib/cIQmath/include" -i"../../../../lib/drvlib280x/include" -i"../../../../lib/drvlib281x/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/cmd" -i"../../../../../../../c28/dsp281x/v100/DSP281x_headers/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_common/include" -i"../../../../../../../c28/dsp281x/v100/DSP281x_examples/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_common/include" -i"../../../../../../../c28/dsp280x/v110/DSP280x_examples/include" -i"../../DSP281x_headers/include" -d"_DEBUG" -d"LARGE_MODEL" -d"TARGET_IS_F2812" -ml -v28 -@"../build/Debug.lkf" "pmsm3_3.c"
    "pmsm3_3.c", line 29: fatal error: could not open source file "DSP281x_Device.h"
    1 fatal error detected in the compilation of "pmsm3_3.c".
    Compilation terminated.

    >> Compilation failure

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

    Could you plese help me to solve this?

    Regards
    Ragi

  • Ragi,

    Edit your search path and explicitly add the path to where the DSP281x_Device.h file is located as an absolute path.

    Go to the Build Options for the Project

    Find where the Compiler Include Search Paths are specified.  In CCS3.3 it is here (3.1 likely looks a little different):

    The paths are separated by a ; so add a ; on the end and then enter in the absolute path to where the file is on your machine for me that would be C:\tidcs\c28\dsp281x\v100\DSP281x_headers\include

    BTW do you really need to use CCSv3.1.  That product is very old and unsupported.

    John

  • John,

    Could you pls give me the link to download ccsv3.3?

    Ragi

  • Ragi,

    I just sent you a friend request.  The link to 3.3 should be at the top of it.

    John

  • John

    Thanks for considering me as your friend, Sorry, i didn't get the link which you mentioned.

    Regards

    Ragi

  • I will start a conversation and send the link again in it.  It should have been at the top of the friend request but maybe the system stripped it out.

    john