avr: add support for AVR 8-bit architecture

This commit adds support for the Atmel AVR 8-bit RISC architecture.
This is the first 8-bit architecture to be added to crosstool-ng so the
configuration options for 8-bit architectures are added here as well.

gcc has had support for AVR for quite a while, at least since the 4.3
series for the currently popular ATmega microcontroler series.
The AVR architecture only supports bare-metal toolchains.

gcc for the AVR 8-bit architecture, usually referred to as avr-gcc, is
commonly used in conjunction with the avr-libc library which provides
additional resources for the Atmel AVR 8-bit microcontrollers.

avr-gcc can also be found as a supported package in some recent Linux
distributions.

This commit also closes #66

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
1.22
Erico Nunes 8 years ago
parent baceedd239
commit 230dc12285

@ -0,0 +1,8 @@
# AVR specific config options
## select ARCH_SUPPORTS_8
## select ARCH_DEFAULT_8
## select ARCH_REQUIRES_MULTILIB
##
## help The 8-bit AVR architecture, as defined by:
## help http://www.atmel.com/products/microcontrollers/avr

@ -1,5 +1,6 @@
# Linux kernel options
## depends on ! ARCH_avr
## select KERNEL_SUPPORTS_SHARED_LIBS
##
## help Build a toolchain targeting systems running Linux as a kernel.

@ -8,6 +8,7 @@ config ARCH
# Pre-declare target optimisation variables
config ARCH_SUPPORTS_BOTH_MMU
config ARCH_SUPPORTS_BOTH_ENDIAN
config ARCH_SUPPORTS_8
config ARCH_SUPPORTS_32
config ARCH_SUPPORTS_64
config ARCH_SUPPORTS_WITH_ARCH
@ -60,6 +61,10 @@ config ARCH_SUFFIX
comment "Generic target options"
#--------------------------------------
config ARCH_REQUIRES_MULTILIB
bool
select MULTILIB
config MULTILIB
bool
prompt "Build a multilib toolchain (READ HELP!!!)"
@ -133,12 +138,18 @@ config ARCH_ENDIAN
default "little" if ARCH_LE
#--------------------------------------
config ARCH_SUPPORTS_8
bool
config ARCH_SUPPORTS_32
bool
config ARCH_SUPPORTS_64
bool
config ARCH_DEFAULT_8
bool
config ARCH_DEFAULT_32
bool
@ -147,15 +158,22 @@ config ARCH_DEFAULT_64
config ARCH_BITNESS
int
default "8" if ARCH_8
default "32" if ARCH_32
default "64" if ARCH_64
choice
bool
prompt "Bitness:"
default ARCH_8 if ARCH_DEFAULT_8
default ARCH_32 if ARCH_DEFAULT_32
default ARCH_64 if ARCH_DEFAULT_64
config ARCH_8
bool
prompt "8-bit"
depends on ARCH_SUPPORTS_8
config ARCH_32
bool
prompt "32-bit"

@ -0,0 +1,5 @@
# Compute AVR-specific values
CT_DoArchTupleValues() {
CT_TARGET_ARCH="${CT_ARCH}"
}
Loading…
Cancel
Save