diff --git a/arch/avr/src/avr/Kconfig b/arch/avr/src/avr/Kconfig index 9591cb6530d..5010dc57b36 100644 --- a/arch/avr/src/avr/Kconfig +++ b/arch/avr/src/avr/Kconfig @@ -27,6 +27,14 @@ config AVR_WINAVR correct cygwin.dll file precedes the path to the WinAVR binaries! +config AVR_ATMEL_AVR_TOOLCHAIN + bool "Atmel AVR Toolchain" + depends on HOST_WINDOWS + ---help--- + Atmel provides GNU Toolchain for AVR development. It can + be obtained by installing Atmel Studio 6 and later or + as standalone package from Atmel. + config AVR_LINUXGCC bool "Linux GCC" depends on HOST_LINUX @@ -59,4 +67,20 @@ config AVR_BUILDROOT endchoice +menu "Atmel AVR Toolchain options" + depends on AVR_ATMEL_AVR_TOOLCHAIN + +config AVR_HAS_MEMX_PTR + bool "Enable in-flash static const stings" + depends on AVR_ATMEL_AVR_TOOLCHAIN + default y + ---help--- + Enabling this option (recommended) will place all constant + strings used for debugging and assertion in program memory + and allow the corresponding routines to get the strings + directly from there. This will dramatically decrease amount + of RAM needed to hold this static data. + +endmenu + endif diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index 38e54521d5d..7e9e74210fa 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -66,6 +66,12 @@ ifeq ($(filter y, \ CONFIG_AVR_TOOLCHAIN ?= WINAVR endif +ifeq ($(filter y, \ + $(CONFIG_AVR_ATMEL_AVR_TOOLCHAIN) \ + ),y) + CONFIG_AVR_TOOLCHAIN ?= ATMEL +endif + # Chip-specific CPU flags ifeq ($(CONFIG_ARCH_CHIP_ATMEGA128),y) @@ -114,9 +120,17 @@ ifeq ($(CONFIG_AVR_TOOLCHAIN),LINUXGCC) LDFLAGS += -nostartfiles -nodefaultlibs endif -# WinAVR toolchain under Windows/Cygwin +# WinAVR or Atmel toolchain under Windows/Cygwin +_WINAVR = 0 ifeq ($(CONFIG_AVR_TOOLCHAIN),WINAVR) +_WINAVR = 1 +endif +ifeq ($(CONFIG_AVR_TOOLCHAIN),ATMEL) +_WINAVR = 1 +endif + +ifeq ($(_WINAVR),1) CROSSDEV ?= avr- ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y