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/TMS320F28027: LAUNCHXL-F28027

Part Number: TMS320F28027
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello

As I was following the tutorial from http://azimsgarage.blogspot.sg/p/blog-page.html 

**** Build of configuration Debug for project Blink_LED ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
'Building file: ../main.c'
'Invoking: C2000 Compiler'
"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/bin/cl2000" -v28 -ml -mt --include_path="C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" -g --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="main.d"  "../main.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
"../main.c", line 5: fatal error #1965: cannot open source file "DSP28x_Project.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.

**** Build Finished ****

Then I copied DSP28x_Project.h and F2802x_Device.h into C:\ti\controlSUITE\device_support\f2802x\v230 similar to C:\ti\controlSUITE\development_kits\C2000_LaunchPad

Then I get these errors:

**** Build of configuration Debug for project Blink_LED ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
'Building file: ../main.c'
'Invoking: C2000 Compiler'
"C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/bin/cl2000" -v28 -ml -mt --include_path="C:/ti/ccsv6/tools/compiler/c2000_15.12.3.LTS/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230" -g --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="main.d"  "../main.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
"C:\ti\controlSUITE\device_support\f2802x\v230\F2802x_Device.h", line 134: fatal error #1965: cannot open source file "F2802x_Adc.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.

**** Build Finished ****

  • Here is the Code I was trying to debug.

    /*
     * main.c
     */
    
    #include "DSP28x_Project.h"     // DSP28x Headerfile
    
    #include "f2802x_common/include/clk.h"
    #include "f2802x_common/include/gpio.h"
    #include "f2802x_common/include/pll.h"
    #include "f2802x_common/include/wdog.h"
    
    
    #ifdef _FLASH
        memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
    #endif
    
    
    void main()
    {
     WDOG_Handle myWDog;
     myWDog = WDOG_init((void *)WDOG_BASE_ADDR, sizeof(WDOG_Obj));
     WDOG_disable(myWDog);
    
     CLK_Handle myClk;
     PLL_Handle myPll;
     myClk = CLK_init((void *)CLK_BASE_ADDR, sizeof(CLK_Obj));
     myPll = PLL_init((void *)PLL_BASE_ADDR, sizeof(PLL_Obj));
    
      CLK_setOscSrc(myClk, CLK_OscSrc_Internal);  ///selecting Internal Oscillator
    
      PLL_setup(myPll, PLL_Multiplier_12, PLL_DivideSelect_ClkIn_by_2);  // Selecting 60Mhz InternalClock
    
      GPIO_Handle myGpio;
      myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));
    
      GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
      GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);
      GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_GeneralPurpose);
      GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);
      GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
      GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);
      GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
      GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);
    
      GPIO_setHigh(myGpio, GPIO_Number_0);
      GPIO_setHigh(myGpio, GPIO_Number_1);
      GPIO_setHigh(myGpio, GPIO_Number_2);
      GPIO_setHigh(myGpio, GPIO_Number_3);
    
      while(1)
      {
        GPIO_setLow(myGpio, GPIO_Number_0);
        DELAY_US(1000000);
        GPIO_setHigh(myGpio, GPIO_Number_0);
        DELAY_US(1000000);
      }
    
    }
    

  • Sorry I add these paths further, solved my issue:

    include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_common/include" --include_path="C:/ti/controlSUITE/device_support/f2802x/v230/f2802x_headers/include" -g --
  • Glad to hear you solved the issue. As you discovered, in order to find header files included by the C source file, the compiler needs to be provided the path to it (via the --include_path compiler option).