mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 01:21:27 +00:00
Merge the AVR32 support branch to the default branch.
This commit is contained in:
commit
424f64c487
13
config/arch/avr32.in
Normal file
13
config/arch/avr32.in
Normal file
@ -0,0 +1,13 @@
|
||||
# AVR32 specific configuration file
|
||||
# depends on EXPERIMENTAL
|
||||
|
||||
config ARCH_avr32
|
||||
select ARCH_USE_MMU
|
||||
select ARCH_DEFAULT_BE
|
||||
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
|
@ -2,6 +2,7 @@
|
||||
|
||||
config LIBC
|
||||
string
|
||||
default "newlib" if BARE_METAL && ARCH_avr32 && EXPERIMENTAL
|
||||
default "none" if BARE_METAL
|
||||
|
||||
menu "C-library"
|
||||
|
42
config/libc/newlib.in
Normal file
42
config/libc/newlib.in
Normal file
@ -0,0 +1,42 @@
|
||||
# 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!
|
||||
|
||||
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.
|
||||
|
52747
patches/binutils/2.18/130-avr32-atmel-v1.0.1.patch
Normal file
52747
patches/binutils/2.18/130-avr32-atmel-v1.0.1.patch
Normal file
File diff suppressed because it is too large
Load Diff
22620
patches/gcc/4.2.2/300-avr32-atmel-v1.1.3.patch
Normal file
22620
patches/gcc/4.2.2/300-avr32-atmel-v1.1.3.patch
Normal file
File diff suppressed because it is too large
Load Diff
32450
patches/newlib/1.17.0/100-avr32.patch
Normal file
32450
patches/newlib/1.17.0/100-avr32.patch
Normal file
File diff suppressed because it is too large
Load Diff
271
samples/avr32-unknown-none/crosstool.config
Normal file
271
samples/avr32-unknown-none/crosstool.config
Normal file
@ -0,0 +1,271 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# crosstool-NG version: svn_devel_avr32@1596M
|
||||
# Sat Jun 20 17:03:17 2009
|
||||
#
|
||||
|
||||
#
|
||||
# Paths and misc options
|
||||
#
|
||||
|
||||
#
|
||||
# crosstool-NG behavior
|
||||
#
|
||||
# CT_OBSOLETE is not set
|
||||
CT_EXPERIMENTAL=y
|
||||
CT_DEBUG_CT=y
|
||||
# CT_DEBUG_PAUSE_STEPS is not set
|
||||
CT_DEBUG_CT_SAVE_STEPS=y
|
||||
# CT_DEBUG_CT_SAVE_STEPS_GZIP is not set
|
||||
# CT_NO_OVERIDE_LC_MESSAGES is not set
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
CT_LOCAL_TARBALLS_DIR=""
|
||||
CT_WORK_DIR="${CT_TOP_DIR}/targets"
|
||||
CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
|
||||
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
|
||||
# CT_CUSTOM_PATCH is not set
|
||||
CT_REMOVE_DOCS=y
|
||||
CT_INSTALL_DIR_RO=y
|
||||
|
||||
#
|
||||
# Downloading
|
||||
#
|
||||
# CT_FORBID_DOWNLOAD is not set
|
||||
# CT_FORCE_DOWNLOAD is not set
|
||||
# CT_USE_MIRROR is not set
|
||||
CT_CONNECT_TIMEOUT=10
|
||||
# CT_ONLY_DOWNLOAD is not set
|
||||
|
||||
#
|
||||
# Extracting
|
||||
#
|
||||
# CT_FORCE_EXTRACT is not set
|
||||
CT_OVERIDE_CONFIG_GUESS_SUB=y
|
||||
# CT_ONLY_EXTRACT is not set
|
||||
|
||||
#
|
||||
# Build behavior
|
||||
#
|
||||
CT_PARALLEL_JOBS=1
|
||||
CT_LOAD=0
|
||||
CT_NICE=0
|
||||
CT_USE_PIPES=y
|
||||
# CT_CONFIG_SHELL_ASH is not set
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
# CT_LOG_ERROR is not set
|
||||
# CT_LOG_WARN is not set
|
||||
CT_LOG_INFO=y
|
||||
# CT_LOG_EXTRA is not set
|
||||
# CT_LOG_DEBUG is not set
|
||||
# CT_LOG_ALL is not set
|
||||
CT_LOG_LEVEL_MAX="INFO"
|
||||
# CT_LOG_SEE_TOOLS_WARN is not set
|
||||
CT_LOG_PROGRESS_BAR=y
|
||||
CT_LOG_TO_FILE=y
|
||||
CT_LOG_FILE_COMPRESS=y
|
||||
|
||||
#
|
||||
# Target options
|
||||
#
|
||||
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=y
|
||||
# CT_ARCH_SUPPORT_ABI 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=""
|
||||
CT_TARGET_LDFLAGS=""
|
||||
|
||||
#
|
||||
# General target options
|
||||
#
|
||||
# CT_ARCH_alpha is not set
|
||||
# CT_ARCH_arm is not set
|
||||
CT_ARCH_avr32=y
|
||||
# CT_ARCH_ia64 is not set
|
||||
# CT_ARCH_mips is not set
|
||||
# CT_ARCH_powerpc64 is not set
|
||||
# CT_ARCH_powerpc is not set
|
||||
# CT_ARCH_sh is not set
|
||||
# CT_ARCH_x86_64 is not set
|
||||
# CT_ARCH_x86 is not set
|
||||
CT_ARCH_USE_MMU=y
|
||||
|
||||
#
|
||||
# Target optimisations
|
||||
#
|
||||
|
||||
#
|
||||
# Toolchain options
|
||||
#
|
||||
|
||||
#
|
||||
# General toolchain options
|
||||
#
|
||||
CT_USE_SYSROOT=y
|
||||
CT_SYSROOT_DIR_PREFIX=""
|
||||
|
||||
#
|
||||
# Tuple completion and aliasing
|
||||
#
|
||||
CT_TARGET_VENDOR="unknown"
|
||||
CT_TARGET_ALIAS_SED_EXPR=""
|
||||
CT_TARGET_ALIAS=""
|
||||
|
||||
#
|
||||
# Toolchain type
|
||||
#
|
||||
# CT_NATIVE is not set
|
||||
CT_CROSS=y
|
||||
# CT_CROSS_NATIVE is not set
|
||||
# CT_CANADIAN is not set
|
||||
CT_TOOLCHAIN_TYPE="cross"
|
||||
|
||||
#
|
||||
# Build system
|
||||
#
|
||||
CT_BUILD=""
|
||||
CT_BUILD_PREFIX=""
|
||||
CT_BUILD_SUFFIX=""
|
||||
|
||||
#
|
||||
# Operating System
|
||||
#
|
||||
CT_BARE_METAL=y
|
||||
CT_KERNEL="bare-metal"
|
||||
CT_KERNEL_bare_metal=y
|
||||
# CT_KERNEL_linux is not set
|
||||
|
||||
#
|
||||
# Companion libraries
|
||||
#
|
||||
# CT_GMP_MPFR is not set
|
||||
# CT_PPL_CLOOG is not set
|
||||
|
||||
#
|
||||
# Binary utilities
|
||||
#
|
||||
CT_ARCH_BINFMT_ELF=y
|
||||
# CT_ARCH_BINFMT_FLAT is not set
|
||||
|
||||
#
|
||||
# GNU binutils
|
||||
#
|
||||
CT_BINUTILS_VERSION="2.18"
|
||||
# CT_BINUTILS_V_2_14 is not set
|
||||
# CT_BINUTILS_V_2_15 is not set
|
||||
# CT_BINUTILS_V_2_16_1 is not set
|
||||
# CT_BINUTILS_V_2_17 is not set
|
||||
CT_BINUTILS_V_2_18=y
|
||||
# CT_BINUTILS_V_2_18_50_0_4 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_6 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_7 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_8 is not set
|
||||
# CT_BINUTILS_V_2_18_50_0_9 is not set
|
||||
# CT_BINUTILS_V_2_18_90 is not set
|
||||
# CT_BINUTILS_V_2_18_91 is not set
|
||||
# CT_BINUTILS_V_2_18_92 is not set
|
||||
# CT_BINUTILS_V_2_18_93 is not set
|
||||
# CT_BINUTILS_V_2_19 is not set
|
||||
# CT_BINUTILS_V_2_19_1 is not set
|
||||
# CT_BINUTILS_V_2_19_50_0_1 is not set
|
||||
# CT_BINUTILS_V_2_19_51_0_1 is not set
|
||||
# CT_BINUTILS_V_2_19_51_0_2 is not set
|
||||
CT_BINUTILS_EXTRA_CONFIG=""
|
||||
|
||||
#
|
||||
# C compiler
|
||||
#
|
||||
CT_CC="gcc"
|
||||
CT_CC_VERSION="4.2.2"
|
||||
CT_CC_gcc=y
|
||||
# CT_CC_V_3_2_3 is not set
|
||||
# CT_CC_V_3_3_6 is not set
|
||||
# CT_CC_V_3_4_6 is not set
|
||||
# CT_CC_V_4_0_0 is not set
|
||||
# CT_CC_V_4_0_1 is not set
|
||||
# CT_CC_V_4_0_2 is not set
|
||||
# CT_CC_V_4_0_3 is not set
|
||||
# CT_CC_V_4_0_4 is not set
|
||||
# CT_CC_V_4_1_0 is not set
|
||||
# CT_CC_V_4_1_1 is not set
|
||||
# CT_CC_V_4_1_2 is not set
|
||||
# CT_CC_V_4_2_0 is not set
|
||||
# CT_CC_V_4_2_1 is not set
|
||||
CT_CC_V_4_2_2=y
|
||||
# CT_CC_V_4_2_3 is not set
|
||||
# CT_CC_V_4_2_4 is not set
|
||||
# CT_CC_V_4_3_0 is not set
|
||||
# CT_CC_V_4_3_1 is not set
|
||||
# CT_CC_V_4_3_2 is not set
|
||||
# CT_CC_V_4_3_3 is not set
|
||||
# CT_CC_V_4_4_0 is not set
|
||||
# CT_CC_GCC_4_3_or_later is not set
|
||||
# CT_CC_GCC_4_4_or_later is not set
|
||||
CT_CC_CORE_EXTRA_CONFIG=""
|
||||
CT_CC_SUPPORT_CXX=y
|
||||
CT_CC_SUPPORT_FORTRAN=y
|
||||
CT_CC_SUPPORT_JAVA=y
|
||||
CT_CC_SUPPORT_ADA=y
|
||||
CT_CC_SUPPORT_OBJC=y
|
||||
CT_CC_SUPPORT_OBJCXX=y
|
||||
|
||||
#
|
||||
# Additional supported languages:
|
||||
#
|
||||
# CT_CC_LANG_CXX is not set
|
||||
CT_LIBC="none"
|
||||
|
||||
#
|
||||
# C-library
|
||||
#
|
||||
CT_LIBC_VERSION="1.17.0"
|
||||
# CT_LIBC_eglibc is not set
|
||||
# CT_LIBC_glibc is not set
|
||||
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
|
||||
#
|
||||
# CT_LIBC_SUPPORT_NPTL is not set
|
||||
# CT_LIBC_SUPPORT_LINUXTHREADS is not set
|
||||
CT_THREADS="none"
|
||||
# CT_THREADS_NPTL is not set
|
||||
# CT_THREADS_LINUXTHREADS is not set
|
||||
CT_THREADS_NONE=y
|
||||
|
||||
#
|
||||
# Tools facilities
|
||||
#
|
||||
# CT_TOOL_libelf is not set
|
||||
# CT_TOOL_sstrip is not set
|
||||
|
||||
#
|
||||
# Debug facilities
|
||||
#
|
||||
# CT_DEBUG_dmalloc is not set
|
||||
# CT_DEBUG_duma is not set
|
||||
# CT_DEBUG_gdb is not set
|
||||
# CT_DEBUG_ltrace is not set
|
||||
# CT_DEBUG_strace is not set
|
3
samples/avr32-unknown-none/reported.by
Normal file
3
samples/avr32-unknown-none/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Martin Lund"
|
||||
reporter_url="http://www.doredevelopment.dk"
|
||||
reporter_comment=""
|
16
scripts/build/arch/avr32.sh
Normal file
16
scripts/build/arch/avr32.sh
Normal file
@ -0,0 +1,16 @@
|
||||
# Compute AVR32-specific values
|
||||
|
||||
CT_DoArchTupleValues() {
|
||||
# The architecture part of the tuple:
|
||||
CT_TARGET_ARCH="${CT_ARCH}"
|
||||
|
||||
# gcc ./configure flags
|
||||
CT_ARCH_WITH_ARCH=
|
||||
CT_ARCH_WITH_ABI=
|
||||
CT_ARCH_WITH_CPU=
|
||||
CT_ARCH_WITH_TUNE=
|
||||
CT_ARCH_WITH_FPU=
|
||||
CT_ARCH_WITH_FLOAT=
|
||||
CT_TARGET_SYS=none
|
||||
|
||||
}
|
82
scripts/build/libc/newlib.sh
Normal file
82
scripts/build/libc/newlib.sh
Normal file
@ -0,0 +1,82 @@
|
||||
# This file adds functions to build the Newlib C library
|
||||
# Copyright 2009 DoréDevelopment
|
||||
# Licensed under the GPL v2. See COPYING in the root of this package
|
||||
#
|
||||
# Edited by Martin Lund <mgl@doredevelopment.dk>
|
||||
#
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
do_libc_check_config() {
|
||||
:
|
||||
}
|
||||
|
||||
do_libc_headers() {
|
||||
:
|
||||
}
|
||||
|
||||
do_libc_start_files() {
|
||||
:
|
||||
}
|
||||
|
||||
do_libc() {
|
||||
CT_DoStep INFO "Installing C library"
|
||||
|
||||
mkdir -p "${CT_BUILD_DIR}/build-libc"
|
||||
cd "${CT_BUILD_DIR}/build-libc"
|
||||
|
||||
CT_DoLog EXTRA "Configuring C library"
|
||||
|
||||
# CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \
|
||||
BUILD_CC="${CT_BUILD}-gcc" \
|
||||
CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \
|
||||
AR=${CT_TARGET}-ar \
|
||||
RANLIB=${CT_TARGET}-ranlib \
|
||||
CT_DoExecLog ALL \
|
||||
"${CT_SRC_DIR}/newlib-${CT_LIBC_VERSION}/configure" \
|
||||
--build=${CT_BUILD} \
|
||||
--host=${CT_HOST} \
|
||||
--target=${CT_TARGET} \
|
||||
--prefix=${CT_PREFIX_DIR} \
|
||||
${extra_config} \
|
||||
${CT_LIBC_GLIBC_EXTRA_CONFIG}
|
||||
|
||||
CT_DoLog EXTRA "Building C library"
|
||||
|
||||
CT_DoExecLog ALL make
|
||||
|
||||
CT_DoLog EXTRA "Installing C library"
|
||||
|
||||
CT_DoExecLog ALL make install install_root="${CT_SYSROOT_DIR}"
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user