Kconfig.projbuild 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. menu "Serial flasher config"
  2. config ESPTOOLPY_PORT
  3. string "Default serial port"
  4. depends on !IDF_CMAKE
  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.
  9. This value is ignored when using the CMake-based build system or idf.py.
  10. choice ESPTOOLPY_BAUD
  11. prompt "Default baud rate"
  12. depends on !IDF_CMAKE
  13. default ESPTOOLPY_BAUD_115200B
  14. help
  15. Default baud rate to use while communicating with the ESP chip. Can be overridden by
  16. setting the ESPBAUD variable.
  17. This value is ignored when using the CMake-based build system or idf.py.
  18. config ESPTOOLPY_BAUD_115200B
  19. bool "115200 baud"
  20. config ESPTOOLPY_BAUD_230400B
  21. bool "230400 baud"
  22. config ESPTOOLPY_BAUD_921600B
  23. bool "921600 baud"
  24. config ESPTOOLPY_BAUD_2MB
  25. bool "2Mbaud"
  26. config ESPTOOLPY_BAUD_OTHER
  27. bool "Other baud rate"
  28. endchoice
  29. config ESPTOOLPY_BAUD_OTHER_VAL
  30. int "Other baud rate value" if ESPTOOLPY_BAUD_OTHER
  31. default 115200
  32. config ESPTOOLPY_BAUD
  33. int
  34. depends on !IDF_CMAKE
  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
  40. config ESPTOOLPY_COMPRESSED
  41. bool "Use compressed upload"
  42. depends on !IDF_CMAKE
  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.
  48. config ESPTOOLPY_NO_STUB
  49. bool "Disable download stub"
  50. default "n"
  51. help
  52. The flasher tool sends a precompiled download stub first by default. That stub allows things
  53. like compressed downloads and more. Usually you should not need to disable that feature
  54. config ESPTOOLPY_OCT_FLASH
  55. depends on IDF_TARGET_ESP32S3
  56. bool "Enable Octal Flash"
  57. default n
  58. choice ESPTOOLPY_FLASHMODE
  59. prompt "Flash SPI mode"
  60. default ESPTOOLPY_FLASHMODE_DIO
  61. default ESPTOOLPY_FLASHMODE_OPI if ESPTOOLPY_OCT_FLASH
  62. help
  63. Mode the flash chip is flashed in, as well as the default mode for the
  64. binary to run in.
  65. config ESPTOOLPY_FLASHMODE_QIO
  66. depends on !ESPTOOLPY_OCT_FLASH
  67. bool "QIO"
  68. config ESPTOOLPY_FLASHMODE_QOUT
  69. depends on !ESPTOOLPY_OCT_FLASH
  70. bool "QOUT"
  71. config ESPTOOLPY_FLASHMODE_DIO
  72. depends on !ESPTOOLPY_OCT_FLASH
  73. bool "DIO"
  74. config ESPTOOLPY_FLASHMODE_DOUT
  75. depends on !ESPTOOLPY_OCT_FLASH
  76. bool "DOUT"
  77. config ESPTOOLPY_FLASHMODE_OPI
  78. depends on ESPTOOLPY_OCT_FLASH
  79. bool "OPI"
  80. endchoice
  81. choice ESPTOOLPY_FLASH_SAMPLE_MODE
  82. prompt "Flash Sampling Mode"
  83. default ESPTOOLPY_FLASH_SAMPLE_MODE_DTR if ESPTOOLPY_OCT_FLASH
  84. default ESPTOOLPY_FLASH_SAMPLE_MODE_STR if !ESPTOOLPY_OCT_FLASH
  85. config ESPTOOLPY_FLASH_SAMPLE_MODE_STR
  86. bool "STR Mode"
  87. config ESPTOOLPY_FLASH_SAMPLE_MODE_DTR
  88. depends on ESPTOOLPY_OCT_FLASH
  89. bool "DTR Mode"
  90. endchoice
  91. # Note: we use esptool.py to flash bootloader in
  92. # dio mode for QIO/QOUT, bootloader then upgrades
  93. # itself to quad mode during initialisation
  94. config ESPTOOLPY_FLASHMODE
  95. string
  96. default "dio" if ESPTOOLPY_FLASHMODE_QIO
  97. default "dio" if ESPTOOLPY_FLASHMODE_QOUT
  98. default "dio" if ESPTOOLPY_FLASHMODE_DIO
  99. default "dout" if ESPTOOLPY_FLASHMODE_DOUT
  100. # The 1st and 2nd bootloader doesn't support opi mode,
  101. # using fastrd instead. For now the ESPTOOL doesn't support
  102. # fasted (see ESPTOOL-274), using dout instead. In ROM the flash mode
  103. # information get from efuse, so don't care this dout choice.
  104. default "dout" if ESPTOOLPY_FLASHMODE_OPI
  105. choice ESPTOOLPY_FLASHFREQ
  106. prompt "Flash SPI speed"
  107. default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32 || IDF_TARGET_ESP32H2
  108. default ESPTOOLPY_FLASHFREQ_80M
  109. help
  110. The SPI flash frequency to be used.
  111. config ESPTOOLPY_FLASHFREQ_120M
  112. depends on IDF_TARGET_ESP32S3 && ESPTOOLPY_FLASH_SAMPLE_MODE_STR
  113. bool "120 MHz"
  114. config ESPTOOLPY_FLASHFREQ_80M
  115. bool "80 MHz"
  116. config ESPTOOLPY_FLASHFREQ_40M
  117. bool "40 MHz"
  118. config ESPTOOLPY_FLASHFREQ_26M
  119. bool "26 MHz"
  120. depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3
  121. config ESPTOOLPY_FLASHFREQ_20M
  122. bool "20 MHz"
  123. endchoice
  124. config ESPTOOLPY_FLASHFREQ
  125. string
  126. # On some of the ESP chips, max boot frequency would be equal to (or even lower than) 80m.
  127. # We currently define this to `80m`.
  128. default "80m" if ESPTOOLPY_FLASHFREQ_120M
  129. default "80m" if ESPTOOLPY_FLASHFREQ_80M
  130. default "40m" if ESPTOOLPY_FLASHFREQ_40M
  131. default "26m" if ESPTOOLPY_FLASHFREQ_26M
  132. default "20m" if ESPTOOLPY_FLASHFREQ_20M
  133. choice ESPTOOLPY_FLASHSIZE
  134. prompt "Flash size"
  135. default ESPTOOLPY_FLASHSIZE_2MB
  136. help
  137. SPI flash size, in megabytes
  138. config ESPTOOLPY_FLASHSIZE_1MB
  139. bool "1 MB"
  140. config ESPTOOLPY_FLASHSIZE_2MB
  141. bool "2 MB"
  142. config ESPTOOLPY_FLASHSIZE_4MB
  143. bool "4 MB"
  144. config ESPTOOLPY_FLASHSIZE_8MB
  145. bool "8 MB"
  146. config ESPTOOLPY_FLASHSIZE_16MB
  147. bool "16 MB"
  148. endchoice
  149. config ESPTOOLPY_FLASHSIZE
  150. string
  151. default "1MB" if ESPTOOLPY_FLASHSIZE_1MB
  152. default "2MB" if ESPTOOLPY_FLASHSIZE_2MB
  153. default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
  154. default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
  155. default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
  156. config ESPTOOLPY_FLASHSIZE_DETECT
  157. bool "Detect flash size when flashing bootloader"
  158. default y
  159. help
  160. If this option is set, flashing the project will automatically detect
  161. the flash size of the target chip and update the bootloader image
  162. before it is flashed.
  163. choice ESPTOOLPY_BEFORE
  164. prompt "Before flashing"
  165. default ESPTOOLPY_BEFORE_RESET
  166. help
  167. Configure whether esptool.py should reset the ESP32 before flashing.
  168. Automatic resetting depends on the RTS & DTR signals being
  169. wired from the serial port to the ESP32. Most USB development
  170. boards do this internally.
  171. config ESPTOOLPY_BEFORE_RESET
  172. bool "Reset to bootloader"
  173. config ESPTOOLPY_BEFORE_NORESET
  174. bool "No reset"
  175. endchoice
  176. config ESPTOOLPY_BEFORE
  177. string
  178. default "default_reset" if ESPTOOLPY_BEFORE_RESET
  179. default "no_reset" if ESPTOOLPY_BEFORE_NORESET
  180. choice ESPTOOLPY_AFTER
  181. prompt "After flashing"
  182. default ESPTOOLPY_AFTER_RESET
  183. help
  184. Configure whether esptool.py should reset the ESP32 after flashing.
  185. Automatic resetting depends on the RTS & DTR signals being
  186. wired from the serial port to the ESP32. Most USB development
  187. boards do this internally.
  188. config ESPTOOLPY_AFTER_RESET
  189. bool "Reset after flashing"
  190. config ESPTOOLPY_AFTER_NORESET
  191. bool "Stay in bootloader"
  192. endchoice
  193. config ESPTOOLPY_AFTER
  194. string
  195. default "hard_reset" if ESPTOOLPY_AFTER_RESET
  196. default "no_reset" if ESPTOOLPY_AFTER_NORESET
  197. choice ESPTOOLPY_MONITOR_BAUD
  198. prompt "'idf.py monitor' baud rate"
  199. default ESPTOOLPY_MONITOR_BAUD_115200B
  200. help
  201. Baud rate to use when running 'idf.py monitor' or 'make monitor'
  202. to view serial output from a running chip.
  203. If "Same as UART Console baud rate" is chosen then the value will
  204. follow the "UART Console baud rate" config item.
  205. Can override by setting the MONITORBAUD environment variable.
  206. config ESPTOOLPY_MONITOR_BAUD_CONSOLE
  207. bool "Same as UART console baud rate"
  208. config ESPTOOLPY_MONITOR_BAUD_9600B
  209. bool "9600 bps"
  210. config ESPTOOLPY_MONITOR_BAUD_57600B
  211. bool "57600 bps"
  212. config ESPTOOLPY_MONITOR_BAUD_115200B
  213. bool "115200 bps"
  214. config ESPTOOLPY_MONITOR_BAUD_230400B
  215. bool "230400 bps"
  216. config ESPTOOLPY_MONITOR_BAUD_921600B
  217. bool "921600 bps"
  218. config ESPTOOLPY_MONITOR_BAUD_2MB
  219. bool "2 Mbps"
  220. config ESPTOOLPY_MONITOR_BAUD_OTHER
  221. bool "Custom baud rate"
  222. endchoice
  223. config ESPTOOLPY_MONITOR_BAUD_OTHER_VAL
  224. int "Custom baud rate value" if ESPTOOLPY_MONITOR_BAUD_OTHER
  225. default 115200
  226. config ESPTOOLPY_MONITOR_BAUD
  227. int
  228. default ESP_CONSOLE_UART_BAUDRATE if ESPTOOLPY_MONITOR_BAUD_CONSOLE
  229. default 9600 if ESPTOOLPY_MONITOR_BAUD_9600B
  230. default 57600 if ESPTOOLPY_MONITOR_BAUD_57600B
  231. default 115200 if ESPTOOLPY_MONITOR_BAUD_115200B
  232. default 230400 if ESPTOOLPY_MONITOR_BAUD_230400B
  233. default 921600 if ESPTOOLPY_MONITOR_BAUD_921600B
  234. default 2000000 if ESPTOOLPY_MONITOR_BAUD_2MB
  235. default ESPTOOLPY_MONITOR_BAUD_OTHER_VAL if ESPTOOLPY_MONITOR_BAUD_OTHER
  236. endmenu