Kconfig 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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 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. config ESP_CONSOLE_UART_DEFAULT
  69. bool "Default: UART0"
  70. config ESP_CONSOLE_USB_CDC
  71. bool "USB CDC"
  72. # The naming is confusing: USB_ENABLED means that TinyUSB driver is enabled, not USB in general.
  73. # && !USB_ENABLED is because the ROM CDC driver is currently incompatible with TinyUSB.
  74. depends on IDF_TARGET_ESP32S2 && !USB_ENABLED
  75. config ESP_CONSOLE_UART_CUSTOM
  76. bool "Custom UART"
  77. config ESP_CONSOLE_NONE
  78. bool "None"
  79. endchoice
  80. # Internal option, indicates that console UART is used (and not USB, for example)
  81. config ESP_CONSOLE_UART
  82. bool
  83. default y if ESP_CONSOLE_UART_DEFAULT || ESP_CONSOLE_UART_CUSTOM
  84. choice ESP_CONSOLE_UART_NUM
  85. prompt "UART peripheral to use for console output (0-1)"
  86. depends on ESP_CONSOLE_UART_CUSTOM
  87. default ESP_CONSOLE_UART_CUSTOM_NUM_0
  88. help
  89. Select which UART peripheral to use for console output.
  90. On ESP32, UART2 is not supported for console output via ets_printf.
  91. config ESP_CONSOLE_UART_CUSTOM_NUM_0
  92. bool "UART0"
  93. config ESP_CONSOLE_UART_CUSTOM_NUM_1
  94. bool "UART1"
  95. endchoice
  96. config ESP_CONSOLE_UART_NUM
  97. int
  98. default 0 if ESP_CONSOLE_UART_DEFAULT
  99. default 0 if ESP_CONSOLE_UART_CUSTOM_NUM_0
  100. default 1 if ESP_CONSOLE_UART_CUSTOM_NUM_1
  101. default -1 if !ESP_CONSOLE_UART
  102. config ESP_CONSOLE_UART_TX_GPIO
  103. int "UART TX on GPIO#"
  104. depends on ESP_CONSOLE_UART_CUSTOM
  105. range 0 46
  106. default 1 if IDF_TARGET_ESP32
  107. default 43 if IDF_TARGET_ESP32S2
  108. config ESP_CONSOLE_UART_RX_GPIO
  109. int "UART RX on GPIO#"
  110. depends on ESP_CONSOLE_UART_CUSTOM
  111. range 0 46
  112. default 3 if IDF_TARGET_ESP32
  113. default 44 if IDF_TARGET_ESP32S2
  114. config ESP_CONSOLE_UART_BAUDRATE
  115. int
  116. prompt "UART console baud rate" if ESP_CONSOLE_UART_CUSTOM
  117. depends on ESP_CONSOLE_UART
  118. default 115200
  119. range 1200 4000000
  120. config ESP_CONSOLE_USB_CDC_RX_BUF_SIZE
  121. int "Size of USB CDC RX buffer"
  122. depends on ESP_CONSOLE_USB_CDC
  123. default 64
  124. range 4 16384
  125. help
  126. Set the size of USB CDC RX buffer. Increase the buffer size if your application
  127. is often receiving data over USB CDC.
  128. config ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF
  129. bool "Enable ets_printf / ESP_EARLY_LOG via USB CDC"
  130. depends on ESP_CONSOLE_USB_CDC
  131. default n
  132. help
  133. If enabled, ets_printf and ESP_EARLY_LOG output will also be sent over USB CDC.
  134. Disabling this option saves about 1kB or RAM.
  135. config ESP_INT_WDT
  136. bool "Interrupt watchdog"
  137. default y
  138. help
  139. This watchdog timer can detect if the FreeRTOS tick interrupt has not been called for a certain time,
  140. either because a task turned off interrupts and did not turn them on for a long time, or because an
  141. interrupt handler did not return. It will try to invoke the panic handler first and failing that
  142. reset the SoC.
  143. config ESP_INT_WDT_TIMEOUT_MS
  144. int "Interrupt watchdog timeout (ms)"
  145. depends on ESP_INT_WDT
  146. default 300 if !ESP32_SPIRAM_SUPPORT
  147. default 800 if ESP32_SPIRAM_SUPPORT
  148. range 10 10000
  149. help
  150. The timeout of the watchdog, in miliseconds. Make this higher than the FreeRTOS tick rate.
  151. config ESP_INT_WDT_CHECK_CPU1
  152. bool "Also watch CPU1 tick interrupt"
  153. depends on ESP_INT_WDT && !FREERTOS_UNICORE
  154. default y
  155. help
  156. Also detect if interrupts on CPU 1 are disabled for too long.
  157. config ESP_TASK_WDT
  158. bool "Initialize Task Watchdog Timer on startup"
  159. default y
  160. help
  161. The Task Watchdog Timer can be used to make sure individual tasks are still
  162. running. Enabling this option will cause the Task Watchdog Timer to be
  163. initialized automatically at startup. The Task Watchdog timer can be
  164. initialized after startup as well (see Task Watchdog Timer API Reference)
  165. config ESP_TASK_WDT_PANIC
  166. bool "Invoke panic handler on Task Watchdog timeout"
  167. depends on ESP_TASK_WDT
  168. default n
  169. help
  170. If this option is enabled, the Task Watchdog Timer will be configured to
  171. trigger the panic handler when it times out. This can also be configured
  172. at run time (see Task Watchdog Timer API Reference)
  173. config ESP_TASK_WDT_TIMEOUT_S
  174. int "Task Watchdog timeout period (seconds)"
  175. depends on ESP_TASK_WDT
  176. range 1 60
  177. default 5
  178. help
  179. Timeout period configuration for the Task Watchdog Timer in seconds.
  180. This is also configurable at run time (see Task Watchdog Timer API Reference)
  181. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0
  182. bool "Watch CPU0 Idle Task"
  183. depends on ESP_TASK_WDT
  184. default y
  185. help
  186. If this option is enabled, the Task Watchdog Timer will watch the CPU0
  187. Idle Task. Having the Task Watchdog watch the Idle Task allows for detection
  188. of CPU starvation as the Idle Task not being called is usually a symptom of
  189. CPU starvation. Starvation of the Idle Task is detrimental as FreeRTOS household
  190. tasks depend on the Idle Task getting some runtime every now and then.
  191. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1
  192. bool "Watch CPU1 Idle Task"
  193. depends on ESP_TASK_WDT && !FREERTOS_UNICORE
  194. default y
  195. help
  196. If this option is enabled, the Task Wtachdog Timer will wach the CPU1
  197. Idle Task.
  198. config ESP_PANIC_HANDLER_IRAM
  199. bool "Place panic handler code in IRAM"
  200. default n
  201. depends on IDF_TARGET_ESP32 # pending ESP32-S2 support
  202. help
  203. If this option is disabled (default), the panic handler code is placed in flash not IRAM.
  204. This means that if ESP-IDF crashes while flash cache is disabled, the panic handler will
  205. automatically re-enable flash cache before running GDB Stub or Core Dump. This adds some minor
  206. risk, if the flash cache status is also corrupted during the crash.
  207. If this option is enabled, the panic handler code is placed in IRAM. This allows the panic
  208. handler to run without needing to re-enable cache first. This may be necessary to debug some
  209. complex issues with crashes while flash cache is disabled (for example, when writing to
  210. SPI flash.)
  211. config ESP_DEBUG_STUBS_ENABLE
  212. bool
  213. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  214. depends on !ESP32_TRAX && !ESP32S2_TRAX
  215. help
  216. Debug stubs are used by OpenOCD to execute pre-compiled onboard code
  217. which does some useful debugging stuff, e.g. GCOV data dump.
  218. config ESP_MAC_ADDR_UNIVERSE_WIFI_STA
  219. bool
  220. config ESP_MAC_ADDR_UNIVERSE_WIFI_AP
  221. bool
  222. config ESP_MAC_ADDR_UNIVERSE_BT
  223. bool
  224. config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
  225. int
  226. default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
  227. default 1 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO
  228. config ESP_MAC_ADDR_UNIVERSE_ETH
  229. bool
  230. endmenu # Common ESP-related