I forgot to CC to the list, so resent...
Tobi
Here are the patches:
zat90pwm16.patch is the binutils patch. (Note, it applies to the debian
version, which already has applied the newdevices patch. If needed,
I can also provide a patch against "stock" binutils, without any patch
applied).
patch-10-at90pwm316.diff is the patch for the avr-gcc. It also applies
to the debian avr-gcc sources, (gcc version is currently 4.1.2).
Tobi
On Fri, 2007-08-24 at 16:00 -0600, Eric Weddington wrote:
>
> > -----Original Message-----
> > From: Tobias Frost [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 24, 2007 3:47 PM
> > To: Tobias Frost; Eric Weddington; [email protected]
> > Subject: [task #7238] Add support for AT90PWM216-316.
> >
> >
> > Follow-up Comment #1, task #7238 (project avr-libc):
> >
> > As already promised, here is the patch for the support of the
> > at90pwmx16.
> >
> > I tried to make it as complete as possible (incl. documentation),
> >
> > Base for the patch are the debian sources, version 1.4.6
> >
> > After applying the patch I needed a run of automake and
> > autoconf, but then it
> > worked.
> >
> > The patches for the binutils and avr-gcc are not included, I
> > still have to
> > figure out where to file them...
>
> File those patches here at avr-libc with the rest. We'll test them and make
> sure they get passed upstream.
>
> Thanks!
> Eric Weddington
>
>
--- binutils-2.17/gas/config/tc-avr.c 2007-08-21 16:24:10.000000000 +0200
+++ binutils-2.17_orig/gas/config/tc-avr.c 2007-08-21 16:20:54.000000000 +0200
@@ -114,6 +114,8 @@
{"at90pwm1", AVR_ISA_PWMx, bfd_mach_avr4},
{"at90pwm2", AVR_ISA_PWMx, bfd_mach_avr4},
{"at90pwm3", AVR_ISA_PWMx, bfd_mach_avr4},
+ {"at90pwm216", AVR_ISA_PWMx16, bfd_mach_avr5},
+ {"at90pwm316", AVR_ISA_PWMx16, bfd_mach_avr5},
{"atmega16", AVR_ISA_M323, bfd_mach_avr5},
{"atmega161", AVR_ISA_M161, bfd_mach_avr5},
{"atmega162", AVR_ISA_M323, bfd_mach_avr5},
--- binutils-2.17/include/opcode/avr.h 2007-08-22 10:46:30.000000000 +0200
+++ binutils-2.17/include/opcode/avr.h_ 2007-08-22 10:47:32.000000000 +0200
@@ -33,6 +33,7 @@
#define AVR_ISA_TINY1 (AVR_ISA_1200 | AVR_ISA_LPM)
#define AVR_ISA_PWMx (AVR_ISA_M8 | AVR_ISA_BRK)
+#define AVR_ISA_PWMx16 (AVR_ISA_PWMx | AVR_ISA_MEGA )
#define AVR_ISA_2xxx (AVR_ISA_TINY1 | AVR_ISA_SRAM)
#define AVR_ISA_TINY2 (AVR_ISA_2xxx | AVR_ISA_MOVW | AVR_ISA_LPMX | \
AVR_ISA_SPM | AVR_ISA_BRK)
diff -Naur src/gcc/config/avr/avr.c src_/gcc/config/avr/avr.c
--- src/gcc/config/avr/avr.c 2007-07-09 16:06:10.000000000 +0200
+++ src_/gcc/config/avr/avr.c 2007-08-21 18:36:48.000000000 +0200
@@ -269,6 +269,8 @@
{ "at90usb647", ARCH_AVR5, "__AVR_AT90USB647__" },
{ "at90usb1286", ARCH_AVR5, "__AVR_AT90USB1286__" },
{ "at90usb1287", ARCH_AVR5, "__AVR_AT90USB1287__" },
+ { "at90pwm216", ARCH_AVR5, "__AVR_AT90PWM216__" },
+ { "at90pwm316", ARCH_AVR5, "__AVR_AT90PWM316__" },
{ "at94k", ARCH_AVR5, "__AVR_AT94K__" },
/* Assembler only. */
{ "avr1", ARCH_AVR1, NULL },
diff -Naur src/gcc/config/avr/avr.h src_/gcc/config/avr/avr.h
--- src/gcc/config/avr/avr.h 2007-07-06 20:27:18.000000000 +0200
+++ src_/gcc/config/avr/avr.h 2007-08-21 18:34:40.000000000 +0200
@@ -762,7 +762,9 @@
mmcu=at76*:-m avr3}\
%{mmcu=atmega8*|\
mmcu=atmega48|\
- mmcu=at90pwm*:-m avr4}\
+ mmcu=at90pwm1|\
+ mmcu=at90pwm2|\
+ mmcu=at90pwm3:-m avr4}\
%{mmcu=atmega16*|\
mmcu=atmega32*|\
mmcu=atmega406|\
@@ -770,6 +772,8 @@
mmcu=atmega128*|\
mmcu=at90can*|\
mmcu=at90usb*|\
+ mmcu=at90pwm216|\
+ mmcu=at90pwm316|\
mmcu=at94k:-m avr5}\
%{mmcu=atmega324*|\
mmcu=atmega325*|\
@@ -896,6 +900,8 @@
%{mmcu=at90usb647:crtusb647.o%s} \
%{mmcu=at90usb1286:crtusb1286.o%s} \
%{mmcu=at90usb1287:crtusb1287.o%s} \
+%{mmcu=at90pwm216:crt90pwm216.o%s} \
+%{mmcu=at90pwm316:crt90pwm316.o%s} \
%{mmcu=at94k:crtat94k.o%s}"
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
--- src/gcc/config/avr/t-avr_orig 2007-08-22 11:34:56.000000000 +0200
+++ src/gcc/config/avr/t-avr 2007-08-22 11:36:05.000000000 +0200
@@ -111,7 +111,9 @@
mmcu?avr5=mmcu?at90usb647 \
mmcu?avr5=mmcu?at90usb1286 \
mmcu?avr5=mmcu?at90usb1287 \
- mmcu?avr5=mmcu?at94k
+ mmcu?avr5=mmcu?at94k \
+ mmcu?avr5=mmcu?at90pwm216 \
+ mmcu?avr5=mmcu?at90pwm316
MULTILIB_EXCEPTIONS =
_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev