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.

CCS: Code Composer Studio ERROR 1965

Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE

Tool/software: Code Composer Studio

Hi TI community,


i am using the ti Launchpad c2000 piccolo F280049C board and i am trying to make a simple program as follow:

#include "driverlib.h"
#include "device.h"

/**
* main.c
*/
int main(void)
{
int i = 0;
return 0;
}

and it give me the follow ERROR


>> Compilation failure
subdir_rules.mk:9: recipe for target 'main.obj' failed
"../main.c", line 1: fatal error #1965: cannot open source file "driverlib.h"
1 catastrophic error detected in the compilation of "../main.c".
Compilation terminated.
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.


Note in my build settings -> CCS build -> C2000 compiler -> include options,
i have the following:

${PROJECT_ROOT}

${CG_TOOL_ROOT}/include

  • Hello,

    Youssef Toubla said:

    Note in my build settings -> CCS build -> C2000 compiler -> include options,
    i have the following:

    ${PROJECT_ROOT}

    ${CG_TOOL_ROOT}/include

    You also need the path to driverlib.h for your device.

    Assuming you have C2000Ware installed, that would be:

    <C2000Ware INSTALL DIR>\device_support\f28004x\common\include

    The above path is also needed for "device.h"

    Thanks

    ki

  • Hi,

    The error message tells it all: the compilation failure was caused by the fact the file driverlib.h can't be found. Can you either remove this file reference from your source or find this file in your filesystem and paste its path to the include options?

    Better yet: start with a ControlWare example - your chances of having a successful build are much higher and the upside is that you end up with a much more interesting functionality (blink LED, UART communications, etc.).

    --Cheers

  • Hello,

    i've already added driverlib.h, but it shows me other errors:

    >> Compilation failure
    device/subdir_rules.mk:9: recipe for target 'device/device.obj' failed
    "..\device\driverlib.h", line 45: fatal error #1965: cannot open source file "inc/hw_memmap.h"
    1 catastrophic error detected in the compilation of "../device/device.c".
    Compilation terminated.
    gmake: *** [device/device.obj] Error 1
    "H:/epwm_ex1_trip_zone/device/driverlib.h", line 45: fatal error #1965: cannot open source file "inc/hw_memmap.h"

    what do I have to do now?

    Thanks

  • Youssef Toubla said:
    "..\device\driverlib.h", line 45: fatal error #1965: cannot open source file "inc/hw_memmap.h"

    You also need the path to "inc/hw_memmap.h" for your device.

    Assuming you have C2000Ware installed, that would be:

    <C2000Ware INSTALL DIR>\driverlib\f28004x\driverlib

    Since you are starting from scratch, and you are new to C2000Ware, you will likely run into more of these problems. I would recommend Rafael's suggestion and start with examples from ControlSUITE or even better - C2000Ware: http://dev.ti.com/tirex/explore/node?node=AL.a.macE.c7rSiGSB7klQ__gYkahfz__LATEST

    The examples are there to help you get started. It is actually not recommended for brand new users to create new projects from scratch.

    Thanks

    ki

  • Hi, Ki,
    Thanks for your help, I started with an example, and I'm just going on to create my code. Now I just want to rename this example, but if I want to compile it to my DSP, unfortunately, I can't. Am I not allowed to rename the examples from TI ?

    Best regards

  • You can rename examples in CCS by selecting the project in the Project Explorer and pressing 'F2'. Note that while some refactoring will be done, there may be some places that need to be manually updated. Hence we normally do not recommend renaming examples.