From a94b87075666680ca0285cd67efc253a5089756f Mon Sep 17 00:00:00 2001 From: "Martin Lund\"" Date: Fri, 22 May 2009 14:46:18 +0000 Subject: Added initial AVR32 support (bare-metal,newlib) --- config/libc/newlib.in | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 config/libc/newlib.in (limited to 'config/libc') diff --git a/config/libc/newlib.in b/config/libc/newlib.in new file mode 100644 index 00000000..e674cddd --- /dev/null +++ b/config/libc/newlib.in @@ -0,0 +1,31 @@ +# newlib options +# depends on EXPERIMENTAL + +config LIBC_newlib + help + Newlib is a C library intended for use on embedded systems. It is a + conglomeration of several library parts, all under free software + licenses that make them easily usable on embedded products. Newlib + is only available in source form. It can be compiled for a wide + array of processors, and will usually work on any architecture with + the addition of a few low-level routines. + +choice + bool + prompt "newlib version" + +config NEWLIB_V_1_17_0 + bool + prompt "1.17.0" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! + +endchoice + +config LIBC_VERSION + string + default "1.17.0" if NEWLIB_V_1_17_0 + +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! -- cgit v1.2.3 From 07a71d8c420019b627c191259d14a2eaa1561b20 Mon Sep 17 00:00:00 2001 From: "Martin Lund\"" Date: Sat, 23 May 2009 18:46:42 +0000 Subject: Added support for Atmel AVR32 headers --- config/libc/newlib.in | 12 ++++++++++++ samples/avr32-unknown-none/crosstool.config | 5 +++-- scripts/build/libc/newlib.sh | 19 +++++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) (limited to 'config/libc') diff --git a/config/libc/newlib.in b/config/libc/newlib.in index e674cddd..fdca4ce1 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 b72d963f..2f9e8c47 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 2d8d69dd..07c254c8 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 } -- cgit v1.2.3 From 8fb846f5b5174e42b913f20ab1f058b502fd4791 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sat, 20 Jun 2009 17:16:54 +0200 Subject: Misc AVR32 cleanups. --- config/arch/avr32.in | 10 +++++----- config/libc.in | 7 ++----- config/libc/newlib.in | 1 - samples/avr32-unknown-none/crosstool.config | 19 +++++++++++-------- scripts/build/libc/newlib.sh | 4 ---- 5 files changed, 18 insertions(+), 23 deletions(-) (limited to 'config/libc') diff --git a/config/arch/avr32.in b/config/arch/avr32.in index 2965828d..63916da5 100644 --- a/config/arch/avr32.in +++ b/config/arch/avr32.in @@ -4,10 +4,10 @@ config ARCH_avr32 select ARCH_USE_MMU select ARCH_DEFAULT_BE - help + select ARCH_SUPPORT_ARCH + select ARCH_SUPPORT_CPU + select ARCH_SUPPORT_TUNE + select ARCH_SUPPORT_FPU + help The AVR32 architecture, as defined by: http://www.atmel.com/products/avr32 - -config ARCH_AVR32 - string - default "avr32" diff --git a/config/libc.in b/config/libc.in index a10b942d..d8020ca5 100644 --- a/config/libc.in +++ b/config/libc.in @@ -2,11 +2,8 @@ config LIBC string -# default "none" if BARE_METAL - default "newlib" if EXPERIMENTAL - -# FIXME: toolchain can be BARE_METAL (no OS) but have OS independent LIBC (eg. newlib) -# new combinations needed + default "none" if BARE_METAL + default "newlib" if BARE_METAL && ARCH_avr32 && EXPERIMENTAL menu "C-library" diff --git a/config/libc/newlib.in b/config/libc/newlib.in index fdca4ce1..c4b9e088 100644 --- a/config/libc/newlib.in +++ b/config/libc/newlib.in @@ -40,4 +40,3 @@ config ATMEL_AVR32_HEADERS 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 2f9e8c47..f60bd734 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@1555M -# Sat May 23 19:57:07 2009 +# crosstool-NG version: svn_devel_avr32@1596M +# Sat Jun 20 17:03:17 2009 # # @@ -77,14 +77,18 @@ CT_ARCH="avr32" # CT_ARCH_64 is not set # CT_ARCH_SUPPORTS_BOTH_MMU is not set # CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set -# CT_ARCH_SUPPORT_ARCH is not set +CT_ARCH_SUPPORT_ARCH=y # CT_ARCH_SUPPORT_ABI is not set -# CT_ARCH_SUPPORT_CPU is not set -# CT_ARCH_SUPPORT_TUNE is not set -# CT_ARCH_SUPPORT_FPU is not set +CT_ARCH_SUPPORT_CPU=y +CT_ARCH_SUPPORT_TUNE=y +CT_ARCH_SUPPORT_FPU=y # CT_ARCH_DEFAULT_HAS_MMU is not set CT_ARCH_DEFAULT_BE=y # CT_ARCH_DEFAULT_LE is not set +CT_ARCH_ARCH="" +CT_ARCH_CPU="" +CT_ARCH_TUNE="" +CT_ARCH_FPU="" # CT_ARCH_FLOAT_HW is not set CT_ARCH_FLOAT_SW=y CT_TARGET_CFLAGS="" @@ -103,7 +107,6 @@ CT_ARCH_avr32=y # CT_ARCH_sh is not set # CT_ARCH_x86_64 is not set # CT_ARCH_x86 is not set -CT_ARCH_AVR32="avr32" CT_ARCH_USE_MMU=y # @@ -229,7 +232,7 @@ CT_CC_SUPPORT_OBJCXX=y # Additional supported languages: # # CT_CC_LANG_CXX is not set -CT_LIBC="newlib" +CT_LIBC="none" # # C-library diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 80dc0f49..a5446933 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -15,8 +15,6 @@ do_libc_get() { if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then CT_GetFile "avr32headers" ${avr32headers_src} fi - - return 0 } do_libc_extract() { @@ -26,8 +24,6 @@ do_libc_extract() { if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then CT_Extract "avr32headers" fi - - return 0 } do_libc_check_config() { -- cgit v1.2.3