Hi,

this patch adds avrxmega3 support and the 2 multilib versions
associated with it.

avr-gcc doesn't yet have respective support, but the Makefiles
scale accordingly.  As is is easier to get something into avr-gcc,
and because the libc and gcc must agree on the support, I am
starting with the "hard" part.


Johann


        Add multilib support for avrxmega3 + avrxmega3/short-calls.

        * configure.ac (CHECK_AVR_DEVICE): Add one for avrxmega3.
        (AM_CONDITIONAL): Add one for HAS_avrxmega3.
        (AC_CONFIG_FILES): Add avr/lib/avrxmega3/Makefile,
        avr/lib/avrxmega3/short-calls/Makefile.

        * devtools/gen-avr-lib-tree.sh (CFLAGS_SHORT_CALLS): New.
        (AVRXMEGA3_DEV_INFO): New.
        (AVRXMEGA3SC_DEV_INFO): New.
        (AVR_ARH_INFO): Add entries avrxmega3, avrxmega3/short-calls.

        * include/avr/pgmspace.h (__AVR_HAVE_RAMPD__): Fix comment.
Index: configure.ac
===================================================================
--- configure.ac	(revision 2537)
+++ configure.ac	(working copy)
@@ -1124,6 +1124,11 @@ CHECK_AVR_DEVICE(atxmega32e5)
 AM_CONDITIONAL(HAS_atxmega32e5, test "x$HAS_atxmega32e5" = "xyes")
 
 
+# avrxmega3
+CHECK_AVR_DEVICE(avrxmega3)
+AM_CONDITIONAL(HAS_avrxmega3, test "x$HAS_avrxmega3" = "xyes")
+
+
 # avrxmega4
 CHECK_AVR_DEVICE(avrxmega4)
 AM_CONDITIONAL(HAS_avrxmega4, test "x$HAS_avrxmega4" = "xyes")
@@ -1571,6 +1576,16 @@ AC_CONFIG_FILES([
 	avr/lib/avrxmega2/atxmega32e5/Makefile
 ])
 
+# avrxmega3
+AC_CONFIG_FILES([
+	avr/lib/avrxmega3/Makefile
+])
+
+# avrxmega3/short-calls
+AC_CONFIG_FILES([
+	avr/lib/avrxmega3/short-calls/Makefile
+])
+
 # avrxmega4
 AC_CONFIG_FILES([
 	avr/lib/avrxmega4/Makefile
Index: devtools/gen-avr-lib-tree.sh
===================================================================
--- devtools/gen-avr-lib-tree.sh	(revision 2537)
+++ devtools/gen-avr-lib-tree.sh	(working copy)
@@ -47,6 +47,7 @@ PATH=/usr/xpg4/bin:$PATH
 
 CFLAGS_SPACE="-mcall-prologues -Os"
 CFLAGS_TINY_STACK="-msp8 -mcall-prologues -Os"
+CFLAGS_SHORT_CALLS="-mshort-calls -mcall-prologues -Os"
 CFLAGS_BIG_MEMORY='-Os $(FNO_JUMP_TABLES)'
 CFLAGS_SPEED="-Os"
 
@@ -302,6 +303,12 @@ atxmega32d4:crtx32d4.o:${DEV_DEFS}:${CFL
 atxmega32e5:crtx32e5.o:${DEV_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS}\
 "
 
+AVRXMEGA3_DEV_INFO="\
+"
+
+AVRXMEGA3SC_DEV_INFO="\
+"
+
 AVRXMEGA4_DEV_INFO="\
 atxmega64a3:crtx64a3.o:${DEV_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 atxmega64a3u:crtx64a3u.o:${DEV_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
@@ -371,6 +378,8 @@ avr5::AVR5_DEV_INFO:${LIB_DEFS}:${CFLAGS
 avr51::AVR51_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avr6::AVR6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avrxmega2::AVRXMEGA2_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+avrxmega3::AVRXMEGA3_DEV_INFO:${LIB_DEFS}:${CFLAGS_SPACE}:${DEV_ASFLAGS};\
+avrxmega3:short-calls:AVRXMEGA3SC_DEV_INFO:${LIB_DEFS}:${CFLAGS_SHORT_CALLS}:${DEV_ASFLAGS};\
 avrxmega4::AVRXMEGA4_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avrxmega5::AVRXMEGA5_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
 avrxmega6::AVRXMEGA6_DEV_INFO:${LIB_DEFS}:${CFLAGS_BIG_MEMORY}:${DEV_ASFLAGS};\
Index: include/avr/pgmspace.h
===================================================================
--- include/avr/pgmspace.h	(revision 2537)
+++ include/avr/pgmspace.h	(working copy)
@@ -892,8 +892,8 @@ #ifndef __DOXYGEN__		/* These are intern
 }))
 
 /*
-Check for architectures that implement RAMPD (avrxmega3, avrxmega5,
-avrxmega7) as they need to save/restore RAMPZ for ELPM macros so it does
+Check for architectures that implement RAMPD (avrxmega5, avrxmega7)
+as they need to save/restore RAMPZ for ELPM macros so it does
 not interfere with data accesses.
 */
 #if defined (__AVR_HAVE_RAMPD__)
_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to