Kconfig.projbuild 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. menu "Serial flasher config"
  2. config ESPTOOLPY_NO_STUB
  3. bool "Disable download stub"
  4. default "y" if IDF_ENV_FPGA
  5. default "n"
  6. help
  7. The flasher tool sends a precompiled download stub first by default. That stub allows things
  8. like compressed downloads and more. Usually you should not need to disable that feature
  9. config ESPTOOLPY_OCT_FLASH
  10. depends on IDF_TARGET_ESP32S3
  11. bool "Enable Octal Flash"
  12. default n
  13. choice ESPTOOLPY_FLASHMODE
  14. prompt "Flash SPI mode"
  15. default ESPTOOLPY_FLASHMODE_DIO
  16. default ESPTOOLPY_FLASHMODE_OPI if ESPTOOLPY_OCT_FLASH
  17. help
  18. Mode the flash chip is flashed in, as well as the default mode for the
  19. binary to run in.
  20. config ESPTOOLPY_FLASHMODE_QIO
  21. depends on !ESPTOOLPY_OCT_FLASH
  22. bool "QIO"
  23. config ESPTOOLPY_FLASHMODE_QOUT
  24. depends on !ESPTOOLPY_OCT_FLASH
  25. bool "QOUT"
  26. config ESPTOOLPY_FLASHMODE_DIO
  27. depends on !ESPTOOLPY_OCT_FLASH
  28. bool "DIO"
  29. config ESPTOOLPY_FLASHMODE_DOUT
  30. depends on !ESPTOOLPY_OCT_FLASH
  31. bool "DOUT"
  32. config ESPTOOLPY_FLASHMODE_OPI
  33. depends on ESPTOOLPY_OCT_FLASH
  34. bool "OPI"
  35. endchoice
  36. choice ESPTOOLPY_FLASH_SAMPLE_MODE
  37. prompt "Flash Sampling Mode"
  38. default ESPTOOLPY_FLASH_SAMPLE_MODE_DTR if ESPTOOLPY_OCT_FLASH
  39. default ESPTOOLPY_FLASH_SAMPLE_MODE_STR if !ESPTOOLPY_OCT_FLASH
  40. config ESPTOOLPY_FLASH_SAMPLE_MODE_STR
  41. bool "STR Mode"
  42. config ESPTOOLPY_FLASH_SAMPLE_MODE_DTR
  43. depends on ESPTOOLPY_OCT_FLASH
  44. bool "DTR Mode"
  45. endchoice
  46. # Note: we use esptool.py to flash bootloader in
  47. # dio mode for QIO/QOUT, bootloader then upgrades
  48. # itself to quad mode during initialisation
  49. config ESPTOOLPY_FLASHMODE
  50. string
  51. default "dio" if ESPTOOLPY_FLASHMODE_QIO
  52. default "dio" if ESPTOOLPY_FLASHMODE_QOUT
  53. default "dio" if ESPTOOLPY_FLASHMODE_DIO
  54. default "dout" if ESPTOOLPY_FLASHMODE_DOUT
  55. # The 1st and 2nd bootloader doesn't support opi mode,
  56. # using fastrd instead. For now the ESPTOOL doesn't support
  57. # fasted (see ESPTOOL-274), using dout instead. In ROM the flash mode
  58. # information get from efuse, so don't care this dout choice.
  59. default "dout" if ESPTOOLPY_FLASHMODE_OPI
  60. choice ESPTOOLPY_FLASHFREQ
  61. prompt "Flash SPI speed"
  62. default ESPTOOLPY_FLASHFREQ_40M if IDF_TARGET_ESP32
  63. default ESPTOOLPY_FLASHFREQ_80M if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
  64. default ESPTOOLPY_FLASHFREQ_60M if IDF_TARGET_ESP32C2
  65. default ESPTOOLPY_FLASHFREQ_48M if IDF_TARGET_ESP32H2
  66. config ESPTOOLPY_FLASHFREQ_120M
  67. bool "120 MHz"
  68. select SPI_FLASH_HPM_ENABLE
  69. depends on SOC_MEMSPI_SRC_FREQ_120M && ESPTOOLPY_FLASH_SAMPLE_MODE_STR
  70. config ESPTOOLPY_FLASHFREQ_80M
  71. bool "80 MHz"
  72. depends on SOC_MEMSPI_SRC_FREQ_80M_SUPPORTED
  73. config ESPTOOLPY_FLASHFREQ_60M
  74. bool "60 MHz"
  75. depends on SOC_MEMSPI_SRC_FREQ_60M_SUPPORTED
  76. config ESPTOOLPY_FLASHFREQ_48M
  77. bool "48 MHz"
  78. depends on SOC_MEMSPI_SRC_FREQ_48M_SUPPORTED
  79. config ESPTOOLPY_FLASHFREQ_40M
  80. bool "40 MHz"
  81. depends on SOC_MEMSPI_SRC_FREQ_40M_SUPPORTED
  82. config ESPTOOLPY_FLASHFREQ_30M
  83. bool "30 MHz"
  84. depends on SOC_MEMSPI_SRC_FREQ_30M_SUPPORTED
  85. config ESPTOOLPY_FLASHFREQ_26M
  86. bool "26 MHz"
  87. depends on SOC_MEMSPI_SRC_FREQ_26M_SUPPORTED
  88. config ESPTOOLPY_FLASHFREQ_24M
  89. bool "24 MHz"
  90. depends on SOC_MEMSPI_SRC_FREQ_24M_SUPPORTED
  91. config ESPTOOLPY_FLASHFREQ_20M
  92. bool "20 MHz"
  93. depends on SOC_MEMSPI_SRC_FREQ_20M_SUPPORTED
  94. config ESPTOOLPY_FLASHFREQ_15M
  95. bool "15 MHz"
  96. depends on SOC_MEMSPI_SRC_FREQ_15M_SUPPORTED
  97. endchoice
  98. config ESPTOOLPY_FLASHFREQ
  99. string
  100. # On some of the ESP chips, max boot frequency would be equal to (or even lower than) 80m.
  101. # We currently define this to `80m`.
  102. default '80m' if ESPTOOLPY_FLASHFREQ_120M
  103. default '80m' if ESPTOOLPY_FLASHFREQ_80M
  104. default '60m' if ESPTOOLPY_FLASHFREQ_60M
  105. default '48m' if ESPTOOLPY_FLASHFREQ_48M
  106. default '30m' if ESPTOOLPY_FLASHFREQ_30M
  107. default '24m' if ESPTOOLPY_FLASHFREQ_24M
  108. default '40m' if ESPTOOLPY_FLASHFREQ_40M
  109. default '26m' if ESPTOOLPY_FLASHFREQ_26M
  110. default '20m' if ESPTOOLPY_FLASHFREQ_20M
  111. default '20m' # if no clock can match in bin headers, go with minimal.
  112. choice ESPTOOLPY_FLASHSIZE
  113. prompt "Flash size"
  114. default ESPTOOLPY_FLASHSIZE_2MB
  115. help
  116. SPI flash size, in megabytes
  117. config ESPTOOLPY_FLASHSIZE_1MB
  118. bool "1 MB"
  119. config ESPTOOLPY_FLASHSIZE_2MB
  120. bool "2 MB"
  121. config ESPTOOLPY_FLASHSIZE_4MB
  122. bool "4 MB"
  123. config ESPTOOLPY_FLASHSIZE_8MB
  124. bool "8 MB"
  125. config ESPTOOLPY_FLASHSIZE_16MB
  126. bool "16 MB"
  127. config ESPTOOLPY_FLASHSIZE_32MB
  128. bool "32 MB"
  129. config ESPTOOLPY_FLASHSIZE_64MB
  130. bool "64 MB"
  131. config ESPTOOLPY_FLASHSIZE_128MB
  132. bool "128 MB"
  133. endchoice
  134. config ESPTOOLPY_FLASHSIZE
  135. string
  136. default "1MB" if ESPTOOLPY_FLASHSIZE_1MB
  137. default "2MB" if ESPTOOLPY_FLASHSIZE_2MB
  138. default "4MB" if ESPTOOLPY_FLASHSIZE_4MB
  139. default "8MB" if ESPTOOLPY_FLASHSIZE_8MB
  140. default "16MB" if ESPTOOLPY_FLASHSIZE_16MB
  141. default "32MB" if ESPTOOLPY_FLASHSIZE_32MB
  142. default "64MB" if ESPTOOLPY_FLASHSIZE_64MB
  143. default "128MB" if ESPTOOLPY_FLASHSIZE_128MB
  144. config ESPTOOLPY_HEADER_FLASHSIZE_UPDATE
  145. bool "Detect flash size when flashing bootloader"
  146. default n
  147. help
  148. If this option is set, flashing the project will automatically detect
  149. the flash size of the target chip and update the bootloader image
  150. before it is flashed.
  151. Enabling this option turns off the image protection against corruption
  152. by a SHA256 digest. Updating the bootloader image before flashing would
  153. invalidate the digest.
  154. choice ESPTOOLPY_BEFORE
  155. prompt "Before flashing"
  156. default ESPTOOLPY_BEFORE_RESET
  157. help
  158. Configure whether esptool.py should reset the ESP32 before flashing.
  159. Automatic resetting depends on the RTS & DTR signals being
  160. wired from the serial port to the ESP32. Most USB development
  161. boards do this internally.
  162. config ESPTOOLPY_BEFORE_RESET
  163. bool "Reset to bootloader"
  164. config ESPTOOLPY_BEFORE_NORESET
  165. bool "No reset"
  166. endchoice
  167. config ESPTOOLPY_BEFORE
  168. string
  169. default "default_reset" if ESPTOOLPY_BEFORE_RESET
  170. default "no_reset" if ESPTOOLPY_BEFORE_NORESET
  171. choice ESPTOOLPY_AFTER
  172. prompt "After flashing"
  173. default ESPTOOLPY_AFTER_RESET
  174. help
  175. Configure whether esptool.py should reset the ESP32 after flashing.
  176. Automatic resetting depends on the RTS & DTR signals being
  177. wired from the serial port to the ESP32. Most USB development
  178. boards do this internally.
  179. config ESPTOOLPY_AFTER_RESET
  180. bool "Reset after flashing"
  181. config ESPTOOLPY_AFTER_NORESET
  182. bool "Stay in bootloader"
  183. endchoice
  184. config ESPTOOLPY_AFTER
  185. string
  186. default "hard_reset" if ESPTOOLPY_AFTER_RESET
  187. default "no_reset" if ESPTOOLPY_AFTER_NORESET
  188. config ESPTOOLPY_MONITOR_BAUD
  189. int
  190. default ESP_CONSOLE_UART_BAUDRATE if ESP_CONSOLE_UART
  191. default 115200 if !ESP_CONSOLE_UART
  192. endmenu