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.

Error in Lab5 c2000 student guide

I am doing the Lab5 exercise from of c2000 student guide. i´ve done the first seven steps without problems, but in the 8 step in which i have to buid the project, i have an error that says:

"..\Lab.h", line 24: fatal error: could not open source file "F2806x_Device.h"

I´m using code composer studio v5. I think it has any relation with the "lab.h" file but i can´t find what is the problem 

  • The problem is you have an error in specifying the path for the header files.  If you used the installer for the workshop, the header files will be under c:\c28x\labs\F2806x_headers, and lab 5 is under c:\c28x\labs\lab5.  The path is set up in step 3:

    Setup the build options by right-clicking on Lab5 in the Project Explorer window and select Properties.  We need to setup the include search path to include the peripheral register header files.  Under “C2000 Compiler” select “Include Options”.  In the lower box that opens (“Add dir to #include search path”) click the Add icon (first icon with green plus sign).  Then in the “Add directory path” window type:

    ${PROJECT_ROOT}/../../F2806x_headers/include

    Click OK to include the search path.  Finally, click OK to save and close the Properties window.

    Be sure everything in the path is spelled correctly and double check "/../../".  You might want to copy and paste the path above directly into CCS.  This will fix your problem.

    If you are not using the installer from the workshop then specify the path where you installed them. 

  • Hi Ivan,

    you may find this wiki helpful correcting and/or adding to  the include paths and variables.

    http://processors.wiki.ti.com/index.php/Include_paths_and_options

    Please keep us informed how it goes.

    Best Regards,
    Lisa

  • Ken Thanks for your help

     

    Actually i had followed the instructions of step 3 and of course i had written that thing in the include options.

    The thing that i didn't know is that i have to put the include files out of the folder "lab5", I mean, put the includes in this adress "c:\c28x\labs\F2806x_headers". I've done that, but the problem continue.

    I tried pressing in "project" tab, and "add files",  i after added all the files to the "F2806x_headers" folder. And after pressed build, it didn't generate the error, but i have another one. it says "

    "..\Lab.h", line 18: fatal error: could not open source file "string.h".

    and i have a warning that says    "Description Resource Path Location Type Invalid project path: Include path not found (C:\c28x\F2806x_headers\include).

    I don't know what happened, i've been doing all the things as the student guide says, is there any trick? 

  • As a test, import the solution project located at c:\c28x\solutions\lab5.  Build it and see if you get an error.

    We used these lab files two weeks ago in a workshop and did not have any errors.  By testing the solution, we can determine if the problem is in your build options or the installation of CCS.