Ok, this makes sense, thanks for the interpretation. I will change accordingly. It might be something to add to the Docs so that someone else doesn't make a similar mistake. -Mark
-----Original Message----- From: mspgcc-users-ad...@lists.sourceforge.net [mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of David Brown Sent: Friday, December 13, 2002 3:06 AM To: mspgcc-users@lists.sourceforge.net Subject: Re: [Mspgcc-users] Anomaly w/ CPU type I would guess that's because the command-line mcu switch is being passed on to the linker, whereas the C level #define is not. This means that in the first case, the linker knows what chip it is and will pick the correct linker script, while in the second case it will have to fall back on some default script. Specifying the switch on the command-line will have other potentially useful effects too, such as enabling or disabling the hardware multiplier according to the chip type. If you have code that you feel is specific to a particular processor, then it is better to use "#ifndef __MSP430_449__ #error Wrong chip!" in the C code to check the chip type, rather than trying to change the chip type. mvh. David > Ok, I found an interesting occurrence. I don't want to call it a bug > because the docs don't tell you to do this, but anyway, here it is: > > If you use the #define at the beginning of your source to indicate the > CPU you are using, it doesn't choose the correct Flash memory starting > point. If you use the command line, it works fine. > > Example: > #define __MSP430_449__ > In the source gives: > 0000FC00 <_reset_vector__>: > Whereas, > msp430-gcc -mmcu=msp430x449 -g %2 -o %1.elf %1.c > Gives: > 00001100 <_reset_vector__>: > > Anyway, if this is not a bug, then I'll just be forced to change my > command line, and not be able to force the .c source to be run on a > particular platform. > > Thanks > -Mark > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > > ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users