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.

csl_chipal.h error

I am trying to create a project using ccsv4.2 with the TMS320C6713 starter kit. I am getting the following error:

 

#error NO CHIP DEFINED(use -dCHIP_XXX where XXXX is chip number, ie. 6201).

 

Please help..

  • Reji Joseph said:

    I am trying to create a project using ccsv4.2 with the TMS320C6713 starter kit. I am getting the following error:

     

    #error NO CHIP DEFINED(use -dCHIP_XXX where XXXX is chip number, ie. 6201).

    This error stems from the old CSL that is used with the C6713, the library used build time defines to configure itself, if you look through the CSL sources you are linking in there will be a number of #ifdef CHIP_6713 and similar statements, and if you don't have some CHIP_XXXX defined you will get the error you see. To fix this you would add the definition in question to your build options like the error message says, in CCSv4 there is a graphical build configuration tool you can use to add this, right click on your project and select properties, than in the resulting window select C/C++ Build than the Tool Settings tab than the Predefined Symbols option in the nested menu under the compiler, from here you should be able to add additional pre defines, and you will want to add CHIP_6713 if that is the device you are using.

  • Hi Thompson

    As you have suggested i did that , but i got following thing , here is the snapshot.

     

     

     

    **** Build of configuration Debug for project demo ****

     

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake -k all 

    'Building file: ../demo.tcf'

    'Invoking: TConf Script Compiler'

    "C:/Program Files/Texas Instruments/xdctools_3_16_02_32/tconf" -b -Dconfig.importPath="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages;" "../demo.tcf"

    'Finished building: ../demo.tcf'

    ' '

    'Building file: ../Sine8_LED.c'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv6700 -g --define=-dCHIP_6713 --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/include" --include_path="D:/personal DSP work+ Microprocessors & controllers/DSP workspace/demo/Debug" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/rtdx/include/c6000" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/lib_2x" --include_path="C:/Program Files/Texas Instruments/ccsv4/DSK6713 header/dsk6713/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="Sine8_LED.pp"  "../Sine8_LED.c"

    Command-line error: invalid macro definition: -dCHIP_6713

    1 fatal error detected in the compilation of "../Sine8_LED.c".

    Compilation terminated.

     

    >> Compilation failure

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: *** [Sine8_LED.obj] Error 1

    'Building file: democfg.s??'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv6700 -g --define=-dCHIP_6713 --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/include" --include_path="D:/personal DSP work+ Microprocessors & controllers/DSP workspace/demo/Debug" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/rtdx/include/c6000" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/lib_2x" --include_path="C:/Program Files/Texas Instruments/ccsv4/DSK6713 header/dsk6713/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="democfg.pp"  "democfg.s62"

    'Finished building: democfg.s??'

    ' '

    'Building file: democfg_c.c'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv6700 -g --define=-dCHIP_6713 --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/include" --include_path="D:/personal DSP work+ Microprocessors & controllers/DSP workspace/demo/Debug" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_02_14/packages/ti/rtdx/include/c6000" --include_path="C:/Program Files/Texas Instruments/ccsv4/C6xCSL/lib_2x" --include_path="C:/Program Files/Texas Instruments/ccsv4/DSK6713 header/dsk6713/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="democfg_c.pp"  "democfg_c.c"

    Command-line error: invalid macro definition: -dCHIP_6713

    1 fatal error detected in the compilation of "democfg_c.c".

    Compilation terminated.

     

    >> Compilation failure

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: *** [democfg_c.obj] Error 1

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.

    Build complete for project demo

     

    ******************************my source file was..

     

    //Sine8_LED.c  Sine generation with DIP switch control

     

    #include "dsk6713_aic23.h"   //support file for codec,DSK

    Uint32 fs = DSK6713_AIC23_FREQ_8KHZ;//set sampling rate

    short loop = 0;           //table index

    short gain = 10; //gain factor

    short sine_table[8]={0,707,1000,707,0,-707,-1000,-707};//sine values

     

    void main()

    {

     comm_poll();               //init DSK,codec,McBSP

     DSK6713_LED_init(); //init LED from BSL

     DSK6713_DIP_init(); //init DIP from BSL

     while(1) //infinite loop

     {

      if(DSK6713_DIP_get(0)==0) //=0 if DIP switch #0 pressed

      {

    DSK6713_LED_on(0);   //turn LED #0 ON

        output_sample(sine_table[loop]*gain);//output for on-time sec

        if (loop < 7) ++loop;   //check for end of table

        else loop = 0;     //reinit loop index

      }

      else DSK6713_LED_off(0); //turn LED off if not pressed

     }                                  //end of while (1) infinite loop

    } //end of main

    can comments on this, please let us both enjoy it solving
    regards 
    Nitin Mewada

     

  • Nitin Mewada said:
    Command-line error: invalid macro definition: -dCHIP_6713

    \

    It looks like you have too many define flags, you don't want to define -dCHIP_6713 you want to define just CHIP_6713, the -d is the old define flag so try removing it from your command and just use the --define=.

  • Hi:Thompson

            I make the change as you suggestion but the build error feedback is the same as before the change:

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    "C:/APPS/ccs/C6000/csl/include/csl_chiphal.h", line 267: fatal error: #error NO CHIP DEFINED (use -dCHIP_XXXX where XXXX is chip number, i.e. 6201)

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

            So it seems the problem come from some other reason.

             What's more the project under building is a legacy CCS3.3 project (the project work fine in CCS3.3 envorinment), but once translate it to CCS4.2 without any code change, the building process always failed with the above error feedback .

              I think this is a typic problem ,so will you pls help to check it?

    BR.

     

  • If the define from the build command is not working than you can try putting the define in your C code manually. Open up the C file that references the csl_chiphal.h file and add a #define statement before the header is included, so you would have something like ...

    ...

    #include <somefile.h>
    #define CHIP_6713
    #include <csl_chiphal.h>
    #include <someotherfile.h>

    ...

    The goal here is to just have a symbol of the form CHIP_XXXX before the build process parses the csl header files, usually you would define it on the command line, but defining it in the code should work too, it just makes your C file device specific.