[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bugs #10329] crtm168.o is not being built
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] [bugs #10329] crtm168.o is not being built |
Date: |
Wed, 08 Sep 2004 17:17:12 -0600 |
User-agent: |
Mozilla Thunderbird 0.7.3 (Windows/20040803) |
Theodore A. Roth wrote:
On Wed, 8 Sep 2004, Eric Weddington wrote:
Summary: crtm168.o is not being built
Original Submission: Built gcc 3.4.2 with patch to add new devices.
In building avr-libc 1.0.4, crtm168.o is not built.
Did you patch WinAVR to add this support in 1.0.4? The 1.0 branch in CVS
doesn't have the new device support.
I'm building gcc 3.4.2 with the patch located here:
<http://savannah.nongnu.org/patch/?func=detailitem&item_id=2923>
And even more specifically, I've attached the GCC patch I'm using.
I'm using the avr-libc 1.0.4 tarball, with the attached avr-libc patch
(that I've now modified to remove the typo I belatedly uncovered).
I need more info to diagnose why it isn't being built. Send me the
output from the configure run.
Which config.* file is that again?
Below is the beginning of my make output (is this what you wanted?). It
shows that avr-gcc does not support any of the new devices.
This still could be a build problem on my part. My apologies if it turns
out to be this way.
-----------------------------------------------------
cd ../avr-libc-1.0.4 && aclocal-1.4
cd ../avr-libc-1.0.4 && automake-1.4 --foreign --include-deps Makefile
cd ../avr-libc-1.0.4 && autoconf
/bin/sh ./config.status --recheck
running /bin/sh ../avr-libc-1.0.4/configure
--prefix=C:/cygwin/usr/local --disable-doc --no-create --no-recursion
loading cache ./config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for avr-as... (cached) avr-as
checking for avr-ar... (cached) avr-ar
checking for avr-ranlib... (cached) avr-ranlib
checking for avr-gcc... (cached) avr-gcc
checking for a BSD compatible install... /usr/bin/install -c
checking for doxygen... yes
checking for pngtopnm... pngtopnm: not found
no
checking for pngtopnm... pnmtopng: not found
no
creating ./config.status
cd . \
&& CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
Adding multilib support to Makefile in ../avr-libc-1.0.4
multidirs=avr3 avr4 avr5
with_multisubdir=
Running configure in multilib subdirs avr3 avr4 avr5
Running configure in multilib subdir avr3
loading cache ../config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for avr-as... (cached) avr-as
checking for avr-ar... (cached) avr-ar
checking for avr-ranlib... (cached) avr-ranlib
checking for avr-gcc... (cached) avr-gcc -mmcu=avr3
checking for a BSD compatible install... /usr/bin/install -c
checking for doxygen... yes
checking for pngtopnm... pngtopnm: not found
no
checking for pngtopnm... pnmtopng: not found
no
creating ./config.status
creating Makefile
Adding multilib support to Makefile in ../../avr-libc-1.0.4
with_multisubdir=avr3
Running configure in multilib subdir avr4
loading cache ../config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for avr-as... (cached) avr-as
checking for avr-ar... (cached) avr-ar
checking for avr-ranlib... (cached) avr-ranlib
checking for avr-gcc... (cached) avr-gcc -mmcu=avr4
checking for a BSD compatible install... /usr/bin/install -c
checking for doxygen... yes
checking for pngtopnm... pngtopnm: not found
no
checking for pngtopnm... pnmtopng: not found
no
checking if avr-gcc has support for attiny13... no
checking if avr-gcc has support for attiny2313... no
checking if avr-gcc has support for atmega48... no
checking if avr-gcc has support for atmega88... no
creating ./config.status
creating Makefile
Adding multilib support to Makefile in ../../avr-libc-1.0.4
with_multisubdir=avr4
Running configure in multilib subdir avr5
loading cache ../config.cache
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal-1.4... found
checking for working autoconf... found
checking for working automake-1.4... found
checking for working autoheader... found
checking for working makeinfo... found
checking for avr-as... (cached) avr-as
checking for avr-ar... (cached) avr-ar
checking for avr-ranlib... (cached) avr-ranlib
checking for avr-gcc... (cached) avr-gcc -mmcu=avr5
checking for a BSD compatible install... /usr/bin/install -c
checking for doxygen... yes
checking for pngtopnm... pngtopnm: not found
no
checking for pngtopnm... pnmtopng: not found
no
checking if avr-gcc has support for atmega168... no
checking if avr-gcc has support for at90can128... no
creating ./config.status
creating Makefile
-------------------------------------------
2004-04-02 Theodore A. Roth <address@hidden>
* gcc/config/avr/avr.c (avr_mcu_types): Add entries for atmega48,
atmega88, atmega168, attiny13, attiny2313 and at90can128.
* gcc/config/avr/avr.h (LINK_SPEC): Ditto.
(LIB_SPEC): Ditto.
(LIBGCC_SPEC): Ditto.
(CRT_BINUTILS_SPECS): Ditto.
* gcc/config/avr/t-avr (MULTILIB_MATCHES): Ditto.
Index: gcc/config/avr/avr.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.118
diff -u -p -p -r1.118 avr.c
--- gcc/config/avr/avr.c 13 Mar 2004 06:43:30 -0000 1.118
+++ gcc/config/avr/avr.c 3 Apr 2004 00:08:14 -0000
@@ -187,19 +187,25 @@ static const struct mcu_type_s avr_mcu_t
/* Enhanced, <= 8K. */
{ "avr4", 4, NULL },
{ "atmega8", 4, "__AVR_ATmega8__" },
+ { "atmega48", 4, "__AVR_ATmega48__" },
+ { "atmega88", 4, "__AVR_ATmega88__" },
{ "atmega8515", 4, "__AVR_ATmega8515__" },
{ "atmega8535", 4, "__AVR_ATmega8535__" },
+ { "attiny13", 4, "__AVR_ATtiny13__" },
+ { "attiny2313", 4, "__AVR_ATtiny2313__" },
/* Enhanced, > 8K. */
{ "avr5", 5, NULL },
{ "atmega16", 5, "__AVR_ATmega16__" },
{ "atmega161", 5, "__AVR_ATmega161__" },
{ "atmega162", 5, "__AVR_ATmega162__" },
{ "atmega163", 5, "__AVR_ATmega163__" },
+ { "atmega168", 5, "__AVR_ATmega168__" },
{ "atmega169", 5, "__AVR_ATmega169__" },
{ "atmega32", 5, "__AVR_ATmega32__" },
{ "atmega323", 5, "__AVR_ATmega323__" },
{ "atmega64", 5, "__AVR_ATmega64__" },
{ "atmega128", 5, "__AVR_ATmega128__" },
+ { "at90can128", 5, "__AVR_AT90CAN128__" },
{ "at94k", 5, "__AVR_AT94K__" },
/* Assembler only. */
{ "avr1", 1, NULL },
Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h.orig 2004-03-08 19:59:55.000000000 -0700
+++ gcc/config/avr/avr.h 2004-04-26 14:22:16.382996800 -0600
@@ -2351,12 +2351,12 @@ extern int avr_case_values_threshold;
Do not define this macro if it does not need to do anything. */
#define LINK_SPEC " %{!mmcu*:-m avr2}\
-%{mmcu=at90s1200|mmcu=attiny1*|mmcu=attiny28:-m avr1} \
+%{mmcu=at90s1200|mmcu=attiny11|mmcu=attiny12|mmcu=attiny15|mmcu=attiny28:-m
avr1} \
%{mmcu=attiny22|mmcu=attiny26|mmcu=at90s2*|mmcu=at90s4*|mmcu=at90s8*|mmcu=at90c8*|mmcu=at86rf401:-m
avr2}\
%{mmcu=atmega103|mmcu=atmega603|mmcu=at43*|mmcu=at76*:-m avr3}\
-%{mmcu=atmega8*:-m avr4}\
-%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64|mmcu=atmega128|mmcu=at94k:-m
avr5}\
-%{mmcu=atmega64|mmcu=atmega128|mmcu=atmega162|mmcu=atmega169: -Tdata 0x800100}
"
+%{mmcu=atmega8*|mmcu=atmega48|mmcu=attiny13|mmcu=attiny2313:-m avr4}\
+%{mmcu=atmega16*|mmcu=atmega32*|mmcu=atmega64|mmcu=atmega128|mmcu=at90can128|mmcu=at94k:-m
avr5}\
+%{mmcu=atmega48|mmcu=atmega88|mmcu=atmega64|mmcu=atmega128|mmcu=at90can128|mmcu=at90can128|mmcu=atmega162|mmcu=atmega168|mmcu=atmega169:
-Tdata 0x800100} "
/* A C string constant that tells the GCC driver program options to
pass to the linker. It can also specify how to translate options
@@ -2365,7 +2365,7 @@ extern int avr_case_values_threshold;
Do not define this macro if it does not need to do anything. */
#define LIB_SPEC \
- "%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lc }}}"
+
"%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28:
-lc }}}}}"
/* Another C string constant used much like `LINK_SPEC'. The
difference between the two is that `LIB_SPEC' is used at the end
of the command given to the linker.
@@ -2377,7 +2377,7 @@ extern int avr_case_values_threshold;
/* No libstdc++ for now. Empty string doesn't work. */
#define LIBGCC_SPEC \
- "%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lgcc }}}"
+
"%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28:
-lgcc }}}}}"
/* Another C string constant that tells the GCC driver program how
and when to place a reference to `libgcc.a' into the linker
command line. This constant is placed both before and after the
@@ -2427,17 +2427,23 @@ extern int avr_case_values_threshold;
%{mmcu=at43usb355:crt43355.o%s} \
%{mmcu=at76c711:crt76711.o%s} \
%{mmcu=atmega8|mmcu=avr4:crtm8.o%s} \
+%{mmcu=atmega48:crtm48.o%s} \
+%{mmcu=atmega88:crtm88.o%s} \
%{mmcu=atmega8515:crtm8515.o%s} \
%{mmcu=atmega8535:crtm8535.o%s} \
+%{mmcu=attiny13:crttn13.o%s} \
+%{mmcu=attiny2313:crttn2313.o%s} \
%{mmcu=atmega16:crtm16.o%s} \
%{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
%{mmcu=atmega162:crtm162.o%s} \
%{mmcu=atmega163:crtm163.o%s} \
+%{mmcu=atmega168:crtm168.o%s} \
%{mmcu=atmega169:crtm169.o%s} \
%{mmcu=atmega32:crtm32.o%s} \
%{mmcu=atmega323:crtm323.o%s} \
%{mmcu=atmega64:crtm64.o%s} \
%{mmcu=atmega128:crtm128.o%s} \
+%{mmcu=at90can128:crtcan128.o%s} \
%{mmcu=at94k:crtat94k.o%s}"
#define EXTRA_SPECS {"crt_binutils", CRT_BINUTILS_SPECS},
Index: gcc/config/avr/t-avr
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/avr/t-avr,v
retrieving revision 1.12
diff -u -p -p -r1.12 t-avr
--- gcc/config/avr/t-avr 27 Feb 2003 21:45:33 -0000 1.12
+++ gcc/config/avr/t-avr 3 Apr 2004 00:08:14 -0000
@@ -50,13 +50,15 @@ MULTILIB_MATCHES = \
mmcu?avr3=mmcu?at43usb320 mmcu?avr3=mmcu?at43usb355 \
mmcu?avr3=mmcu?at76c711 \
mmcu?avr4=mmcu?atmega8515 mmcu?avr4=mmcu?atmega8535 \
- mmcu?avr4=mmcu?atmega8 \
+ mmcu?avr4=mmcu?attiny13 mmcu?avr4=mmcu?attiny2313 \
+ mmcu?avr4=mmcu?atmega8 mmcu?avr4=mmcu?atmega48 \
+ mmcu?avr4=mmcu?atmega88 \
mmcu?avr5=mmcu?atmega161 mmcu?avr5=mmcu?atmega162 \
mmcu?avr5=mmcu?atmega163 mmcu?avr5=mmcu?atmega169 \
- mmcu?avr5=mmcu?atmega16 \
+ mmcu?avr5=mmcu?atmega16 mmcu?avr5=mmcu?atmega168 \
mmcu?avr5=mmcu?atmega323 mmcu?avr5=mmcu?atmega32 \
mmcu?avr5=mmcu?atmega64 mmcu?avr5=mmcu?atmega128 \
- mmcu?avr5=mmcu?at94k
+ mmcu?avr5=mmcu?at94k mmcu?avr5=mmcu?at90can128
MULTILIB_EXCEPTIONS =
2004-04-15 Theodore A. Roth <address@hidden>
* configure.in:
* crt1/Makefile.am:
* include/avr/io.h:
Add support infrastructure for mega48, mega88, mega168, tiny13,
tiny2313 and at90can128.
Index: configure.in
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/configure.in,v
retrieving revision 1.104
diff -u -p -p -r1.104 configure.in
--- configure.in 14 Apr 2004 19:11:10 -0000 1.104
+++ configure.in 15 Apr 2004 18:27:43 -0000
@@ -265,6 +265,32 @@ fi
AC_SUBST(DOC_INST_DIR)
+dnl Some devices are only handled by newer version of gcc. This macro lets us
+dnl probe to see if the installed avr-gcc supports a questionable device.
+AC_DEFUN(
+ CHECK_AVR_DEVICE,
+ [
+ old_CC=${CC}
+ old_CFLAGS=${CFLAGS}
+ CFLAGS="-mmcu=$1"
+ CC=`echo "${CC}" | sed 's/-mmcu=avr.//'`
+ AC_MSG_CHECKING(if ${CC} has support for $1)
+ AC_TRY_COMPILE(
+ [],
+ [int main (void) {}],
+ [has_dev_support=yes],
+ [has_dev_support=no]
+ )
+ if test "x$has_dev_support" = "xyes"
+ then
+ HAS_$1=yes
+ fi
+ AC_MSG_RESULT($has_dev_support)
+ CC=${old_CC}
+ CFLAGS=${old_CFLAGS}
+ ]
+)
+
dnl we need to set some compiler switches according to the current
dnl avr library configuration
@@ -315,14 +341,40 @@ else
AVR_CRT_MEGA='crtm103.o'
AVR_CRT_OTHER='crt43320.o crt43355.o crt76711.o'
;;
- avr4) avrlib_cflags=${avrlib_opt_space}
+ avr4)
+ CHECK_AVR_DEVICE(attiny13)
+ CHECK_AVR_DEVICE(attiny2313)
+ CHECK_AVR_DEVICE(atmega48)
+ CHECK_AVR_DEVICE(atmega88)
+ avrlib_cflags=${avrlib_opt_space}
avrlib_asflags='-mmcu=avr4'
- AVR_CRT_MEGA='crtm8.o crtm8515.o crtm8535.o # crtm83.o crtm85.o'
+ AVR_CRT_MEGA='crtm8.o crtm8515.o crtm8535.o'
+ if test "x$HAS_atmega48" = "xyes"; then
+ AVR_CRT_MEGA="$AVR_CRT_MEGA crtm48.o"
+ fi
+ if test "x$HAS_atmega88" = "xyes"; then
+ AVR_CRT_MEGA="$AVR_CRT_MEGA crtm88.o"
+ fi
+ if test "x$HAS_attiny13" = "xyes"; then
+ AVR_CRT_TINY="$AVR_CRT_TINY crttn13.o"
+ fi
+ if test "x$HAS_attiny2313" = "xyes"; then
+ AVR_CRT_TINY="$AVR_CRT_TINY crttn2313.o"
+ fi
;;
- avr5) avrlib_cflags=${avrlib_opt_speed}
+ avr5)
+ CHECK_AVR_DEVICE(atmega168)
+ CHECK_AVR_DEVICE(at90can128)
+ avrlib_cflags=${avrlib_opt_speed}
avrlib_asflags='-mmcu=avr5'
AVR_CRT_MEGA='crtm161.o crtm162.o crtm163.o crtm169.o crtm323.o
crtm128.o crtm16.o crtm32.o crtm64.o'
+ if test "x$HAS_atmega168" = "xyes"; then
+ AVR_CRT_MEGA="$AVR_CRT_MEGA crtm168.o"
+ fi
AVR_CRT_OTHER='crtat94k.o'
+ if test "x$HAS_at90can128" = "xyes"; then
+ AVR_CRT_OTHER="$AVR_CRT_OTHER crtcan128.o"
+ fi
;;
*) AC_MSG_ERROR(unexpected value '${with_multisubdir}' for
with_multisubdir)
;;
Index: crt1/Makefile.am
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/crt1/Makefile.am,v
retrieving revision 1.2
diff -u -p -p -r1.2 Makefile.am
--- crt1/Makefile.am 27 Feb 2003 21:40:18 -0000 1.2
+++ crt1/Makefile.am 15 Apr 2004 18:27:43 -0000
@@ -1,4 +1,7 @@
-# Copyright (c) 2002, Reinhard Jessich <address@hidden>
+#
+# $Id$
+#
+# Copyright (c) 2002, 2004 Reinhard Jessich <address@hidden>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -54,6 +57,9 @@ $(AVR_CRT_TINY): crttn%.o: gcrt1.S
# $(AVR_CRT_OTHER) - devices that don't follow a common naming convention.
crtat94k.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=at94k -c $< -o $@
+
+crtcan128.o: gcrt1.S
+ $(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=at90can128 -c $< -o $@
crt43320.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=at43usb320 -c $< -o $@
Index: include/avr/io.h
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/include/avr/io.h,v
retrieving revision 1.11
diff -u -p -p -r1.11 io.h
--- include/avr/io.h 20 Oct 2003 18:45:28 -0000 1.11
+++ include/avr/io.h 15 Apr 2004 18:27:43 -0000
@@ -161,6 +161,8 @@
# include <avr/io86r401.h>
#elif defined (__AVR_ATmega128__)
# include <avr/iom128.h>
+#elif defined (__AVR_AT90CAN128__)
+# include <avr/iocan128.h>
#elif defined (__AVR_ATmega64__)
# include <avr/iom64.h>
#elif defined (__AVR_ATmega103__)
@@ -177,10 +179,16 @@
# include <avr/iom162.h>
#elif defined (__AVR_ATmega163__)
# include <avr/iom163.h>
+#elif defined (__AVR_ATmega168__)
+# include <avr/iom168.h>
#elif defined (__AVR_ATmega169__)
# include <avr/iom169.h>
#elif defined (__AVR_ATmega8__)
# include <avr/iom8.h>
+#elif defined (__AVR_ATmega48__)
+# include <avr/iom48.h>
+#elif defined (__AVR_ATmega88__)
+# include <avr/iom88.h>
#elif defined (__AVR_ATmega8515__)
# include <avr/iom8515.h>
#elif defined (__AVR_ATmega8535__)
@@ -209,6 +217,10 @@
# include <avr/io2323.h>
#elif defined (__AVR_AT90S2313__)
# include <avr/io2313.h>
+#elif defined (__AVR_ATtiny2313__)
+# include <avr/iotn2313.h>
+#elif defined (__AVR_ATtiny13__)
+# include <avr/iotn13.h>
/* avr1: the following only supported for assembler programs */
#elif defined (__AVR_ATtiny28__)
# include <avr/iotn28.h>