What do the __CC_ARM, __ICCARM__, __GNUC__ and __TASKING__ macros mean?

17,752

Solution 1

These are different compilers for ARM processors, probably these macros are used to hide compiler-dependent stuff in code that's compilable by several compilers.

Solution 2

They are macros for identifying the compiler being used to build the code.

A list of such macros, and others for identifying architecture and OS etc. can be found at http://sourceforge.net/p/predef/wiki/Home/. It does not however comprehensively cover many compilers from smaller embedded systems vendors (Tasking and Imagecraft for example).

Solution 3

These are compiler specific MACROS and defined in compiler code.For example __ICC is for IAR and __GNU is for GNU compilers.There are some code given in BSP part for STM platform which have dependency on compilers.

Share:
17,752

Related videos on Youtube

Ishmeet
Author by

Ishmeet

I have worked on tcp ip stack and have knowledge of wlan and ported it on AVR, PIC, ATMEL, STM based platforms ...

Updated on June 17, 2022

Comments

  • Ishmeet
    Ishmeet almost 2 years

    I am working on STM32l151rct6a by stm, I have stumbled upon these MACRO definitions

    __CC_ARM, __ICCARM__, __GNUC__, __TASKING__
    

    Does anyone know what they mean?