diff --git a/arch/avr/Kconfig b/arch/avr/Kconfig index acfbf6a603..7e4b74a54c 100644 --- a/arch/avr/Kconfig +++ b/arch/avr/Kconfig @@ -9,69 +9,44 @@ choice prompt "Atmel AVR chip selection" default ARCH_CHIP_AT32UC3B0256 -config ARCH_CHIP_ATMEGA128 - bool "ATMega128" +config ARCH_CHIP_ATMEGA + bool "ATMega family" + select ARCH_FAMILY_AVR ---help--- - Atmel ATMega128 8-bit AVR. + Atmel ATMega family of 8-bit AVRs. -config ARCH_CHIP_AT90USB646 - bool "AT90USB646" +config ARCH_CHIP_AT90USB + bool "AT90USB family" + select ARCH_FAMILY_AVR ---help--- - Atmel AT90USB646 8-bit AVR. + Atmel AT90USB family of 8-bit AVRs. -config ARCH_CHIP_AT90USB647 - bool "AT90USB647" +config ARCH_CHIP_AT32UC3 + bool "AVR23 AT32UC3* family" + select ARCH_FAMILY_AVR32 ---help--- - Atmel AT90USB647 8-bit AVR. - -config ARCH_CHIP_AT90USB1286 - bool "AT90USB1286" - ---help--- - Atmel AT90USB1286 8-bit AVR. - -config ARCH_CHIP_AT90USB1287 - bool "AT90USB1287" - ---help--- - Atmel AT90USB1287 8-bit AVR. - -config ARCH_CHIP_AT32UC3B0256 - bool "AT32UC3B0256" - ---help--- - Atmel AT32UC3B0256 32-bit AVR32. + Atmel AT32UC3A/B/C family of 32-bit AVR32s. endchoice config ARCH_FAMILY_AVR bool - default y if ARCH_CHIP_ATMEGA128 || ARCH_CHIP_AT90USB646 || ARCH_CHIP_AT90USB647 || ARCH_CHIP_AT90USB1286 || ARCH_CHIP_AT90USB1287 - select ARCH_HAVE_STACKCHECK + default n config ARCH_FAMILY_AVR32 bool - default y if ARCH_CHIP_AT32UC3B0256 + default n config ARCH_FAMILY string default "avr" if ARCH_FAMILY_AVR default "avr32" if ARCH_FAMILY_AVR32 -config ARCH_ATMEGA - bool - default y if ARCH_CHIP_ATMEGA128 - -config ARCH_AT90USB - bool - default y if ARCH_CHIP_AT90USB646 || ARCH_CHIP_AT90USB647 || ARCH_CHIP_AT90USB1286 || ARCH_CHIP_AT90USB1287 - -config ARCH_AT32UC3 - bool - default y if ARCH_CHIP_AT32UC3B0256 - config ARCH_CHIP string - default "atmega" if ARCH_ATMEGA - default "at90usb" if ARCH_AT90USB - default "at32uc3" if ARCH_AT32UC3 + default "atmega" if ARCH_CHIP_ATMEGA + default "at90usb" if ARCH_CHIP_AT90USB + default "at32uc3" if ARCH_CHIP_AT32UC3 source arch/avr/src/common/Kconfig @@ -80,17 +55,10 @@ source arch/avr/src/avr/Kconfig source arch/avr/src/at90usb/Kconfig source arch/avr/src/atmega/Kconfig endif + if ARCH_FAMILY_AVR32 source arch/avr/src/avr32/Kconfig source arch/avr/src/at32uc3/Kconfig endif -config AVR_USART0 - bool "USART0 specific serial device driver settings" - select ARCH_HAVE_USART0 - -config AVR_USART1 - bool "USART1 specific serial device driver settings" - select ARCH_HAVE_USART1 - -endif +endif # ARCH_AVR diff --git a/arch/avr/src/at32uc3/Kconfig b/arch/avr/src/at32uc3/Kconfig index fcb9f8405e..4191782389 100644 --- a/arch/avr/src/at32uc3/Kconfig +++ b/arch/avr/src/at32uc3/Kconfig @@ -3,7 +3,200 @@ # see misc/tools/kconfig-language.txt. # -if ARCH_AT32UC3 +if ARCH_CHIP_AT32UC3 comment "AT32U3 Configuration Options" -endif +choice + prompt "AT32U3 Processor Selection" + default ARCH_CHIP_AT32UC3B0256 + +config ARCH_CHIP_AT32UC3B064 + bool "AT32UC3B064" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B0 + +config ARCH_CHIP_AT32UC3B0128 + bool "AT32UC3B0128" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B0 + +config ARCH_CHIP_AT32UC3B0256 + bool "AT32UC3B0256" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B0 + +config ARCH_CHIP_AT32UC3B0512 + bool "AT32UC3B0512" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B0 + +config ARCH_CHIP_AT32UC3B164 + bool "AT32UC3B164" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B1 + +config ARCH_CHIP_AT32UC3B1128 + bool "AT32UC3B1128" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B1 + +config ARCH_CHIP_AT32UC3B1256 + bool "AT32UC3B1256" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B1 + +config ARCH_CHIP_AT32UC3B1512 + bool "AT32UC3B1512" + select ARCH_CHIP_AT32UC3B + select ARCH_CHIP_AT32UC3B1 + +endchoice # AT32U3 Processor Selection + +config ARCH_CHIP_AT32UC3A + bool + default n + +config ARCH_CHIP_AT32UC3B + bool + default n + +config ARCH_CHIP_AT32UC3B0 + bool + default n + +config ARCH_CHIP_AT32UC3B1 + bool + default n + +menu "AT32U3 Peripheral Selections" + +config AVR32_USART0 + bool "USART0" + default n + select ARCH_HAVE_USART0 + +config AVR32_USART1 + bool "USART1" + default n + select ARCH_HAVE_USART1 + +config AVR32_USART2 + bool "USART2" + default n + depends on ARCH_CHIP_AT32UC3B0 + select ARCH_HAVE_USART2 + +endmenu # AT32U3 Peripheral Selections + +if AVR32_USART0 + +choice + prompt "USART0 Function" + default AVR32_USART0_RS232 + +config AVR32_USART0_IRDA + bool "USART0 is IRDA" + +config AVR32_USART0_ISO786 + bool "USART0 is ISO786" + +config AVR32_USART0_MAN + bool "USART0 is Manchester" + +config AVR32_USART0_MODEM + bool "USART0 is Modem" + +config AVR32_USART0_RS232 + bool "USART0 is RS-232" + select USART0_ISUART + +config AVR32_USART0_RS485 + bool "USART0 is RS-485" + +config AVR32_USART0_SPI + bool "USART0 is SPI" + select SPI + +endchoice # USART0 Function +endif # AVR32_USART0 + +if AVR32_USART1 + +choice + prompt "USART1 Function" + default AVR32_USART1_RS232 + +config AVR32_USART1_IRDA + bool "USART1 is IRDA" + +config AVR32_USART1_ISO786 + bool "USART1 is ISO786" + +config AVR32_USART1_MAN + bool "USART1 is Manchester" + +config AVR32_USART1_MODEM + bool "USART1 is Modem" + +config AVR32_USART1_RS232 + bool "USART1 is RS-232" + select USART1_ISUART + +config AVR32_USART1_RS485 + bool "USART1 is RS-485" + +config AVR32_USART1_SPI + bool "USART1 is SPI" + select SPI + +endchoice # USART1 Function +endif # AVR32_USART1 + +if AVR32_USART2 + +choice + prompt "USART2 Function" + default AVR32_USART2_RS232 + +config AVR32_USART2_IRDA + bool "USART2 is IRDA" + +config AVR32_USART2_ISO786 + bool "USART2 is ISO786" + +config AVR32_USART2_MAN + bool "USART2 is Manchester" + +config AVR32_USART2_MODEM + bool "USART2 is Modem" + +config AVR32_USART2_RS232 + bool "USART2 is RS-232" + select USART2_ISUART + +config AVR32_USART2_RS485 + bool "USART2 is RS-485" + +config AVR32_USART2_SPI + bool "USART2 is SPI" + select SPI + +endchoice # USART2 Function +endif # AVR32_USART2 + +config AVR32_GPIOIRQ + bool "GPIO IRQ support" + default n + +if AVR32_GPIOIRQ + +config AVR32_GPIOIRQSETA + hex "GPIO IRQ set A" + default 0x0 + +config AVR32_GPIOIRQSETB + hex "GPIO IRQ set B" + default 0x0 + +endif # AVR32_GPIOIRQ +endif # ARCH_CHIP_AT32UC3 diff --git a/arch/avr/src/at90usb/Kconfig b/arch/avr/src/at90usb/Kconfig index 238e1cc07e..81a57a22d3 100644 --- a/arch/avr/src/at90usb/Kconfig +++ b/arch/avr/src/at90usb/Kconfig @@ -3,9 +3,35 @@ # see misc/tools/kconfig-language.txt. # -if ARCH_AT90USB +if ARCH_CHIP_AT90USB comment "AT90USB Configuration Options" +choice + prompt "Atmel ATmega chip selection" + default ARCH_CHIP_AT90USB646 + +config ARCH_CHIP_AT90USB646 + bool "AT90USB646" + ---help--- + Atmel AT90USB646 8-bit AVR. + +config ARCH_CHIP_AT90USB647 + bool "AT90USB647" + ---help--- + Atmel AT90USB647 8-bit AVR. + +config ARCH_CHIP_AT90USB1286 + bool "AT90USB1286" + ---help--- + Atmel AT90USB1286 8-bit AVR. + +config ARCH_CHIP_AT90USB1287 + bool "AT90USB1287" + ---help--- + Atmel AT90USB1287 8-bit AVR. + +endchoice # Atmel ATmega chip selection + menu "AT90USB Peripheral Selections" config AVR_SPI @@ -15,6 +41,7 @@ config AVR_SPI config AVR_USART1 bool "USART1" default n + select ARCH_HAVE_USART1 config AVR_USBDEV bool "USB device" @@ -32,4 +59,4 @@ config AVR_GPIOIRQ ---help--- Enable support for interrupting GPIO pins -endif +endif # ARCH_CHIP_AT90USB diff --git a/arch/avr/src/atmega/Kconfig b/arch/avr/src/atmega/Kconfig index 145b525df6..a976803d9c 100644 --- a/arch/avr/src/atmega/Kconfig +++ b/arch/avr/src/atmega/Kconfig @@ -3,8 +3,30 @@ # see misc/tools/kconfig-language.txt. # -if ARCH_ATMEGA +if ARCH_CHIP_ATMEGA comment "ATMega Configuration Options" +choice + prompt "Atmel ATmega chip selection" + default ARCH_CHIP_ATMEGA128 + +config ARCH_CHIP_ATMEGA128 + bool "ATMega128" + ---help--- + Atmel ATMega128 8-bit AVR. + +endchoice # ATMega Configuration Options + +menu "ATMega Peripheral Selections" + +config AVR_USART0 + bool "USART0" + select ARCH_HAVE_USART0 + +config AVR_USART1 + bool "USART1" + select ARCH_HAVE_USART1 + +endmenu # ATMega Peripheral Selections endif diff --git a/arch/avr/src/avr32/Kconfig b/arch/avr/src/avr32/Kconfig index 2e604cade4..5522edbd38 100644 --- a/arch/avr/src/avr32/Kconfig +++ b/arch/avr/src/avr32/Kconfig @@ -6,7 +6,13 @@ if ARCH_FAMILY_AVR32 comment "AVR32 Configuration Options" -# Note - no toolchain selection here as there is only one -# supported toolchain. +choice + prompt "Toolchain" + default AVR32_AVRTOOLSW if HOST_WINDOWS +config AVR32_AVRTOOLSW + bool "AVR tools for Windows" + depends on HOST_WINDOWS + +endchoice # Toolchain endif