]> git.pld-linux.org Git - packages/crossavr-gcc.git/blobdiff - 432-gcc-ata5831.patch
- synchronized patches with official AVR toolchain 3.4.1.830
[packages/crossavr-gcc.git] / 432-gcc-ata5831.patch
diff --git a/432-gcc-ata5831.patch b/432-gcc-ata5831.patch
new file mode 100644 (file)
index 0000000..fadd66b
--- /dev/null
@@ -0,0 +1,54 @@
+diff -Naurp gcc/config/avr/avr-devices.c gcc/config/avr/avr-devices.c
+--- gcc/config/avr/avr-devices.c       2012-04-20 18:52:19.000000000 +0530
++++ gcc/config/avr/avr-devices.c       2012-04-20 18:52:59.000000000 +0530
+@@ -37,6 +37,7 @@ const struct base_arch_s avr_arch_types[
+   { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0x0060, "__AVR_ARCH__=5",   "avr5" },
+   { 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0x0060, "__AVR_ARCH__=51",  "avr51" },
+   { 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0x0060, "__AVR_ARCH__=6",   "avr6" },
++  { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0x0200, "__AVR_ARCH__=7",   "avr7" }, 
+   { 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0x2000, "__AVR_ARCH__=101", "avrxmega1" },
+   { 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0x2000, "__AVR_ARCH__=102", "avrxmega2" },
+   { 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0x2000, "__AVR_ARCH__=103", "avrxmega3" },
+@@ -270,6 +271,9 @@ const struct mcu_type_s avr_mcu_types[] 
+   { "atmega2561",           ARCH_AVR6, "__AVR_ATmega2561__",        0, 0x0200, "m2561" },
+   { "atmega256rfa2",        ARCH_AVR6, "__AVR_ATmega256RFA2__",     0, 0x0200, "m256rfa2" },
+   { "atmega256rfr2",        ARCH_AVR6, "__AVR_ATmega256RFR2__",     0, 0x0200, "m256rfr2" },
++    /* Enhanced, == 20K starts at 0x8000 */
++  { "avr7",                 ARCH_AVR7, NULL,                        0, 0x0200, "a5831" },
++  { "ata5831",              ARCH_AVR7, "__AVR_ATA5831__",           0, 0x0200, "a5831" },
+     /* Enhanced, == 256K.  */
+     /* Xmega, <= 8K FLASH.  */
+     /* Xmega, > 8K, <= 64K FLASH, <= 64K RAM.  */
+diff -Naurp gcc/config/avr/avr.h gcc-4.6.2-src/gcc/config/avr/avr.h
+--- gcc/config/avr/avr.h       2012-04-20 18:52:19.000000000 +0530
++++ gcc/config/avr/avr.h       2012-04-20 18:52:59.000000000 +0530
+@@ -79,6 +79,7 @@ enum avr_arch
+   ARCH_AVR5,
+   ARCH_AVR51,
+   ARCH_AVR6,
++  ARCH_AVR7,
+   ARCH_AVRXMEGA1,
+   ARCH_AVRXMEGA2,
+   ARCH_AVRXMEGA3,
+diff -Naurp gcc-4.6.2-base/gcc/config/avr/t-avr gcc-4.6.2-src/gcc/config/avr/t-avr
+--- gcc/config/avr/t-avr       2012-04-20 18:52:19.000000000 +0530
++++ gcc/config/avr/t-avr       2012-04-20 18:52:59.000000000 +0530
+@@ -107,8 +107,8 @@ fp-bit.c: $(srcdir)/config/fp-bit.c $(sr
+ FPBIT = fp-bit.c
+-MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6/mmcu=avrxmega2/mmcu=avrxmega4/mmcu=avrxmega5/mmcu=avrxmega6/mmcu=avrxmega7/mmcu=avrtiny10
+-MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny10
++MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6/mmcu=avr7/mmcu=avrxmega2/mmcu=avrxmega4/mmcu=avrxmega5/mmcu=avrxmega6/mmcu=avrxmega7/mmcu=avrtiny10
++MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avr7 avrxmega2 avrxmega4 avrxmega5 avrxmega6 avrxmega7 avrtiny10
+ # The many avr2 matches are not listed here - this is the default.
+ MULTILIB_MATCHES = \
+@@ -288,6 +288,7 @@ MULTILIB_MATCHES = \
+       mmcu?avr6=mmcu?atmega256rfr2 \
+       mmcu?avr6=mmcu?atmega2560 \
+       mmcu?avr6=mmcu?atmega2561 \
++      mmcu?avr7=mmcu?ata5831 \
+       mmcu?avrxmega2=mmcu?atmxt112sl \
+       mmcu?avrxmega2=mmcu?atmxt224 \
+       mmcu?avrxmega2=mmcu?atmxt224e \
This page took 0.053553 seconds and 4 git commands to generate.