From 44c86e8c6da0c80ea8a55718bdab34e05e065abd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 8 Aug 2005 17:08:04 +0000 Subject: [PATCH] Add support for msp430x21xx variants --- bfd/ChangeLog | 7 ++++ bfd/archures.c | 1 + bfd/bfd-in2.h | 8 +++-- gas/ChangeLog | 5 +++ gas/config/tc-msp430.c | 6 ++++ ld/ChangeLog | 10 ++++++ ld/Makefile.am | 20 +++++++++++ ld/Makefile.in | 20 +++++++++++ ld/configure.tgt | 2 +- ld/emulparams/msp430all.sh | 68 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 143 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c9366e8d2b4..9fd5c3b16bb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2005-08-08 Eric Dönges + + * archures.c (bfd_mach_msp21): New MSP430 machine number. + * bfd-in2.h: Regenerate. + * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx + variants. + 2005-08-07 Nick Clifton Paul Brook diff --git a/bfd/archures.c b/bfd/archures.c index eb042a6f01b..eca46010e04 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -352,6 +352,7 @@ DESCRIPTION .#define bfd_mach_msp14 14 .#define bfd_mach_msp15 15 .#define bfd_mach_msp16 16 +.#define bfd_mach_msp21 21 .#define bfd_mach_msp31 31 .#define bfd_mach_msp32 32 .#define bfd_mach_msp33 33 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 1c99cc20e48..139627aeb52 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1936,6 +1936,7 @@ enum bfd_architecture #define bfd_mach_msp14 14 #define bfd_mach_msp15 15 #define bfd_mach_msp16 16 +#define bfd_mach_msp21 21 #define bfd_mach_msp31 31 #define bfd_mach_msp32 32 #define bfd_mach_msp33 33 @@ -4486,9 +4487,10 @@ void bfd_preserve_restore (bfd *, struct bfd_preserve *); void bfd_preserve_finish (bfd *, struct bfd_preserve *); -void bfd_hide_symbol - (bfd *, struct bfd_link_info *, - struct bfd_link_hash_entry *, bfd_boolean); +void bfd_hide_symbol (bfd *, + struct bfd_link_info *, + struct bfd_link_hash_entry *, + bfd_boolean); /* Extracted from archive.c. */ symindex bfd_get_next_mapent diff --git a/gas/ChangeLog b/gas/ChangeLog index ccb4b02c9f1..91756562276 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-08-08 Nick Clifton + + * config/tc-msp430.c (MSP430_ISA_21): Define. + (mcu_types): Add entries for msp430x21xx variants. + 2005-08-08 Nick Clifton PR 1070 diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index 3f2ba84be22..9e5c5335801 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -205,6 +205,7 @@ struct mcu_type_s #define MSP430_ISA_14 14 #define MSP430_ISA_15 15 #define MSP430_ISA_16 16 +#define MSP430_ISA_21 21 #define MSP430_ISA_31 31 #define MSP430_ISA_32 32 #define MSP430_ISA_33 33 @@ -251,6 +252,11 @@ static struct mcu_type_s mcu_types[] = {"msp430x1611", MSP430_ISA_16, bfd_mach_msp16}, {"msp430x1612", MSP430_ISA_16, bfd_mach_msp16}, + {"msp430x2101", MSP430_ISA_21, bfd_mach_msp21}, + {"msp430x2111", MSP430_ISA_21, bfd_mach_msp21}, + {"msp430x2121", MSP430_ISA_21, bfd_mach_msp21}, + {"msp430x2131", MSP430_ISA_21, bfd_mach_msp21}, + {"msp430x311", MSP430_ISA_31, bfd_mach_msp31}, {"msp430x312", MSP430_ISA_31, bfd_mach_msp31}, {"msp430x313", MSP430_ISA_31, bfd_mach_msp31}, diff --git a/ld/ChangeLog b/ld/ChangeLog index 5e764011d2a..f0e4d0af6c0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2005-08-08 Eric Dönges + + * Makefile.am (ALL_EMULATIONS): Add msp430x21xx variants. + Add rules to build these emulations. + * Makefile.in: Regenerate. + * configure.tgt (msp430): Add the new variants to the + targ_extra_emuls list. + * emulparams/msp430all.sh: Add entries for the msp430x21xx + variants. + 2005-08-05 H.J. Lu * ld.texinfo: Document PROVIDE_HIDDEN. diff --git a/ld/Makefile.am b/ld/Makefile.am index 56991745eb5..876822c1736 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -290,6 +290,10 @@ ALL_EMULATIONS = \ emsp430x1610.o \ emsp430x1611.o \ emsp430x1612.o \ + emsp430x2101.o \ + emsp430x2111.o \ + emsp430x2121.o \ + emsp430x2131.o \ emsp430x311.o \ emsp430x312.o \ emsp430x313.o \ @@ -1219,6 +1223,22 @@ emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all +emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all +emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all +emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all +emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \ ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 23931d25526..12eb3e7b251 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -513,6 +513,10 @@ ALL_EMULATIONS = \ emsp430x1610.o \ emsp430x1611.o \ emsp430x1612.o \ + emsp430x2101.o \ + emsp430x2111.o \ + emsp430x2121.o \ + emsp430x2131.o \ emsp430x311.o \ emsp430x312.o \ emsp430x313.o \ @@ -2023,6 +2027,22 @@ emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all +emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all +emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all +emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all +emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \ ${GEN_DEPENDS} diff --git a/ld/configure.tgt b/ld/configure.tgt index 62ad634261b..017c2d6fc58 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -350,7 +350,7 @@ mn10300-*-*) targ_emul=mn10300 ms1-*elf) targ_emul=elf32ms1 ;; msp430-*-*) targ_emul=msp430x110 - targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" + targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449" ;; ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;; ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd diff --git a/ld/emulparams/msp430all.sh b/ld/emulparams/msp430all.sh index f6f2b465617..baee02eefd5 100644 --- a/ld/emulparams/msp430all.sh +++ b/ld/emulparams/msp430all.sh @@ -463,6 +463,74 @@ RAM_SIZE=0x1400 STACK=0x2500 fi +if [ "${MSP430_NAME}" = "msp430x2101" ] ; then +ARCH=msp:21 +MACHINE= +SCRIPT_NAME=elf32msp430 +OUTPUT_FORMAT="elf32-msp430" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +ROM_START=0xFC00 +ROM_SIZE=0x03e0 +RAM_START=0x0200 +RAM_SIZE=128 + +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x2111" ] ; then +ARCH=msp:21 +MACHINE= +SCRIPT_NAME=elf32msp430 +OUTPUT_FORMAT="elf32-msp430" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +ROM_START=0xF800 +ROM_SIZE=0x07e0 +RAM_START=0x0200 +RAM_SIZE=128 + +STACK=0x280 +fi + +if [ "${MSP430_NAME}" = "msp430x2121" ] ; then +ARCH=msp:21 +MACHINE= +SCRIPT_NAME=elf32msp430 +OUTPUT_FORMAT="elf32-msp430" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +ROM_START=0xf000 +ROM_SIZE=0x0fe0 +RAM_START=0x0200 +RAM_SIZE=256 + +STACK=0x300 +fi + +if [ "${MSP430_NAME}" = "msp430x2131" ] ; then +ARCH=msp:21 +MACHINE= +SCRIPT_NAME=elf32msp430 +OUTPUT_FORMAT="elf32-msp430" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=generic + +ROM_START=0xe000 +ROM_SIZE=0x1fe0 +RAM_START=0x0200 +RAM_SIZE=256 + +STACK=0x300 +fi + if [ "${MSP430_NAME}" = "msp430x311" ] ; then ARCH=msp:31 MACHINE= -- 2.30.2