Kconfig.projbuild 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. menu "Serial flasher config"
  2. depends on !APP_BUILD_TYPE_PURE_RAM_APP
  3. config ESPTOOLPY_NO_STUB
  4. bool "Disable download stub"
  5. default "y" if IDF_ENV_FPGA || IDF_ENV_BRINGUP
  6. default "n"
  7. help
  8. The flasher tool sends a precompiled download stub first by default. That stub allows things
  9. like compressed downloads and more. Usually you should not need to disable that feature
  10. config ESPTOOLPY_OCT_FLASH
  11. depends on IDF_TARGET_ESP32S3
  12. bool "Enable Octal Flash"
  13. default n
  14. config ESPTOOLPY_FLASH_MODE_AUTO_DETECT
  15. depends on IDF_TARGET_ESP32S3
  16. bool "Choose flash mode automatically (please read help)"
  17. default y
  18. help
  19. This config option helps decide whether flash is Quad or Octal, but please note some limitations:
  20. 1. If the flash chip is an Octal one, even if one of "QIO", "QOUT", "DIO", "DOUT" options is
  21. selected in `ESPTOOLPY_FLASHMODE`, our code will automatically change the
  22. mode to "OPI" and the sample mode will be STR.
  23. 2. If the flash chip is a Quad one, even if "OPI" is selected in `ESPTOOLPY_FLASHMODE`, our code will
  24. automatically change the mode to "DIO".
  25. 3. This option is mainly to improve the out-of-box experience of developers. It doesn't guarantee
  26. the feature-complete. Some code still rely on `ESPTOOLPY_OCT_FLASH`. Please do not rely on this option
  27. when you are pretty sure that you are using Octal flash.
  28. In this case, please enable `ESPTOOLPY_OCT_FLASH` option, then you can choose `DTR` sample mode
  29. in `ESPTOOLPY_FLASH_SAMPLE_MODE`. Otherwise, only `STR` mode is available.
  30. 4. Enabling this feature reduces available internal RAM size (around 900 bytes).
  31. If your IRAM space is insufficient and you're aware of your flash type,
  32. disable this option and select corresponding flash type options.
  33. choice ESPTOOLPY_FLASHMODE
  34. prompt "Flash SPI mode"
  35. default ESPTOOLPY_FLASHMODE_DIO
  36. default ESPTOOLPY_FLASHMODE_OPI if ESPTOOLPY_OCT_FLASH
  37. help
  38. Mode the flash chip is flashed in, as well as the default mode for the
  39. binary to run in.
  40. config ESPTOOLPY_FLASHMODE_QIO
  41. depends on !ESPTOOLPY_OCT_FLASH
  42. bool "QIO"
  43. config ESPTOOLPY_FLASHMODE_QOUT
  44. depends on !ESPTOOLPY_OCT_FLASH
  45. bool "QOUT"
  46. config ESPTOOLPY_FLASHMODE_DIO
  47. depends on !ESPTOOLPY_OCT_FLASH
  48. bool "DIO"
  49. config ESPTOOLPY_FLASHMODE_DOUT
  50. depends on !ESPTOOLPY_OCT_FLASH
  51. bool "DOUT"
  52. config ESPTOOLPY_FLASHMODE_OPI
  53. depends on ESPTOOLPY_OCT_FLASH
  54. bool "OPI"
  55. endchoice
  56. choice ESPTOOLPY_FLASH_SAMPLE_MODE
  57. prompt "Flash Sampling Mode"
  58. default ESPTOOLPY_FLASH_SAMPLE_MODE_DTR if ESPTOOLPY_OCT_FLASH
  59. default ESPTOOLPY_FLASH_SAMPLE_MODE_STR if !ESPTOOLPY_OCT_FLASH
  60. config ESPTOOLPY_FLASH_SAMPLE_MODE_STR
  61. bool "STR Mode"
  62. config ESPTOOLPY_FLASH_SAMPLE_MODE_DTR
  63. depends on ESPTOOLPY_OCT_FLASH
  64. bool "DTR Mode"
  65. 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 ESPTOOLPY_FLASHMODE_QIO
  72. default "dio" if ESPTOOLPY_FLASHMODE_QOUT
  73. default "dio" if ESPTOOLPY_FLASHMODE_DIO
  74. default "dout" if ESPTOOLPY_FLASHMODE_DOUT
  75. # The 1st and 2nd bootloader doesn't support opi mode,
  76. # using fastrd instead. For now the ESPTOOL doesn't support
  77. # fasted (see ESPTOOL-274), using dout instead. In ROM the flash mode
  78. # information get from efuse, so don't care this dout choice.
  79. default "dout" if ESPTOOLPY_FLASHMODE_OPI
  80. choice ESPTOOLPY_FLASHFREQ
  81. prompt "Flash SPI speed"
  82. default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32
  83. default ESPTOOLPY_FLASHFREQ_80M if ESPTOOLPY_FLASHFREQ_80M_DEFAULT
  84. default ESPTOOLPY_FLASHFREQ_60M if IDF_TARGET_ESP32C2
  85. config ESPTOOLPY_FLASHFREQ_120M
  86. bool "120 MHz (READ DOCS FIRST)"
  87. depends on SOC_MEMSPI_SRC_FREQ_120M && \
  88. (SPI_FLASH_HPM_ON || ESPTOOLPY_OCT_FLASH) && \
  89. (ESPTOOLPY_FLASH_SAMPLE_MODE_STR || IDF_EXPERIMENTAL_FEATURES)
  90. help
  91. - Optional feature for QSPI Flash. Read docs and enable `CONFIG_SPI_FLASH_HPM_ENA` first!
  92. - Flash 120 MHz SDR mode is stable.
  93. - Flash 120 MHz DDR mode is an experimental feature, it works when
  94. the temperature is stable.
  95. Risks:
  96. If your chip powers on at a certain temperature, then after the temperature
  97. increases or decreases by approximately 20 Celsius degrees (depending on the
  98. chip), the program will crash randomly.
  99. config ESPTOOLPY_FLASHFREQ_80M
  100. bool "80 MHz"
  101. depends on SOC_MEMSPI_SRC_FREQ_80M_SUPPORTED
  102. config ESPTOOLPY_FLASHFREQ_64M
  103. bool "64 MHz"
  104. depends on SOC_MEMSPI_SRC_FREQ_64M_SUPPORTED
  105. config ESPTOOLPY_FLASHFREQ_60M
  106. bool "60 MHz"
  107. depends on SOC_MEMSPI_SRC_FREQ_60M_SUPPORTED
  108. config ESPTOOLPY_FLASHFREQ_48M
  109. bool "48 MHz"
  110. depends on SOC_MEMSPI_SRC_FREQ_48M_SUPPORTED
  111. config ESPTOOLPY_FLASHFREQ_40M
  112. bool "40 MHz"
  113. depends on SOC_MEMSPI_SRC_FREQ_40M_SUPPORTED
  114. config ESPTOOLPY_FLASHFREQ_32M
  115. bool "32 MHz"
  116. depends on SOC_MEMSPI_SRC_FREQ_32M_SUPPORTED
  117. config ESPTOOLPY_FLASHFREQ_30M
  118. bool "30 MHz"
  119. depends on SOC_MEMSPI_SRC_FREQ_30M_SUPPORTED
  120. config ESPTOOLPY_FLASHFREQ_26M
  121. bool "26 MHz"
  122. depends on SOC_MEMSPI_SRC_FREQ_26M_SUPPORTED
  123. config ESPTOOLPY_FLASHFREQ_24M
  124. bool "24 MHz"
  125. depends on SOC_MEMSPI_SRC_FREQ_24M_SUPPORTED
  126. config ESPTOOLPY_FLASHFREQ_20M
  127. bool "20 MHz"
  128. depends on SOC_MEMSPI_SRC_FREQ_20M_SUPPORTED
  129. config ESPTOOLPY_FLASHFREQ_16M
  130. bool "16 MHz"
  131. depends on SOC_MEMSPI_SRC_FREQ_16M_SUPPORTED
  132. config ESPTOOLPY_FLASHFREQ_15M
  133. bool "15 MHz"
  134. depends on SOC_MEMSPI_SRC_FREQ_15M_SUPPORTED
  135. endchoice
  136. config ESPTOOLPY_FLASHFREQ_80M_DEFAULT
  137. bool
  138. default y if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6
  139. help
  140. This is an invisible item, used to define the targets that defaults to use 80MHz Flash SPI speed.
  141. config ESPTOOLPY_FLASHFREQ
  142. string
  143. # On some of the ESP chips, max boot frequency would be equal to (or even lower than) 80m.
  144. # We currently define this to `80m`.
  145. default '80m' if ESPTOOLPY_FLASHFREQ_120M
  146. default '80m' if ESPTOOLPY_FLASHFREQ_80M
  147. default '60m' if ESPTOOLPY_FLASHFREQ_60M
  148. default '48m' if ESPTOOLPY_FLASHFREQ_64M # For 0xf in esptool
  149. default '48m' if ESPTOOLPY_FLASHFREQ_48M
  150. default '24m' if ESPTOOLPY_FLASHFREQ_32M # For 0x0 in esptool
  151. default '30m' if ESPTOOLPY_FLASHFREQ_30M
  152. default '24m' if ESPTOOLPY_FLASHFREQ_24M
  153. default '40m' if ESPTOOLPY_FLASHFREQ_40M
  154. default '26m' if ESPTOOLPY_FLASHFREQ_26M
  155. default '20m' if ESPTOOLPY_FLASHFREQ_20M
  156. default '12m' if ESPTOOLPY_FLASHFREQ_16M # For 0x2 in esptool
  157. default '20m' # if no clock can match in bin headers, go with minimal.
  158. choice ESPTOOLPY_FLASHSIZE
  159. prompt "Flash size"
  160. default ESPTOOLPY_FLASHSIZE_2MB
  161. help
  162. SPI flash size, in megabytes
  163. config ESPTOOLPY_FLASHSIZE_1MB
  164. bool "1 MB"
  165. config ESPTOOLPY_FLASHSIZE_2MB
  166. bool "2 MB"
  167. config ESPTOOLPY_FLASHSIZE_4MB
  168. bool "4 MB"
  169. config ESPTOOLPY_FLASHSIZE_8MB
  170. bool "8 MB"
  171. config ESPTOOLPY_FLASHSIZE_16MB
  172. bool "16 MB"
  173. config ESPTOOLPY_FLASHSIZE_32MB
  174. bool "32 MB"
  175. config ESPTOOLPY_FLASHSIZE_64MB
  176. bool "64 MB"
  177. config ESPTOOLPY_FLASHSIZE_128MB
  178. bool "128 MB"
  179. endchoice
  180. config ESPTOOLPY_FLASHSIZE
  181. string
  182. default "1MB" if ESPTOOLPY_FLASHSIZE_1MB
  183. default "2MB" if ESPTOOLPY_FLASHSIZE_2MB
  184. default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
  185. default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
  186. default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
  187. default "32MB" if ESPTOOLPY_FLASHSIZE_32MB
  188. default "64MB" if ESPTOOLPY_FLASHSIZE_64MB
  189. default "128MB" if ESPTOOLPY_FLASHSIZE_128MB
  190. config ESPTOOLPY_HEADER_FLASHSIZE_UPDATE
  191. bool "Detect flash size when flashing bootloader"
  192. default n
  193. help
  194. If this option is set, flashing the project will automatically detect
  195. the flash size of the target chip and update the bootloader image
  196. before it is flashed.
  197. Enabling this option turns off the image protection against corruption
  198. by a SHA256 digest. Updating the bootloader image before flashing would
  199. invalidate the digest.
  200. choice ESPTOOLPY_BEFORE
  201. prompt "Before flashing"
  202. default ESPTOOLPY_BEFORE_RESET
  203. help
  204. Configure whether esptool.py should reset the ESP32 before flashing.
  205. Automatic resetting depends on the RTS & DTR signals being
  206. wired from the serial port to the ESP32. Most USB development
  207. boards do this internally.
  208. config ESPTOOLPY_BEFORE_RESET
  209. bool "Reset to bootloader"
  210. config ESPTOOLPY_BEFORE_NORESET
  211. bool "No reset"
  212. endchoice
  213. config ESPTOOLPY_BEFORE
  214. string
  215. default "default_reset" if ESPTOOLPY_BEFORE_RESET
  216. default "no_reset" if ESPTOOLPY_BEFORE_NORESET
  217. choice ESPTOOLPY_AFTER
  218. prompt "After flashing"
  219. default ESPTOOLPY_AFTER_RESET
  220. help
  221. Configure whether esptool.py should reset the ESP32 after flashing.
  222. Automatic resetting depends on the RTS & DTR signals being
  223. wired from the serial port to the ESP32. Most USB development
  224. boards do this internally.
  225. config ESPTOOLPY_AFTER_RESET
  226. bool "Reset after flashing"
  227. config ESPTOOLPY_AFTER_NORESET
  228. bool "Stay in bootloader"
  229. endchoice
  230. config ESPTOOLPY_AFTER
  231. string
  232. default "hard_reset" if ESPTOOLPY_AFTER_RESET
  233. default "no_reset" if ESPTOOLPY_AFTER_NORESET
  234. config ESPTOOLPY_MONITOR_BAUD
  235. int
  236. default ESP_CONSOLE_UART_BAUDRATE if ESP_CONSOLE_UART
  237. default 115200 if !ESP_CONSOLE_UART
  238. endmenu