Hi All,

Here is a list of places I can find to define the mcu types in the tool chain,

gcc-3.2.3:

gcc/config/msp430/msp430.c

        Defines enum msp430_arch defining MSP430_ISA_xx
                This is only used by msp430_is_xarch
        The mcu name from the command line is matched to the msp430_mcy_types
                This is used to tell if has_hwmul is set

gcc/config/msp430/t-msp430

        Selects the correct multilib (msp1 or msp2) for the mcu type from the 
command line
        This builds /lib/gcc-lib/msp430/3.2.3/msp1 and msp2 libs

gcc/config/msp430/msp430.h

        Defines CPP_SPEC spec file matches for -mmcu to set on the command line 
-D__MSP430_xxx and -DMSP430_HAS_HWMUL
        Defines LINK_SPEC spec file matches for -mmcu to set on the linker 
command line -m msp430xXXXX
        Defines CRT_BINUTILS_SPEC spec file matches for -mmcu to set on the 
linker command line to include crt430xX.o from msp430-libc

        Also defines -DMSP430_HAS_HW_MUL on the compiler command line, which is 
not used as HAS_HWMUL is used

msp430-libc:

src/Makefile

        Defines crt_all_objs to create the crt430xX.o files for each type used 
to link against. The only reason
>            not to use gcrt0.o is the X arch vectors

include/msp430xX.h

        includes for each MCU, called from io.h using the -D__MSP430_xxx from 
the compiler command line

binutils-2.18:

ld/Makefile.in
ld/Makefile.am

Defines emulations linker scripts to generate.
ld/configure.tgt

        Defines emulation targets to generate linker scripts.

ld/emulparams/msp430all.sh

        From the emulation mode, set from the commandline option -m to set the 
ROM_START/END and RAM_START/END and STACK start
                used for generating the linker scripts.

gas/config/tc-msp430.c

        Used to define MSP430_ISA_xx and bfd_mach_mspxx (used by 
bfd/cpu-msp430.c bfd/doc/bfd.info bfd/doc/archures.texi bfd/archures.c 
bfd/bfd-in2.h bfd/elf32-msp430.c)

I can see some improvements in gcc/config/msp430/msp430.h by using the form %{mmcu=msp430x*:-D__MSP430_%* } to get the defines etc.

Any suggestions to clean some of this up welcome.

Regards,

--
Peter Jansen
STS
Antarctic Division
203 Channel Highway
Kingston
TAS  7050
AUSTRALIA
Phone +61 3 6232 3533

___________________________________________________________________________

   Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
       Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________

Reply via email to