summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/libc/newlib.in12
-rw-r--r--samples/avr32-unknown-none/crosstool.config5
-rw-r--r--scripts/build/libc/newlib.sh19
3 files changed, 32 insertions, 4 deletions
diff --git a/config/libc/newlib.in b/config/libc/newlib.in
index e674cdd..fdca4ce 100644
--- a/config/libc/newlib.in
+++ b/config/libc/newlib.in
@@ -29,3 +29,15 @@ config LIBC_VERSION
# CT_INSERT_VERSION_STRING_ABOVE
# Don't remove above line!
+
+config ATMEL_AVR32_HEADERS
+ bool
+ prompt "Install Atmel AVR32 headers"
+ default y
+ help
+ Install Atmel AVR32 headers for native AVR32 development. Most
+ AVR32 MCU devices are supported.
+
+ If you do native AVR32 development you want to say 'Y' here.
+
+
diff --git a/samples/avr32-unknown-none/crosstool.config b/samples/avr32-unknown-none/crosstool.config
index b72d963..2f9e8c4 100644
--- a/samples/avr32-unknown-none/crosstool.config
+++ b/samples/avr32-unknown-none/crosstool.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# crosstool-NG version: svn_devel_avr32@1553M
-# Fri May 22 20:25:45 2009
+# crosstool-NG version: svn_devel_avr32@1555M
+# Sat May 23 19:57:07 2009
#
#
@@ -240,6 +240,7 @@ CT_LIBC_VERSION="1.17.0"
CT_LIBC_newlib=y
# CT_LIBC_uClibc is not set
CT_NEWLIB_V_1_17_0=y
+CT_ATMEL_AVR32_HEADERS=y
#
# Common C library options
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 2d8d69d..07c254c 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -8,9 +8,14 @@
do_libc_get() {
libc_src="ftp://sources.redhat.com/pub/newlib"
-
+ avr32headers_src="http://dev.doredevelopment.dk/avr32-toolchain/sources"
+
CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src}
+ if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
+ CT_GetFile "avr32headers" ${avr32headers_src}
+ fi
+
return 0
}
@@ -18,6 +23,10 @@ do_libc_extract() {
CT_Extract "newlib-${CT_LIBC_VERSION}"
CT_Patch "newlib-${CT_LIBC_VERSION}"
+ if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
+ CT_Extract "avr32headers"
+ fi
+
return 0
}
@@ -68,5 +77,11 @@ do_libc() {
}
do_libc_finish() {
- :
+ CT_DoStep INFO "Installing Atmel AVR32 headers"
+
+ if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then
+ CT_DoExecLog ALL cp -r ${CT_SRC_DIR}/avr32headers "${CT_PREFIX_DIR}/${CT_TARGET}/include/avr32"
+ fi
+
+ CT_EndStep
}