If you pass option -mmcu=msp430x149, then compiler defines __MSP430_149__ For -mmcu=msp430x[arch] option, gcc defines __MSP430_[arch]__
You also can check all defines by passing -v option to gcc. ~d On Fri, 13 Sep 2002 10:32:11 -0300 Pedro Zorzenon Neto <[email protected]> wrote: > Hi folks, > > I need my program to know if it is running in a msp430f147, f148 or > f149. > > Is there any way to detect inside the program which was the -mmcu > flag used to compile it? > > Or will I have to compile it with something like this: > -mmcu=msp430x149 -DMMCU_msp430x149 > > Thanks, > Pedro > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/
