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.

#35 #error Unrecognized COMPILER!



Hello,

I am working with  EK-LM4F232, I am trying to build a project that use "usblib.h" but there is an error inside this file called " #35 #error Unrecognized COMPILER!". This is the usblib.h code part that present the error

#if defined(ccs) || \
defined(codered) || \
defined(gcc) || \
defined(rvmdk) || \
defined(__ARMCC_VERSION) || \
defined(sourcerygxx)
#define PACKED __attribute__ ((packed))
#elif defined(ewarm)
#define PACKED
#else
#error Unrecognized COMPILER!   //************************************************************/// this is the error show in  in problem window.

#endif

please help..

  • Hi,

    This means that you really need "to define" the compiler - to inform what tools you use to take further paths in compiling. You can do that by defining the symbol of your compiler (you don't mention it in the post, although needed, otherwise how to help?). If CCS, then in the predefined symbols add the word "ccs" (without quotes) - this should be the same place where you defined PART_LM4F232H5QD. 

    Petrei

  • hello, 

    i am using CCS editor . how can i define the symbol of compiler ?


    **** Build of configuration Debug for project led_6 ****

    "D:\\installlation\\TI_INSTALL\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/StellarisWare/usblib/device" --include_path="C:/StellarisWare/usblib" --include_path="C:/StellarisWare/driverlib" --include_path="C:/StellarisWare/boards/ek-lm4f232/drivers" --include_path="C:/StellarisWare/grlib" --include_path="C:/StellarisWare/inc" --include_path="C:/StellarisWare/utils" --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    "C:/StellarisWare/usblib/usblib.h", line 95: fatal error #35: #error Unrecognized COMPILER!
    1 fatal error detected in the compilation of "../main.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [main.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

    this is error is coming in console.

  • Hi,

    you need to go to Project -> Properties, and see whether ccs is defined as follows:

  • hello Leo Hendrawan ,

    thanks for solving  that problem, but another problem is now generated i think  this is because of  "undefined NAME"... the problem is now as showing in console is 


    **** Build of configuration Debug for project led_6 ****

    "D:\\installlation\\TI_INSTALL\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/StellarisWare/boards/ek-lm4f232/sine_demo" --include_path="C:/StellarisWare/usblib/host" --include_path="C:/StellarisWare/usblib/device" --include_path="C:/StellarisWare/usblib" --include_path="C:/StellarisWare/driverlib" --include_path="C:/StellarisWare/boards/ek-lm4f232/drivers" --include_path="C:/StellarisWare/grlib" --include_path="C:/StellarisWare/inc" --include_path="C:/StellarisWare/utils" --define=ccs="ccs" --define= PART_LM4F232H5QD --define=TARGET_IS_BLIZZARD_RA1 --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    error: option --define is missing its parameter 'NAME[=value]'
    gmake: *** [main.obj] Error 1
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="D:/installlation/TI_INSTALL/ccsv5/tools/compiler/arm_5.0.1/include" --include_path="C:/StellarisWare/boards/ek-lm4f232/sine_demo" --include_path="C:/StellarisWare/usblib/host" --include_path="C:/StellarisWare/usblib/device" --include_path="C:/StellarisWare/usblib" --include_path="C:/StellarisWare/driverlib" --include_path="C:/StellarisWare/boards/ek-lm4f232/drivers" --include_path="C:/StellarisWare/grlib" --include_path="C:/StellarisWare/inc" --include_path="C:/StellarisWare/utils" --define=ccs="ccs" --define= PART_LM4F232H5QD --define=TARGET_IS_BLIZZARD_RA1 --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="startup_ccs.pp" "../startup_ccs.c"
    error: option --define is missing its parameter 'NAME[=value]'
    gmake: *** [startup_ccs.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****


  • Hi,

    i think the best way you can do to prevent other errors, is to take a ready example (there are some USB examples for LM4F232) and modify it. By doing this, you make sure that the compile options, etc, are already working.