make/*: where needed, add apeos copyright lines
[apeos.git] / components / esptool_py / Kconfig.projbuild
blob84ca5d683188868308de3d64711b64e147d68ad8
1 menu "Serial flasher config"
3 config ESPTOOLPY_PORT
4         string "Default serial port"
5         default "/dev/ttyUSB0"
6         help
7                 The serial port that's connected to the ESP chip. This can be overridden by setting the ESPPORT
8                 environment variable.
10 choice ESPTOOLPY_BAUD
11         prompt "Default baud rate"
12         default ESPTOOLPY_BAUD_115200B
13         help
14                 Default baud rate to use while communicating with the ESP chip. Can be overridden by
15                 setting the ESPBAUD variable.
17 config ESPTOOLPY_BAUD_115200B
18         bool "115200 baud"
19 config ESPTOOLPY_BAUD_230400B
20         bool "230400 baud"
21 config ESPTOOLPY_BAUD_921600B
22         bool "921600 baud"
23 config ESPTOOLPY_BAUD_2MB
24         bool "2Mbaud"
25 config ESPTOOLPY_BAUD_OTHER
26     bool "Other baud rate"
27 endchoice
29 config ESPTOOLPY_BAUD_OTHER_VAL
30         int "Other baud rate value" if ESPTOOLPY_BAUD_OTHER
31         default 115200
33 config ESPTOOLPY_BAUD
34         int
35         default 115200 if ESPTOOLPY_BAUD_115200B
36         default 230400 if ESPTOOLPY_BAUD_230400B
37         default 921600 if ESPTOOLPY_BAUD_921600B
38         default 2000000 if ESPTOOLPY_BAUD_2MB
39         default ESPTOOLPY_BAUD_OTHER_VAL if ESPTOOLPY_BAUD_OTHER
41 config ESPTOOLPY_COMPRESSED
42         bool "Use compressed upload"
43         default "y"
44         help
45                 The flasher tool can send data compressed using zlib, letting the ROM on the ESP chip
46                 decompress it on the fly before flashing it. For most payloads, this should result in a
47                 speed increase.
49 choice FLASHMODE
50         prompt "Flash SPI mode"
51         default FLASHMODE_DIO
52         help
53                 Mode the flash chip is flashed in, as well as the default mode for the
54                 binary to run in.
56 config FLASHMODE_QIO
57         bool "QIO"
58 config FLASHMODE_QOUT
59         bool "QOUT"
60 config FLASHMODE_DIO
61         bool "DIO"
62 config FLASHMODE_DOUT
63         bool "DOUT"
64 endchoice
66 # Note: we use esptool.py to flash bootloader in
67 # dio mode for QIO/QOUT, bootloader then upgrades
68 # itself to quad mode during initialisation
69 config ESPTOOLPY_FLASHMODE
70         string
71         default "dio" if FLASHMODE_QIO
72         default "dio" if FLASHMODE_QOUT
73         default "dio" if FLASHMODE_DIO
74         default "dout" if FLASHMODE_DOUT
76 choice ESPTOOLPY_FLASHFREQ
77         prompt "Flash SPI speed"
78         default ESPTOOLPY_FLASHFREQ_40M
79         help
80                 The SPI flash frequency to be used.
82 config ESPTOOLPY_FLASHFREQ_80M
83         bool "80 MHz"
84 config ESPTOOLPY_FLASHFREQ_40M
85         bool "40 MHz"
86 config ESPTOOLPY_FLASHFREQ_26M
87         bool "26 MHz"
88 config ESPTOOLPY_FLASHFREQ_20M
89         bool "20 MHz"
90 endchoice
92 config ESPTOOLPY_FLASHFREQ
93         string
94         default "80m" if ESPTOOLPY_FLASHFREQ_80M
95         default "40m" if ESPTOOLPY_FLASHFREQ_40M
96         default "26m" if ESPTOOLPY_FLASHFREQ_26M
97         default "20m" if ESPTOOLPY_FLASHFREQ_20M
100 choice ESPTOOLPY_FLASHSIZE
101         prompt "Flash size"
102         default ESPTOOLPY_FLASHSIZE_2MB
103         help
104                 SPI flash size, in megabytes
106 config ESPTOOLPY_FLASHSIZE_1MB
107         bool "1 MB"
108 config ESPTOOLPY_FLASHSIZE_2MB
109         bool "2 MB"
110 config ESPTOOLPY_FLASHSIZE_4MB
111         bool "4 MB"
112 config ESPTOOLPY_FLASHSIZE_8MB
113         bool "8 MB"
114 config ESPTOOLPY_FLASHSIZE_16MB
115         bool "16 MB"
116 endchoice
118 config ESPTOOLPY_FLASHSIZE
119         string
120         default "1MB" if ESPTOOLPY_FLASHSIZE_1MB
121         default "2MB" if ESPTOOLPY_FLASHSIZE_2MB
122         default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
123         default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
124         default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
126 config ESPTOOLPY_FLASHSIZE_DETECT
127     bool "Detect flash size when flashing bootloader"
128     default y
129     help
130         If this option is set, 'make flash' targets will automatically detect
131         the flash size and update the bootloader image when flashing.
133 choice ESPTOOLPY_BEFORE
134     prompt "Before flashing"
135     default ESPTOOLPY_BEFORE_RESET
136     help
137         Configure whether esptool.py should reset the ESP32 before flashing.
139         Automatic resetting depends on the RTS & DTR signals being
140         wired from the serial port to the ESP32. Most USB development
141         boards do this internally.
143 config ESPTOOLPY_BEFORE_RESET
144     bool "Reset to bootloader"
145 config ESPTOOLPY_BEFORE_NORESET
146     bool "No reset"
147 endchoice
149 config ESPTOOLPY_BEFORE
150     string
151     default "default_reset" if ESPTOOLPY_BEFORE_RESET
152     default "no_reset" if ESPTOOLPY_BEFORE_NORESET
154 choice ESPTOOLPY_AFTER
155     prompt "After flashing"
156     default ESPTOOLPY_AFTER_RESET
157     help
158         Configure whether esptool.py should reset the ESP32 after flashing.
160         Automatic resetting depends on the RTS & DTR signals being
161         wired from the serial port to the ESP32. Most USB development
162         boards do this internally.
164 config ESPTOOLPY_AFTER_RESET
165     bool "Reset after flashing"
166 config ESPTOOLPY_AFTER_NORESET
167     bool "Stay in bootloader"
168 endchoice
170 config ESPTOOLPY_AFTER
171     string
172     default "hard_reset" if ESPTOOLPY_AFTER_RESET
173     default "no_reset" if ESPTOOLPY_AFTER_NORESET
175 choice MONITOR_BAUD
176     prompt "'make monitor' baud rate"
177     default MONITOR_BAUD_115200B
178     help
179         Baud rate to use when running 'make monitor' to view serial output
180         from a running chip.
182         Can override by setting the MONITORBAUD environment variable.
184 config MONITOR_BAUD_9600B
185     bool "9600 bps"
186 config MONITOR_BAUD_57600B
187     bool "57600 bps"
188 config MONITOR_BAUD_115200B
189     bool "115200 bps"
190 config MONITOR_BAUD_230400B
191     bool "230400 bps"
192 config MONITOR_BAUD_921600B
193     bool "921600 bps"
194 config MONITOR_BAUD_2MB
195     bool "2 Mbps"
196 config MONITOR_BAUD_OTHER
197     bool "Custom baud rate"
199 endchoice
201 config MONITOR_BAUD_OTHER_VAL
202     int "Custom baud rate value" if MONITOR_BAUD_OTHER
203     default 115200
205 config MONITOR_BAUD
206     int
207     default 9600 if MONITOR_BAUD_9600B
208     default 57600 if MONITOR_BAUD_57600B
209     default 115200 if MONITOR_BAUD_115200B
210     default 230400 if MONITOR_BAUD_230400B
211     default 921600 if MONITOR_BAUD_921600B
212     default 2000000 if MONITOR_BAUD_2MB
213     default MONITOR_BAUD_OTHER_VAL if MONITOR_BAUD_OTHER
215 endmenu