If you want to make sure your code is compiled for the right cpu, then you are probably better doing
#ifndef __MSP430_449__ #error Things are going to go wrong... #endif > What do you mean? I haven't gotten any complaints :) > Seriously, I haven't gotten any warnings or anything because of this. Perhaps you have different warning flags set, so that a re-define of the same value does not cause a warning. Alternatively, you could be missing the -mcpu flag. David > -Mark > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Dmitry > Sent: Tuesday, December 03, 2002 2:04 PM > To: [email protected] > Subject: Re: [Mspgcc-users] RE: #Define Cpu type? (was: Shift > Operators?) > > > well, > just compiler will complain... > but if you do not mind... > ~d > > P.S. if you'll not specify mcu arch, the gcc will not generate hardware > multiplication code and probably will link wrong library. Also, it might > be > possible that start address/stack top will be set 'unefficiently'. > I think this is easier to say -mmcu=msp430x449 than define arch in > sources, > specify stack/etc. addresses and provide a linker script. But if you > find > this easier... :) > > On Tuesday 03 December 2002 21:49, Mark Stokes wrote: > > I know it will, but is there a reason not to do this? This code will > > most likely not work on any other processor as I am using components > of > > the chip that are not available on others. Originally, I had this in > > order to make my command line easier to type... Since then, I have > made > > a .bat file that automates the generation of all the necessary files. > > Is there a good reason not to have the #define? > > -Mark > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Dmitry > > Sent: Tuesday, December 03, 2002 11:23 AM > > To: [email protected] > > Subject: Re: [Mspgcc-users] Shift Operators? > > > > :) > > > > do not scare me anymore... > > I've spent quite a while optimizing these operations :) > > > > ~d > > > > P.S. do not define __MSP430_449__ just pass an arch option to gcc. it > > will do > > necessary defines for you. > > > > On Tuesday 03 December 2002 18:44, Mark Stokes wrote: > > > Thanks to all for the typo lesson. > > > Looks like the >>= operator actually results in less code. > > > > > > -Mark > > > > > > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[email protected]] On Behalf Of David > > > Brown > > > Sent: Tuesday, December 03, 2002 10:40 AM > > > To: [email protected] > > > Subject: Re: [Mspgcc-users] Shift Operators? > > > > > > > Example code attached. > > > > Note line 45 has no resulting assembly. This was compiled w/ no > > > > optimizations. > > > > -Mark > > > > > > That's because line 45 doesn't do anything: > > > i >> 4; > > > > > > Try replacing it with > > > i >>= 4; > > > and see if that works better. > > > > > > It's these sort of small typos that make C such a joy to use... > > > > > > You might also want to use the -W and -Wall flags to let the > compiler > > > warn > > > you about such things. > > > > > > mvh. > > > > > > David > > > > > > > -----Original Message----- > > > > From: [email protected] > > > > [mailto:[email protected]] On Behalf Of > > > > Dmitry > > > > > > Sent: Tuesday, December 03, 2002 9:44 AM > > > > To: [email protected] > > > > Subject: Re: [Mspgcc-users] Shift Operators? > > > > > > > > > > > > sources? example code? > > > > ~d > > > > > > > > On Tuesday 03 December 2002 17:41, Mark Stokes wrote: > > > > > Looks like shift operators are just being ignored. The easy > > > > > > > > workaround > > > > > > > > > is to multiply or divide by a power of 2. > > > > > Am I missing something? Is this support planned? > > > > > -Mark > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > > > > handheld. Power & Color in a compact size! > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > > > > _______________________________________________ > > > > > 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 > > > > ********************************************************************/ > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > > > handheld. Power & Color in a compact size! > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > > > _______________________________________________ > > > > Mspgcc-users mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft Visual Studio.NET > > > comprehensive development tool, built to increase your > > > productivity. Try a free online hosted session at: > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > > > _______________________________________________ > > > Mspgcc-users mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Microsoft Visual Studio.NET > > > comprehensive development tool, built to increase your > > > productivity. Try a free online hosted session at: > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > > > _______________________________________________ > > > Mspgcc-users mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft Visual Studio.NET > > comprehensive development tool, built to increase your > > productivity. Try a free online hosted session at: > > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > > _______________________________________________ > > Mspgcc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft Visual Studio.NET > > comprehensive development tool, built to increase your > > productivity. Try a free online hosted session at: > > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > > _______________________________________________ > > Mspgcc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Microsoft Visual Studio.NET > comprehensive development tool, built to increase your > productivity. Try a free online hosted session at: > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Microsoft Visual Studio.NET > comprehensive development tool, built to increase your > productivity. Try a free online hosted session at: > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > >
