Kconfig 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. menu "Common ESP-related"
  2. config ESP_ERR_TO_NAME_LOOKUP
  3. bool "Enable lookup of error code strings"
  4. default "y"
  5. help
  6. Functions esp_err_to_name() and esp_err_to_name_r() return string representations of error codes from a
  7. pre-generated lookup table. This option can be used to turn off the use of the look-up table in order to
  8. save memory but this comes at the price of sacrificing distinguishable (meaningful) output string
  9. representations.
  10. config ESP_SYSTEM_EVENT_QUEUE_SIZE
  11. int "System event queue size"
  12. default 32
  13. help
  14. Config system event queue size in different application.
  15. config ESP_SYSTEM_EVENT_TASK_STACK_SIZE
  16. int "Event loop task stack size"
  17. default 2304
  18. help
  19. Config system event task stack size in different application.
  20. config ESP_MAIN_TASK_STACK_SIZE
  21. int "Main task stack size"
  22. default 3584
  23. help
  24. Configure the "main task" stack size. This is the stack of the task
  25. which calls app_main(). If app_main() returns then this task is deleted
  26. and its stack memory is freed.
  27. config ESP_IPC_TASK_STACK_SIZE
  28. int "Inter-Processor Call (IPC) task stack size"
  29. range 512 65536 if !APPTRACE_ENABLE
  30. range 2048 65536 if APPTRACE_ENABLE
  31. default 2048 if APPTRACE_ENABLE
  32. default 1024
  33. help
  34. Configure the IPC tasks stack size. One IPC task runs on each core
  35. (in dual core mode), and allows for cross-core function calls.
  36. See IPC documentation for more details.
  37. The default stack size should be enough for most common use cases.
  38. It can be shrunk if you are sure that you do not use any custom
  39. IPC functionality.
  40. config ESP_IPC_USES_CALLERS_PRIORITY
  41. bool "IPC runs at caller's priority"
  42. default y
  43. depends on !FREERTOS_UNICORE
  44. help
  45. If this option is not enabled then the IPC task will keep behavior
  46. same as prior to that of ESP-IDF v4.0, and hence IPC task will run
  47. at (configMAX_PRIORITIES - 1) priority.
  48. config ESP_MINIMAL_SHARED_STACK_SIZE
  49. int "Minimal allowed size for shared stack"
  50. default 2048
  51. help
  52. Minimal value of size, in bytes, accepted to execute a expression
  53. with shared stack.
  54. choice ESP_CONSOLE_UART
  55. prompt "Channel for console output"
  56. default ESP_CONSOLE_UART_DEFAULT
  57. help
  58. Select where to send console output (through stdout and stderr).
  59. - Default is to use UART0 on pre-defined GPIOs.
  60. - If "Custom" is selected, UART0 or UART1 can be chosen,
  61. and any pins can be selected.
  62. - If "None" is selected, there will be no console output on any UART, except
  63. for initial output from ROM bootloader. This ROM output can be suppressed by
  64. GPIO strapping or EFUSE, refer to chip datasheet for details.
  65. - On chips with USB OTG peripheral, "USB CDC" option redirects output to the
  66. CDC port. This option uses the CDC driver in the chip ROM.
  67. This option is incompatible with TinyUSB stack.
  68. - On chips with an USB serial/JTAG debug controller, selecting the option
  69. for that redirects output to the CDC/ACM (serial port emulation) component
  70. of that device.
  71. config ESP_CONSOLE_UART_DEFAULT
  72. bool "Default: UART0"
  73. config ESP_CONSOLE_USB_CDC
  74. bool "USB CDC"
  75. # The naming is confusing: USB_ENABLED means that TinyUSB driver is enabled, not USB in general.
  76. # && !USB_ENABLED is because the ROM CDC driver is currently incompatible with TinyUSB.
  77. depends on IDF_TARGET_ESP32S2 && !USB_ENABLED
  78. config ESP_CONSOLE_USB_SERIAL_JTAG
  79. bool "USB Serial/JTAG Controller"
  80. depends on IDF_TARGET_ESP32C3
  81. config ESP_CONSOLE_UART_CUSTOM
  82. bool "Custom UART"
  83. config ESP_CONSOLE_NONE
  84. bool "None"
  85. endchoice
  86. # Internal option, indicates that console UART is used (and not USB, for example)
  87. config ESP_CONSOLE_UART
  88. bool
  89. default y if ESP_CONSOLE_UART_DEFAULT || ESP_CONSOLE_UART_CUSTOM
  90. config ESP_CONSOLE_MULTIPLE_UART
  91. bool
  92. default y if !IDF_TARGET_ESP32C3
  93. choice ESP_CONSOLE_UART_NUM
  94. prompt "UART peripheral to use for console output (0-1)"
  95. depends on ESP_CONSOLE_UART_CUSTOM && ESP_CONSOLE_MULTIPLE_UART
  96. default ESP_CONSOLE_UART_CUSTOM_NUM_0
  97. help
  98. This UART peripheral is used for console output from the ESP-IDF Bootloader and the app.
  99. If the configuration is different in the Bootloader binary compared to the app binary, UART
  100. is reconfigured after the bootloader exits and the app starts.
  101. Due to an ESP32 ROM bug, UART2 is not supported for console output
  102. via esp_rom_printf.
  103. config ESP_CONSOLE_UART_CUSTOM_NUM_0
  104. bool "UART0"
  105. config ESP_CONSOLE_UART_CUSTOM_NUM_1
  106. bool "UART1"
  107. endchoice
  108. config ESP_CONSOLE_UART_NUM
  109. int
  110. default 0 if ESP_CONSOLE_UART_DEFAULT
  111. default 0 if !ESP_CONSOLE_MULTIPLE_UART
  112. default 0 if ESP_CONSOLE_UART_CUSTOM_NUM_0
  113. default 1 if ESP_CONSOLE_UART_CUSTOM_NUM_1
  114. default -1 if !ESP_CONSOLE_UART
  115. config ESP_CONSOLE_UART_TX_GPIO
  116. int "UART TX on GPIO#"
  117. depends on ESP_CONSOLE_UART_CUSTOM
  118. range 0 46
  119. default 1 if IDF_TARGET_ESP32
  120. default 21 if IDF_TARGET_ESP32C3
  121. default 43
  122. help
  123. This GPIO is used for console UART TX output in the ESP-IDF Bootloader and the app (including
  124. boot log output and default standard output and standard error of the app).
  125. If the configuration is different in the Bootloader binary compared to the app binary, UART
  126. is reconfigured after the bootloader exits and the app starts.
  127. config ESP_CONSOLE_UART_RX_GPIO
  128. int "UART RX on GPIO#"
  129. depends on ESP_CONSOLE_UART_CUSTOM
  130. range 0 46
  131. default 3 if IDF_TARGET_ESP32
  132. default 20 if IDF_TARGET_ESP32C3
  133. default 44
  134. help
  135. This GPIO is used for UART RX input in the ESP-IDF Bootloader and the app (including
  136. default default standard input of the app).
  137. Note: The default ESP-IDF Bootloader configures this pin but doesn't read anything from the UART.
  138. If the configuration is different in the Bootloader binary compared to the app binary, UART
  139. is reconfigured after the bootloader exits and the app starts.
  140. config ESP_CONSOLE_UART_BAUDRATE
  141. int
  142. prompt "UART console baud rate" if ESP_CONSOLE_UART_CUSTOM
  143. depends on ESP_CONSOLE_UART
  144. default 115200
  145. range 1200 4000000 if !PM_ENABLE
  146. range 1200 1000000 if PM_ENABLE
  147. help
  148. This baud rate is used by both the ESP-IDF Bootloader and the app (including
  149. boot log output and default standard input/output/error of the app).
  150. The app's maximum baud rate depends on the UART clock source. If Power Management is disabled,
  151. the UART clock source is the APB clock and all baud rates in the available range will be sufficiently
  152. accurate. If Power Management is enabled, REF_TICK clock source is used so the baud rate is divided
  153. from 1MHz. Baud rates above 1Mbps are not possible and values between 500Kbps and 1Mbps may not be
  154. accurate.
  155. If the configuration is different in the Bootloader binary compared to the app binary, UART
  156. is reconfigured after the bootloader exits and the app starts.
  157. config ESP_CONSOLE_USB_CDC_RX_BUF_SIZE
  158. int "Size of USB CDC RX buffer"
  159. depends on ESP_CONSOLE_USB_CDC
  160. default 64
  161. range 4 16384
  162. help
  163. Set the size of USB CDC RX buffer. Increase the buffer size if your application
  164. is often receiving data over USB CDC.
  165. config ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF
  166. bool "Enable esp_rom_printf / ESP_EARLY_LOG via USB CDC"
  167. depends on ESP_CONSOLE_USB_CDC
  168. default n
  169. help
  170. If enabled, esp_rom_printf and ESP_EARLY_LOG output will also be sent over USB CDC.
  171. Disabling this option saves about 1kB or RAM.
  172. config ESP_INT_WDT
  173. bool "Interrupt watchdog"
  174. default y
  175. help
  176. This watchdog timer can detect if the FreeRTOS tick interrupt has not been called for a certain time,
  177. either because a task turned off interrupts and did not turn them on for a long time, or because an
  178. interrupt handler did not return. It will try to invoke the panic handler first and failing that
  179. reset the SoC.
  180. config ESP_INT_WDT_TIMEOUT_MS
  181. int "Interrupt watchdog timeout (ms)"
  182. depends on ESP_INT_WDT
  183. default 300 if !ESP32_SPIRAM_SUPPORT
  184. default 800 if ESP32_SPIRAM_SUPPORT
  185. range 10 10000
  186. help
  187. The timeout of the watchdog, in miliseconds. Make this higher than the FreeRTOS tick rate.
  188. config ESP_INT_WDT_CHECK_CPU1
  189. bool "Also watch CPU1 tick interrupt"
  190. depends on ESP_INT_WDT && !FREERTOS_UNICORE
  191. default y
  192. help
  193. Also detect if interrupts on CPU 1 are disabled for too long.
  194. config ESP_TASK_WDT
  195. bool "Initialize Task Watchdog Timer on startup"
  196. default y
  197. help
  198. The Task Watchdog Timer can be used to make sure individual tasks are still
  199. running. Enabling this option will cause the Task Watchdog Timer to be
  200. initialized automatically at startup. The Task Watchdog timer can be
  201. initialized after startup as well (see Task Watchdog Timer API Reference)
  202. config ESP_TASK_WDT_PANIC
  203. bool "Invoke panic handler on Task Watchdog timeout"
  204. depends on ESP_TASK_WDT
  205. default n
  206. help
  207. If this option is enabled, the Task Watchdog Timer will be configured to
  208. trigger the panic handler when it times out. This can also be configured
  209. at run time (see Task Watchdog Timer API Reference)
  210. config ESP_TASK_WDT_TIMEOUT_S
  211. int "Task Watchdog timeout period (seconds)"
  212. depends on ESP_TASK_WDT
  213. range 1 60
  214. default 5
  215. help
  216. Timeout period configuration for the Task Watchdog Timer in seconds.
  217. This is also configurable at run time (see Task Watchdog Timer API Reference)
  218. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0
  219. bool "Watch CPU0 Idle Task"
  220. depends on ESP_TASK_WDT
  221. default y
  222. help
  223. If this option is enabled, the Task Watchdog Timer will watch the CPU0
  224. Idle Task. Having the Task Watchdog watch the Idle Task allows for detection
  225. of CPU starvation as the Idle Task not being called is usually a symptom of
  226. CPU starvation. Starvation of the Idle Task is detrimental as FreeRTOS household
  227. tasks depend on the Idle Task getting some runtime every now and then.
  228. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1
  229. bool "Watch CPU1 Idle Task"
  230. depends on ESP_TASK_WDT && !FREERTOS_UNICORE
  231. default y
  232. help
  233. If this option is enabled, the Task Wtachdog Timer will wach the CPU1
  234. Idle Task.
  235. config ESP_PANIC_HANDLER_IRAM
  236. bool "Place panic handler code in IRAM"
  237. default n
  238. help
  239. If this option is disabled (default), the panic handler code is placed in flash not IRAM.
  240. This means that if ESP-IDF crashes while flash cache is disabled, the panic handler will
  241. automatically re-enable flash cache before running GDB Stub or Core Dump. This adds some minor
  242. risk, if the flash cache status is also corrupted during the crash.
  243. If this option is enabled, the panic handler code is placed in IRAM. This allows the panic
  244. handler to run without needing to re-enable cache first. This may be necessary to debug some
  245. complex issues with crashes while flash cache is disabled (for example, when writing to
  246. SPI flash.)
  247. config ESP_DEBUG_STUBS_ENABLE
  248. bool
  249. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  250. depends on !ESP32_TRAX && !ESP32S2_TRAX
  251. help
  252. Debug stubs are used by OpenOCD to execute pre-compiled onboard code
  253. which does some useful debugging stuff, e.g. GCOV data dump.
  254. config ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  255. bool
  256. config ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  257. bool
  258. config ESP_MAC_ADDR_UNIVERSE_BT
  259. bool
  260. config ESP_MAC_ADDR_UNIVERSE_ETH
  261. bool
  262. config ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY
  263. # Invisible option that is set by SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY, but
  264. # exists even if SPIRAM is not supported
  265. bool
  266. endmenu # Common ESP-related