EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Predefined symbol in IAR

Started by FB October 25, 2007
Hi!
I would like to know at compiler time which target is selected in the
proyect option in IAR.
I've seen that __tid__ is not reccomended. It recommends the use of
__icc430__ but it doesn't say hoq to use it.
Please I would like to have more detailed description of that macro. Thanks!

FB


02:31 p.m.

Beginning Microcontrollers with the MSP430

FB wrote:
> Hi!
> I would like to know at compiler time which target is selected in the
> proyect option in IAR.
> I've seen that __tid__ is not reccomended. It recommends the use of
> __icc430__ but it doesn't say hoq to use it.
> Please I would like to have more detailed description of that macro. Thanks!

The __TID__ and __ICC430__ symbols only tells you that it's the 430
compiler that is used (well, in the __TID__ case some other details are
also included).

The target in question is passed in by the Embedded Workbench as a
symbol om the form like __MSP430F4351__, __MSP430F1121A__, and
__MSP430GENERIC__. This symbol is not documented at this moment as it is
seen as an internal thing between the embedded workbench and the
generinc "io430.h" and "msp430.h" header files. However, I would
consider them safe to use, as long as you have an "#else" at the end
detecting the situation when no symbol is passed.

For a complete list, and an example of how these symbols are use, take a
look in the above mentioned header files.

-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.

Memfault Beyond the Launch