aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/Kconfig
blob: 77f002e2ca8c67ec7c812ee9046071e6e4c0dbbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Kconfig settings for AVR processors

if MACH_AVR

config AVR_SELECT
    bool
    default y
    select HAVE_GPIO
    select HAVE_GPIO_ADC
    select HAVE_GPIO_SPI
    select HAVE_GPIO_HARD_PWM
    select HAVE_USER_INTERFACE
    select NO_UNSTEP_DELAY

config BOARD_DIRECTORY
    string
    default "avr"

choice
    prompt "Processor model"
    config MACH_atmega2560
        bool "atmega2560"
    config MACH_atmega1280
        bool "atmega1280"
    config MACH_at90usb1286
        bool "at90usb1286"
    config MACH_at90usb646
        bool "at90usb646"
    config MACH_atmega1284p
        bool "atmega1284p"
    config MACH_atmega644p
        bool "atmega644p"
    config MACH_atmega328
        bool "atmega328"
    config MACH_atmega168
        bool "atmega168"
endchoice

config MCU
    string
    default "atmega168" if MACH_atmega168
    default "atmega328" if MACH_atmega328
    default "atmega1284p" if MACH_atmega1284p
    default "atmega644p" if MACH_atmega644p
    default "at90usb1286" if MACH_at90usb1286
    default "at90usb646" if MACH_at90usb646
    default "atmega1280" if MACH_atmega1280
    default "atmega2560" if MACH_atmega2560

config AVRDUDE_PROTOCOL
    string
    default "wiring" if MACH_atmega2560
    default "avr109" if MACH_at90usb1286
    default "avr109" if MACH_at90usb646
    default "arduino"

choice
    prompt "Processor speed"
    config AVR_FREQ_20000000
        bool "20Mhz"
        depends on MACH_atmega168 || MACH_atmega328 || MACH_atmega644p || MACH_atmega1284p
    config AVR_FREQ_16000000
        bool "16Mhz"
    config AVR_FREQ_8000000
        bool "8Mhz"
endchoice

config CLOCK_FREQ
    int
    default 8000000 if AVR_FREQ_8000000
    default 16000000 if AVR_FREQ_16000000
    default 20000000 if AVR_FREQ_20000000

config CLEAR_PRESCALER
    bool "Manually clear the CPU prescaler field at startup"
    depends on MACH_at90usb1286 || MACH_at90usb646
    default y
    help
         Some AVR chips ship with a "clock prescaler" that causes the
         chip to run at 1/8th speed. Enable this setting to clear the
         prescaler field at startup which will cause the chip to run
         without a clock divisor.

config AVR_CLKPR
    int
    default 0 if CLEAR_PRESCALER
    default -1

config AVR_STACK_SIZE
    int
    default 256 if MACH_atmega2560
    default 128

config AVR_WATCHDOG
    bool
    default y
config AVR_USBSERIAL
    bool "Use USB for communication (instead of serial)"
    depends on MACH_at90usb1286 || MACH_at90usb646
    default y
config AVR_SERIAL
    depends on !AVR_USBSERIAL
    bool
    default y
config SERIAL_BAUD
    depends on AVR_SERIAL
    int "Baud rate for serial port"
    default 250000
config SERIAL_BAUD_U2X
    depends on AVR_SERIAL && !SIMULAVR
    bool
    default y

config SIMULAVR
    depends on MACH_atmega168 || MACH_atmega328 || MACH_atmega644p || MACH_atmega1284p
    bool "Compile for simulavr software emulation"
    default n
    help
         Compile the code to run on simulavr software emulation
         instead of for real hardware. This disables support for "U2X
         baud" mode and for the watchdog timer which are not supported
         on simulavr.

         If unsure, select "N".

endif