diff options
-rw-r--r-- | bfd/ChangeLog | 14 | ||||
-rw-r--r-- | bfd/archures.c | 4 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/cpu-avr.c | 76 | ||||
-rw-r--r-- | bfd/elf32-avr.c | 29 | ||||
-rw-r--r-- | gas/ChangeLog | 10 | ||||
-rw-r--r-- | gas/config/tc-avr.c | 241 | ||||
-rw-r--r-- | gas/doc/c-avr.texi | 48 | ||||
-rw-r--r-- | include/ChangeLog | 11 | ||||
-rw-r--r-- | include/elf/avr.h | 6 | ||||
-rw-r--r-- | include/opcode/avr.h | 26 | ||||
-rw-r--r-- | ld/ChangeLog | 13 | ||||
-rw-r--r-- | ld/Makefile.am | 20 | ||||
-rw-r--r-- | ld/Makefile.in | 28 | ||||
-rw-r--r-- | ld/configure.tgt | 2 | ||||
-rw-r--r-- | ld/emulparams/avr25.sh | 11 | ||||
-rw-r--r-- | ld/emulparams/avr31.sh | 11 | ||||
-rw-r--r-- | ld/emulparams/avr35.sh | 11 | ||||
-rw-r--r-- | ld/emulparams/avr51.sh | 11 |
19 files changed, 414 insertions, 162 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a705ca7..14cbb10 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,17 @@ +2008-08-08 Anatoly Sokolov <aesok@post.ru> + + * archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35, + bfd_mach_avr51): New. + * bfd-in2.h: Regenerate. + * cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51 + architectures. Change comments to match architecture comments in GCC. + (compatible): Add test for new AVR architectures. + * elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize + bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51. + (elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, + E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51. + + 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> Daniel Jacobowitz <dan@codesourcery.com> Catherine Moore <clm@codesourcery.com> diff --git a/bfd/archures.c b/bfd/archures.c index fec83e5..aa49499 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -349,9 +349,13 @@ DESCRIPTION . bfd_arch_avr, {* Atmel AVR microcontrollers. *} .#define bfd_mach_avr1 1 .#define bfd_mach_avr2 2 +.#define bfd_mach_avr25 25 .#define bfd_mach_avr3 3 +.#define bfd_mach_avr31 31 +.#define bfd_mach_avr35 35 .#define bfd_mach_avr4 4 .#define bfd_mach_avr5 5 +.#define bfd_mach_avr51 51 .#define bfd_mach_avr6 6 . bfd_arch_bfin, {* ADI Blackfin *} .#define bfd_mach_bfin 1 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 9b0dcff..8868e7d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1971,9 +1971,13 @@ enum bfd_architecture bfd_arch_avr, /* Atmel AVR microcontrollers. */ #define bfd_mach_avr1 1 #define bfd_mach_avr2 2 +#define bfd_mach_avr25 25 #define bfd_mach_avr3 3 +#define bfd_mach_avr31 31 +#define bfd_mach_avr35 35 #define bfd_mach_avr4 4 #define bfd_mach_avr5 5 +#define bfd_mach_avr51 51 #define bfd_mach_avr6 6 bfd_arch_bfin, /* ADI Blackfin */ #define bfd_mach_bfin 1 diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index 51472a3..364f64e 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -35,20 +35,44 @@ compatible (const bfd_arch_info_type * a, if (a->arch != b->arch) return NULL; - /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */ - if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4) - || (a->mach == bfd_mach_avr4 && b->mach == bfd_mach_avr3)) - return NULL; + if (a->mach == b->mach) + return a; - /* So far all newer AVR architecture cores are supersets of previous - cores. */ - if (a->mach <= b->mach) + if (a->mach <= bfd_mach_avr6 && b->mach <= bfd_mach_avr6) + { + /* Special case for ATmega[16]03 (avr:3) and ATmega83 (avr:4). */ + if ((a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr4) + || (a->mach == bfd_mach_avr4 && b->mach == bfd_mach_avr3)) + return NULL; + + if (a->mach <= b->mach) + return b; + + if (a->mach >= b->mach) + return a; + } + + if (a->mach == bfd_mach_avr2 && b->mach == bfd_mach_avr25) + return a; + if (a->mach == bfd_mach_avr25 && b->mach == bfd_mach_avr2) + return b; + + if (a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr31) + return a; + if (a->mach == bfd_mach_avr31 && b->mach == bfd_mach_avr3) return b; - if (a->mach >= b->mach) + if (a->mach == bfd_mach_avr3 && b->mach == bfd_mach_avr35) return a; + if (a->mach == bfd_mach_avr35 && b->mach == bfd_mach_avr3) + return b; + + if (a->mach == bfd_mach_avr5 && b->mach == bfd_mach_avr51) + return a; + if (a->mach == bfd_mach_avr51 && b->mach == bfd_mach_avr5) + return b; + - /* Never reached! */ return NULL; } @@ -70,22 +94,38 @@ compatible (const bfd_arch_info_type * a, static const bfd_arch_info_type arch_info_struct[] = { - /* AT90S1200, ATtiny1x, ATtiny28. */ + /* Assembler only. */ N (16, bfd_mach_avr1, "avr:1", FALSE, & arch_info_struct[1]), - /* AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22. */ + /* Classic, <= 8K. */ N (16, bfd_mach_avr2, "avr:2", FALSE, & arch_info_struct[2]), - /* ATmega103, ATmega603. */ - N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[3]), + /* Classic + MOVW, <= 8K. */ + N (16, bfd_mach_avr25, "avr:25", FALSE, & arch_info_struct[3]), + + /* Classic, > 8K, <= 64K. */ + /* TODO: addr_bits should be 16, but set to 22 for some following + version of GCC (from 4.3) for backward compatibility. */ + N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[4]), + + /* Classic, == 128K. */ + N (22, bfd_mach_avr31, "avr:31", FALSE, & arch_info_struct[5]), + + /* Classic + MOVW + JMP/CALL, > 8K, <= 64K. */ + N (16, bfd_mach_avr35, "avr:35", FALSE, & arch_info_struct[6]), - /* ATmega83, ATmega85. */ - N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[4]), + /* Enhanced, <= 8K. */ + N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[7]), - /* ATmega161, ATmega163, ATmega32, AT94K. */ - N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[5]), + /* Enhanced, > 8K, <= 64K. */ + /* TODO: addr_bits should be 16, but set to 22 for some following + version of GCC (from 4.3) for backward compatibility. */ + N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[8]), + + /* Enhanced, == 128K. */ + N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]), - /* ATmega256x. */ + /* 3-Byte PC. */ N (22, bfd_mach_avr6, "avr:6", FALSE, NULL) }; diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index bab5ca0..fffd040 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1296,10 +1296,19 @@ bfd_elf_avr_final_write_processing (bfd *abfd, val = E_AVR_MACH_AVR1; break; + case bfd_mach_avr25: + val = E_AVR_MACH_AVR25; + case bfd_mach_avr3: val = E_AVR_MACH_AVR3; break; + case bfd_mach_avr31: + val = E_AVR_MACH_AVR31; + + case bfd_mach_avr35: + val = E_AVR_MACH_AVR35; + case bfd_mach_avr4: val = E_AVR_MACH_AVR4; break; @@ -1308,6 +1317,10 @@ bfd_elf_avr_final_write_processing (bfd *abfd, val = E_AVR_MACH_AVR5; break; + case bfd_mach_avr51: + val = E_AVR_MACH_AVR51; + break; + case bfd_mach_avr6: val = E_AVR_MACH_AVR6; break; @@ -1342,10 +1355,22 @@ elf32_avr_object_p (bfd *abfd) e_set = bfd_mach_avr1; break; + case E_AVR_MACH_AVR25: + e_set = bfd_mach_avr25; + break; + case E_AVR_MACH_AVR3: e_set = bfd_mach_avr3; break; + case E_AVR_MACH_AVR31: + e_set = bfd_mach_avr31; + break; + + case E_AVR_MACH_AVR35: + e_set = bfd_mach_avr35; + break; + case E_AVR_MACH_AVR4: e_set = bfd_mach_avr4; break; @@ -1354,6 +1379,10 @@ elf32_avr_object_p (bfd *abfd) e_set = bfd_mach_avr5; break; + case E_AVR_MACH_AVR51: + e_set = bfd_mach_avr51; + break; + case E_AVR_MACH_AVR6: e_set = bfd_mach_avr6; break; diff --git a/gas/ChangeLog b/gas/ChangeLog index da59bd8..e108c7f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2008-08-08 Anatoly Sokolov <aesok@post.ru> + + * config/tc-avr.c (mcu_types): Add avr25, avr31, avr35, and avr51 + architectures. Reorganize list to put mcu types in correct architectures + and to order list same as in GCC. Use new ISA definitions in + include/opcode/avr.h. + * doc/c-avr.texi: Add avr25, avr31, avr35, and avr51 architecture + descriptions. Reorganize descriptions to put mcu types in correct + architectures and to order lists same as in GCC. + 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> Daniel Jacobowitz <dan@codesourcery.com> diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c index d502219..dfac293 100644 --- a/gas/config/tc-avr.c +++ b/gas/config/tc-avr.c @@ -56,127 +56,139 @@ struct mcu_type_s }; /* XXX - devices that don't seem to exist (renamed, replaced with larger - ones, or planned but never produced), left here for compatibility. - TODO: hide them in show_mcu_list output? */ + ones, or planned but never produced), left here for compatibility. */ static struct mcu_type_s mcu_types[] = { - {"avr1", AVR_ISA_TINY1, bfd_mach_avr1}, - {"avr2", AVR_ISA_TINY2, bfd_mach_avr2}, - {"avr3", AVR_ISA_AVR3, bfd_mach_avr3}, - {"avr4", AVR_ISA_M8, bfd_mach_avr4}, - {"avr5", AVR_ISA_ALL, bfd_mach_avr5}, - {"avr6", AVR_ISA_ALL, bfd_mach_avr6}, + {"avr1", AVR_ISA_AVR1, bfd_mach_avr1}, +/* TODO: insruction set for avr2 architecture should be AVR_ISA_AVR2, + but set to AVR_ISA_AVR25 for some following version + of GCC (from 4.3) for backward compatibility. */ + {"avr2", AVR_ISA_AVR25, bfd_mach_avr2}, + {"avr25", AVR_ISA_AVR25, bfd_mach_avr25}, +/* TODO: insruction set for avr3 architecture should be AVR_ISA_AVR3, + but set to AVR_ISA_AVR3_ALL for some following version + of GCC (from 4.3) for backward compatibility. */ + {"avr3", AVR_ISA_AVR3_ALL, bfd_mach_avr3}, + {"avr31", AVR_ISA_AVR31, bfd_mach_avr31}, + {"avr35", AVR_ISA_AVR35, bfd_mach_avr35}, + {"avr4", AVR_ISA_AVR4, bfd_mach_avr4}, +/* TODO: insruction set for avr5 architecture should be AVR_ISA_AVR5, + but set to AVR_ISA_AVR51 for some following version + of GCC (from 4.3) for backward compatibility. */ + {"avr5", AVR_ISA_AVR51, bfd_mach_avr5}, + {"avr51", AVR_ISA_AVR51, bfd_mach_avr51}, + {"avr6", AVR_ISA_AVR6, bfd_mach_avr6}, {"at90s1200", AVR_ISA_1200, bfd_mach_avr1}, - {"attiny11", AVR_ISA_TINY1, bfd_mach_avr1}, - {"attiny12", AVR_ISA_TINY1, bfd_mach_avr1}, - {"attiny15", AVR_ISA_TINY1, bfd_mach_avr1}, - {"attiny28", AVR_ISA_TINY1, bfd_mach_avr1}, - {"at90s2313", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s2323", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s2333", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 4433 */ - {"at90s2343", AVR_ISA_2xxx, bfd_mach_avr2}, - {"attiny22", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 2343 */ + {"attiny11", AVR_ISA_AVR1, bfd_mach_avr1}, + {"attiny12", AVR_ISA_AVR1, bfd_mach_avr1}, + {"attiny15", AVR_ISA_AVR1, bfd_mach_avr1}, + {"attiny28", AVR_ISA_AVR1, bfd_mach_avr1}, + {"at90s2313", AVR_ISA_AVR2, bfd_mach_avr2}, + {"at90s2323", AVR_ISA_AVR2, bfd_mach_avr2}, + {"at90s2333", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 4433 */ + {"at90s2343", AVR_ISA_AVR2, bfd_mach_avr2}, + {"attiny22", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 2343 */ {"attiny26", AVR_ISA_2xxe, bfd_mach_avr2}, - {"at90s4433", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s4414", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 8515 */ - {"at90s4434", AVR_ISA_2xxx, bfd_mach_avr2}, /* XXX -> 8535 */ - {"at90s8515", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90s8535", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at90c8534", AVR_ISA_2xxx, bfd_mach_avr2}, - {"at86rf401", AVR_ISA_RF401, bfd_mach_avr2}, - {"attiny13", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny13a", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny2313", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny261", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny461", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny861", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny24", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny44", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny84", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny25", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny45", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny85", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny43u", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny48", AVR_ISA_TINY2, bfd_mach_avr2}, - {"attiny88", AVR_ISA_TINY2, bfd_mach_avr2}, - {"atmega103", AVR_ISA_M103, bfd_mach_avr3}, - {"at43usb320", AVR_ISA_M103, bfd_mach_avr3}, - {"at43usb355", AVR_ISA_M603, bfd_mach_avr3}, - {"at76c711", AVR_ISA_M603, bfd_mach_avr3}, - {"at90usb82", AVR_ISA_USB162, bfd_mach_avr3}, - {"at90usb162", AVR_ISA_USB162, bfd_mach_avr3}, - {"attiny167", AVR_ISA_TINY3, bfd_mach_avr3}, - {"atmega48", AVR_ISA_PWMx, bfd_mach_avr4}, - {"atmega48p", AVR_ISA_PWMx, bfd_mach_avr4}, + {"at90s4414", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 8515 */ + {"at90s4433", AVR_ISA_AVR2, bfd_mach_avr2}, + {"at90s4434", AVR_ISA_AVR2, bfd_mach_avr2}, /* XXX -> 8535 */ + {"at90s8515", AVR_ISA_AVR2, bfd_mach_avr2}, + {"at90c8534", AVR_ISA_AVR2, bfd_mach_avr2}, + {"at90s8535", AVR_ISA_AVR2, bfd_mach_avr2}, + {"attiny13", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny13a", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny2313", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny24", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny44", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny84", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny25", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny45", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny85", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny261", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny461", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny861", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny43u", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny48", AVR_ISA_AVR25, bfd_mach_avr25}, + {"attiny88", AVR_ISA_AVR25, bfd_mach_avr25}, + {"at86rf401", AVR_ISA_RF401, bfd_mach_avr25}, + {"at43usb355", AVR_ISA_AVR3, bfd_mach_avr3}, + {"at76c711", AVR_ISA_AVR3, bfd_mach_avr3}, + {"atmega103", AVR_ISA_AVR31, bfd_mach_avr31}, + {"at43usb320", AVR_ISA_AVR31, bfd_mach_avr31}, + {"attiny167", AVR_ISA_AVR35, bfd_mach_avr35}, + {"at90usb82", AVR_ISA_AVR35, bfd_mach_avr35}, + {"at90usb162", AVR_ISA_AVR35, bfd_mach_avr35}, {"atmega8", AVR_ISA_M8, bfd_mach_avr4}, - {"atmega88", AVR_ISA_PWMx, bfd_mach_avr4}, - {"atmega88p", AVR_ISA_PWMx, bfd_mach_avr4}, + {"atmega48", AVR_ISA_AVR4, bfd_mach_avr4}, + {"atmega48p", AVR_ISA_AVR4, bfd_mach_avr4}, + {"atmega88", AVR_ISA_AVR4, bfd_mach_avr4}, + {"atmega88p", AVR_ISA_AVR4, bfd_mach_avr4}, {"atmega8515", AVR_ISA_M8, bfd_mach_avr4}, {"atmega8535", AVR_ISA_M8, bfd_mach_avr4}, - {"atmega8hva", AVR_ISA_PWMx, bfd_mach_avr4}, - {"at90pwm1", AVR_ISA_PWMx, bfd_mach_avr4}, - {"at90pwm2", AVR_ISA_PWMx, bfd_mach_avr4}, - {"at90pwm2b", AVR_ISA_PWMx, bfd_mach_avr4}, - {"at90pwm3", AVR_ISA_PWMx, bfd_mach_avr4}, - {"at90pwm3b", AVR_ISA_PWMx, bfd_mach_avr4}, - {"atmega16", AVR_ISA_M323, bfd_mach_avr5}, + {"atmega8hva", AVR_ISA_AVR4, bfd_mach_avr4}, + {"at90pwm1", AVR_ISA_AVR4, bfd_mach_avr4}, + {"at90pwm2", AVR_ISA_AVR4, bfd_mach_avr4}, + {"at90pwm2b", AVR_ISA_AVR4, bfd_mach_avr4}, + {"at90pwm3", AVR_ISA_AVR4, bfd_mach_avr4}, + {"at90pwm3b", AVR_ISA_AVR4, bfd_mach_avr4}, + {"atmega16", AVR_ISA_AVR5, bfd_mach_avr5}, {"atmega161", AVR_ISA_M161, bfd_mach_avr5}, - {"atmega162", AVR_ISA_M323, bfd_mach_avr5}, + {"atmega162", AVR_ISA_AVR5, bfd_mach_avr5}, {"atmega163", AVR_ISA_M161, bfd_mach_avr5}, - {"atmega164p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega165", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega165p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega168", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega168p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega169", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega169p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega32", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega323", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega324p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega325", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega325p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega328p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega329", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega329p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega3250", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega3250p",AVR_ISA_M323, bfd_mach_avr5}, - {"atmega3290", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega3290p",AVR_ISA_M323, bfd_mach_avr5}, - {"atmega406", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega64", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega640", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega644", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega644p", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega128", AVR_ISA_M128, bfd_mach_avr5}, - {"atmega1280", AVR_ISA_M128, bfd_mach_avr5}, - {"atmega1281", AVR_ISA_M128, bfd_mach_avr5}, - {"atmega1284p",AVR_ISA_M128, bfd_mach_avr5}, - {"atmega645", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega649", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega6450", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega6490", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega16hva",AVR_ISA_M323, bfd_mach_avr5}, - {"at90can32" , AVR_ISA_M323, bfd_mach_avr5}, - {"at90can64" , AVR_ISA_M323, bfd_mach_avr5}, - {"at90can128", AVR_ISA_M128, bfd_mach_avr5}, - {"at90pwm216", AVR_ISA_M323, bfd_mach_avr5}, - {"at90pwm316", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega32c1", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega32m1", AVR_ISA_M323, bfd_mach_avr5}, - {"atmega32u4", AVR_ISA_M323, bfd_mach_avr5}, - {"at90usb646", AVR_ISA_M323, bfd_mach_avr5}, - {"at90usb647", AVR_ISA_M323, bfd_mach_avr5}, - {"at90usb1286",AVR_ISA_M128, bfd_mach_avr5}, - {"at90usb1287",AVR_ISA_M128, bfd_mach_avr5}, + {"atmega164p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega165", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega165p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega168", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega168p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega169", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega169p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega32", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega323", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega324p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega325", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega325p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega3250", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega3250p",AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega328p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega329", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega329p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega3290", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega3290p",AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega406", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega64", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega640", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega644", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega644p", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega645", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega649", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega6450", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega6490", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega16hva",AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90can32" , AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90can64" , AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90pwm216", AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90pwm316", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega32c1", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega32m1", AVR_ISA_AVR5, bfd_mach_avr5}, + {"atmega32u4", AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90usb646", AVR_ISA_AVR5, bfd_mach_avr5}, + {"at90usb647", AVR_ISA_AVR5, bfd_mach_avr5}, {"at94k", AVR_ISA_94K, bfd_mach_avr5}, - {"atmega2560", AVR_ISA_ALL, bfd_mach_avr6}, - {"atmega2561", AVR_ISA_ALL, bfd_mach_avr6}, + {"atmega128", AVR_ISA_AVR51, bfd_mach_avr51}, + {"atmega1280", AVR_ISA_AVR51, bfd_mach_avr51}, + {"atmega1281", AVR_ISA_AVR51, bfd_mach_avr51}, + {"atmega1284p",AVR_ISA_AVR51, bfd_mach_avr51}, + {"at90can128", AVR_ISA_AVR51, bfd_mach_avr51}, + {"at90usb1286",AVR_ISA_AVR51, bfd_mach_avr51}, + {"at90usb1287",AVR_ISA_AVR51, bfd_mach_avr51}, + {"atmega2560", AVR_ISA_AVR6, bfd_mach_avr6}, + {"atmega2561", AVR_ISA_AVR6, bfd_mach_avr6}, {NULL, 0, 0} }; /* Current MCU type. */ -static struct mcu_type_s default_mcu = {"avr2", AVR_ISA_2xxx,bfd_mach_avr2}; +static struct mcu_type_s default_mcu = {"avr2", AVR_ISA_AVR2, bfd_mach_avr2}; static struct mcu_type_s * avr_mcu = & default_mcu; /* AVR target-specific switches. */ @@ -337,11 +349,18 @@ md_show_usage (FILE *stream) _("AVR options:\n" " -mmcu=[avr-name] select microcontroller variant\n" " [avr-name] can be:\n" - " avr1 - AT90S1200, ATtiny1x, ATtiny28\n" - " avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n" - " avr3 - ATmega103\n" - " avr4 - ATmega8, ATmega88\n" - " avr5 - ATmega161, ATmega163, ATmega32, AT94K\n" + " avr1 - classic AVR core without data RAM\n" + " avr2 - classic AVR core with up to 8K program memory\n" + " avr25 - classic AVR core with up to 8K program memory\n" + " plus the MOVW instruction\n" + " avr3 - classic AVR core with up to 64K program memory\n" + " avr31 - classic AVR core with up to 128K program memory\n" + " avr35 - classic AVR core with up to 64K program memory\n" + " plus the MOVW instruction\n" + " avr4 - enhanced AVR core with up to 8K program memory\n" + " avr5 - enhanced AVR core with up to 64K program memory\n" + " avr51 - enhanced AVR core with up to 128K program memory\n" + " avr6 - enhanced AVR core with up to 256K program memory\n" " or immediate microcontroller name.\n")); fprintf (stream, _(" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n" diff --git a/gas/doc/c-avr.texi b/gas/doc/c-avr.texi index b46ac21..63c4989 100644 --- a/gas/doc/c-avr.texi +++ b/gas/doc/c-avr.texi @@ -37,15 +37,23 @@ compiler, only for assembler programs (MCU types: at90s1200, attiny11, attiny12, attiny15, attiny28). Instruction set avr2 (default) is for the classic AVR core with up to -8K program memory space (MCU types: at90s2313, at90s2323, attiny22, -attiny26, at90s2333, at90s2343, at90s4414, at90s4433, at90s4434, -at90s8515, at90c8534, at90s8535, at86rf401, attiny13, attiny13a, attiny2313, -attiny261, attiny461, attiny861, attiny24, attiny44, attiny84, attiny25, -attiny45, attiny85, attiny43u, attiny48, attiny88). +8K program memory space (MCU types: at90s2313, at90s2323, at90s2333, at90s2343, +attiny22, attiny26, at90s4414, at90s4433, at90s4434, at90s8515, at90c8534, +at90s8535). + +Instruction set avr25 is for the classic AVR core with up to 8K program memory +space plus the MOVW instruction (MCU types: attiny13, attiny13a, attiny2313, +attiny24, attiny44, attiny84, attiny25, attiny45, attiny85, attiny261, +attiny461, attiny861, attiny43u, attiny48, attiny88, at86rf401). Instruction set avr3 is for the classic AVR core with up to 128K program -memory space (MCU types: atmega103, at43usb320, at43usb355, at76c711, -at90usb82, at90usb162, attiny167). +memory space (MCU types: at43usb355, at76c711). + +Instruction set avr31 is for the classic AVR core with exactly 128K program +memory space (MCU types: atmega103, at43usb320). + +Instruction set avr35 is for classic AVR core plus MOVW, CALL, and JMP +instructions (MCU types: attiny167, at90usb82, at90usb162). Instruction set avr4 is for the enhanced AVR core with up to 8K program memory space (MCU types: atmega48, atmega48p,atmega8, atmega88, atmega88p, @@ -53,18 +61,20 @@ atmega8515, atmega8535, atmega8hva, at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b). Instruction set avr5 is for the enhanced AVR core with up to 128K program -memory space (MCU types: atmega16, atmega161, atmega162, atmega163, -atmega164p, atmega165, atmega165p, atmega168, atmega168p, atmega169, -atmega169p, atmega32, atmega323, atmega324p, atmega325, atmega325p, -atmega328p, atmega329, atmega329p, atmega3250, atmega3250p, atmega3290, -atmega3290p, atmega406, atmega64, atmega640, atmega644, -atmega644p, atmega128, atmega1280, atmega1281, atmega1284p, atmega645, -atmega649, atmega6450, atmega6490, atmega16hva, at90can32, at90can64, -at90can128, at90pwm216, at90pwm316, atmega32c1, atmega32m1, atmega32u4, -at90usb646, at90usb647, at90usb1286, at90usb1287, at94k). - -Instruction set avr6 is for the enhanced AVR core with 256K program -memory space (MCU types: atmega2560, atmega2561). +memory space (MCU types: atmega16, atmega161, atmega162, atmega163, atmega164p, +atmega165, atmega165p, atmega168, atmega168p, atmega169, atmega169p, atmega32, +atmega323, atmega324p, atmega325, atmega325p, atmega3250, atmega3250p, +atmega328p, atmega329, atmega329p, atmega3290, atmega3290p, atmega406, atmega64, +atmega640, atmega644, atmega644p, atmega645, atmega6450, atmega649, atmega6490, +atmega16hva, at90can32, at90can64, at90pwm216, at90pwm316, atmega32c1, +atmega32m1, atmega32u4, at90usb646, at90usb647, at94k). + +Instruction set avr51 is for the enhanced AVR core with exactly 128K program +memory space (MCU types: atmega128, atmega1280, atmega1281, atmega1284p, +at90can128, at90usb1286, at90usb1287). + +Instruction set avr6 is for the enhanced AVR core with a 3-byte PC (MCU types: +atmega2560, atmega2561). @cindex @code{-mall-opcodes} command line option, AVR @item -mall-opcodes diff --git a/include/ChangeLog b/include/ChangeLog index bf5901f..a1e31a6 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,14 @@ +2008-08-08 Anatoly Sokolov <aesok@post.ru> + + * elf/avr.h (E_AVR_MACH_AVR25, E_AVR_MACH_AVR31, + E_AVR_MACH_AVR35, E_AVR_MACH_AVR51): Define. + (EF_AVR_MACH): Redefine to 0x7F. + * opcode/avr.h (AVR_ISA_TINY3, AVR_ISA_ALL, AVR_ISA_USB162): Remove. + (AVR_ISA_AVR3): Redefine. + (AVR_ISA_AVR1, AVR_ISA_AVR2, AVR_ISA_AVR31, AVR_ISA_AVR35, + AVR_ISA_AVR3_ALL, AVR_ISA_AVR4, AVR_ISA_AVR5, AVR_ISA_AVR51, + AVR_ISA_AVR6): Define. + 2008-07-12 Jie Zhang <jie.zhang@analog.com> Revert diff --git a/include/elf/avr.h b/include/elf/avr.h index d2ffbe0..627dc35 100644 --- a/include/elf/avr.h +++ b/include/elf/avr.h @@ -24,7 +24,7 @@ #include "elf/reloc-macros.h" /* Processor specific flags for the ELF header e_flags field. */ -#define EF_AVR_MACH 0xf +#define EF_AVR_MACH 0x7F /* If bit #7 is set, it is assumed that the elf file uses local symbols as reference for the relocations so that linker relaxation is possible. */ @@ -32,9 +32,13 @@ #define E_AVR_MACH_AVR1 1 #define E_AVR_MACH_AVR2 2 +#define E_AVR_MACH_AVR25 25 #define E_AVR_MACH_AVR3 3 +#define E_AVR_MACH_AVR31 31 +#define E_AVR_MACH_AVR35 35 #define E_AVR_MACH_AVR4 4 #define E_AVR_MACH_AVR5 5 +#define E_AVR_MACH_AVR51 51 #define E_AVR_MACH_AVR6 6 /* Relocations. */ diff --git a/include/opcode/avr.h b/include/opcode/avr.h index 0093a72..15a034a 100644 --- a/include/opcode/avr.h +++ b/include/opcode/avr.h @@ -32,29 +32,39 @@ #define AVR_ISA_MOVW 0x1000 /* device has MOVW */ #define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM) -#define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK) #define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM) /* For the attiny26 which is missing LPM Rd,Z+. */ #define AVR_ISA_2xxe (AVR_ISA_2xxx | AVR_ISA_LPMX) #define AVR_ISA_RF401 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX) #define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \ AVR_ISA_SPM | AVR_ISA_BRK) -#define AVR_ISA_TINY3 (AVR_ISA_TINY2 | AVR_ISA_MEGA) -#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \ - AVR_ISA_LPMX | AVR_ISA_SPM) #define AVR_ISA_M603 (AVR_ISA_2xxx | AVR_ISA_MEGA) #define AVR_ISA_M103 (AVR_ISA_M603 | AVR_ISA_ELPM) -#define AVR_ISA_USB162 (AVR_ISA_M603 | AVR_ISA_MOVW | \ +#define AVR_ISA_M8 (AVR_ISA_2xxx | AVR_ISA_MUL | AVR_ISA_MOVW | \ AVR_ISA_LPMX | AVR_ISA_SPM) -#define AVR_ISA_AVR3 (AVR_ISA_M603 | AVR_ISA_MOVW | \ - AVR_ISA_LPMX | AVR_ISA_SPM | AVR_ISA_ELPM) +#define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK) #define AVR_ISA_M161 (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | \ AVR_ISA_LPMX | AVR_ISA_SPM) #define AVR_ISA_94K (AVR_ISA_M603 | AVR_ISA_MUL | AVR_ISA_MOVW | AVR_ISA_LPMX) #define AVR_ISA_M323 (AVR_ISA_M161 | AVR_ISA_BRK) #define AVR_ISA_M128 (AVR_ISA_M323 | AVR_ISA_ELPM | AVR_ISA_ELPMX) -#define AVR_ISA_ALL 0xFFFF +#define AVR_ISA_AVR1 AVR_ISA_TINY1 +#define AVR_ISA_AVR2 AVR_ISA_2xxx +#define AVR_ISA_AVR25 AVR_ISA_TINY2 +#define AVR_ISA_AVR3 AVR_ISA_M603 +#define AVR_ISA_AVR31 AVR_ISA_M103 +#define AVR_ISA_AVR35 (AVR_ISA_AVR3 | AVR_ISA_MOVW | \ + AVR_ISA_LPMX | AVR_ISA_SPM | AVR_ISA_BRK) +#define AVR_ISA_AVR3_ALL (AVR_ISA_AVR3 | AVR_ISA_AVR31 | AVR_ISA_AVR35) +#define AVR_ISA_AVR4 AVR_ISA_PWMx +#define AVR_ISA_AVR5 AVR_ISA_M323 +#define AVR_ISA_AVR51 AVR_ISA_M128 +#define AVR_ISA_AVR6 (AVR_ISA_1200 | AVR_ISA_LPM | AVR_ISA_LPMX | \ + AVR_ISA_SRAM | AVR_ISA_MEGA | AVR_ISA_MUL | \ + AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \ + AVR_ISA_SPM | AVR_ISA_BRK | AVR_ISA_EIND | \ + AVR_ISA_MOVW) #define REGISTER_P(x) ((x) == 'r' \ || (x) == 'd' \ diff --git a/ld/ChangeLog b/ld/ChangeLog index 41f43fb..94979e8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2008-08-08 Anatoly Sokolov <aesok@post.ru> + + * Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o, + and eavr51.o. + Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c. + * Makefile.in: Regenerate. + * configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35 + and avr51. + * emulparams/avr25.sh: New file. + * emulparams/avr31.sh: New file. + * emulparams/avr35.sh: New file. + * emulparams/avr51.sh: New file. + 2008-08-08 Richard Sandiford <rdsandiford@googlemail.com> Daniel Jacobowitz <dan@codesourcery.com> diff --git a/ld/Makefile.am b/ld/Makefile.am index 2e40b6f..98000ad 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -134,9 +134,13 @@ ALL_EMULATIONS = \ earmsymbian.o \ eavr2.o \ eavr1.o \ + eavr25.o \ eavr3.o \ + eavr31.o \ + eavr35.o \ eavr4.o \ eavr5.o \ + eavr51.o \ eavr6.o \ ecoff_i860.o \ ecoff_sparc.o \ @@ -606,10 +610,22 @@ eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr1 "$(tdir_avr2)" +eavr25.c: $(srcdir)/emulparams/avr25.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr25 "$(tdir_avr2)" eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr3 "$(tdir_avr2)" +eavr31.c: $(srcdir)/emulparams/avr31.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr31 "$(tdir_avr2)" +eavr35.c: $(srcdir)/emulparams/avr35.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr35 "$(tdir_avr2)" eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} @@ -618,6 +634,10 @@ eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr5 "$(tdir_avr2)" +eavr51.c: $(srcdir)/emulparams/avr51.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr51 "$(tdir_avr2)" eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 2dc1fa2..eb41a51 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -384,9 +384,13 @@ ALL_EMULATIONS = \ earmsymbian.o \ eavr2.o \ eavr1.o \ + eavr25.o \ eavr3.o \ + eavr31.o \ + eavr35.o \ eavr4.o \ eavr5.o \ + eavr51.o \ eavr6.o \ ecoff_i860.o \ ecoff_sparc.o \ @@ -738,15 +742,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \ - cd $(srcdir) && $(AUTOMAKE) --cygnus \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --cygnus Makefile + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -1435,10 +1439,22 @@ eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr1 "$(tdir_avr2)" +eavr25.c: $(srcdir)/emulparams/avr25.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr25 "$(tdir_avr2)" eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr3 "$(tdir_avr2)" +eavr31.c: $(srcdir)/emulparams/avr31.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr31 "$(tdir_avr2)" +eavr35.c: $(srcdir)/emulparams/avr35.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr35 "$(tdir_avr2)" eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} @@ -1447,6 +1463,10 @@ eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} ${GENSCRIPTS} avr5 "$(tdir_avr2)" +eavr51.c: $(srcdir)/emulparams/avr51.sh $(srcdir)/emultempl/avrelf.em \ + $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ + ${GEN_DEPENDS} + ${GENSCRIPTS} avr51 "$(tdir_avr2)" eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \ ${GEN_DEPENDS} diff --git a/ld/configure.tgt b/ld/configure.tgt index d114f2d..3f7e79b 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -107,7 +107,7 @@ xscale-*-coff) targ_emul=armcoff ;; xscale-*-elf) targ_emul=armelf ;; avr-*-*) targ_emul=avr2 - targ_extra_emuls="avr1 avr3 avr4 avr5 avr6" + targ_extra_emuls="avr1 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6" ;; bfin-*-elf) targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" diff --git a/ld/emulparams/avr25.sh b/ld/emulparams/avr25.sh new file mode 100644 index 0000000..12a0023 --- /dev/null +++ b/ld/emulparams/avr25.sh @@ -0,0 +1,11 @@ +ARCH=avr:25 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=8K +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/ld/emulparams/avr31.sh b/ld/emulparams/avr31.sh new file mode 100644 index 0000000..e548181 --- /dev/null +++ b/ld/emulparams/avr31.sh @@ -0,0 +1,11 @@ +ARCH=avr:31 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/ld/emulparams/avr35.sh b/ld/emulparams/avr35.sh new file mode 100644 index 0000000..6186186 --- /dev/null +++ b/ld/emulparams/avr35.sh @@ -0,0 +1,11 @@ +ARCH=avr:35 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=64K +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf diff --git a/ld/emulparams/avr51.sh b/ld/emulparams/avr51.sh new file mode 100644 index 0000000..be8e8f5 --- /dev/null +++ b/ld/emulparams/avr51.sh @@ -0,0 +1,11 @@ +ARCH=avr:51 +MACHINE= +SCRIPT_NAME=avr +OUTPUT_FORMAT="elf32-avr" +MAXPAGESIZE=1 +EMBEDDED=yes +TEMPLATE_NAME=elf32 + +TEXT_LENGTH=128K +DATA_LENGTH=0xffa0 +EXTRA_EM_FILE=avrelf |