Kconfig 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. menu "ESP System Settings"
  2. # Insert chip-specific cpu config
  3. rsource "./port/soc/$IDF_TARGET/Kconfig.cpu"
  4. orsource "./port/soc/$IDF_TARGET/Kconfig.cache"
  5. orsource "./port/soc/$IDF_TARGET/Kconfig.memory"
  6. orsource "./port/soc/$IDF_TARGET/Kconfig.tracemem"
  7. choice ESP_SYSTEM_PANIC
  8. prompt "Panic handler behaviour"
  9. default ESP_SYSTEM_PANIC_PRINT_REBOOT
  10. help
  11. If FreeRTOS detects unexpected behaviour or an unhandled exception, the panic handler is
  12. invoked. Configure the panic handler's action here.
  13. config ESP_SYSTEM_PANIC_PRINT_HALT
  14. bool "Print registers and halt"
  15. help
  16. Outputs the relevant registers over the serial port and halt the
  17. processor. Needs a manual reset to restart.
  18. config ESP_SYSTEM_PANIC_PRINT_REBOOT
  19. bool "Print registers and reboot"
  20. help
  21. Outputs the relevant registers over the serial port and immediately
  22. reset the processor.
  23. config ESP_SYSTEM_PANIC_SILENT_REBOOT
  24. bool "Silent reboot"
  25. help
  26. Just resets the processor without outputting anything
  27. config ESP_SYSTEM_PANIC_GDBSTUB
  28. bool "GDBStub on panic"
  29. select ESP_GDBSTUB_ENABLED
  30. help
  31. Invoke gdbstub on the serial port, allowing for gdb to attach to it to do a postmortem
  32. of the crash.
  33. config ESP_SYSTEM_GDBSTUB_RUNTIME
  34. bool "GDBStub at runtime"
  35. select ESP_GDBSTUB_ENABLED
  36. depends on !IDF_TARGET_ESP32C2
  37. help
  38. Invoke gdbstub on the serial port, allowing for gdb to attach to it and to do a debug on runtime.
  39. endchoice
  40. config ESP_SYSTEM_PANIC_REBOOT_DELAY_SECONDS
  41. int "Panic reboot delay (Seconds)"
  42. default 0
  43. range 0 99
  44. depends on ESP_SYSTEM_PANIC_PRINT_REBOOT
  45. help
  46. After the panic handler executes, you can specify a number of seconds to
  47. wait before the device reboots.
  48. config ESP_SYSTEM_SINGLE_CORE_MODE
  49. bool
  50. default n
  51. help
  52. Only initialize and use the main core.
  53. config ESP_SYSTEM_RTC_EXT_XTAL
  54. # This is a High Layer Kconfig option, invisible, can be selected by other Kconfig option
  55. # e.g. It will be selected on when RTC_CLK_SRC_EXT_CRYS is on
  56. bool
  57. default n
  58. config ESP_SYSTEM_RTC_EXT_OSC
  59. # This is a High Layer Kconfig option, invisible, can be selected by other Kconfig option
  60. # e.g. It will be selected on when ESPX_RTC_CLK_SRC_EXT_OSC is on
  61. bool
  62. default n
  63. config ESP_SYSTEM_RTC_EXT_XTAL_BOOTSTRAP_CYCLES
  64. int "Bootstrap cycles for external 32kHz crystal"
  65. depends on ESP_SYSTEM_RTC_EXT_XTAL
  66. default 5 if IDF_TARGET_ESP32
  67. default 0
  68. range 0 32768
  69. help
  70. To reduce the startup time of an external RTC crystal,
  71. we bootstrap it with a 32kHz square wave for a fixed number of cycles.
  72. Setting 0 will disable bootstrapping (if disabled, the crystal may take
  73. longer to start up or fail to oscillate under some conditions).
  74. If this value is too high, a faulty crystal may initially start and then fail.
  75. If this value is too low, an otherwise good crystal may not start.
  76. To accurately determine if the crystal has started,
  77. set a larger "Number of cycles for RTC_SLOW_CLK calibration" (about 3000).
  78. config ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK
  79. bool
  80. default y if IDF_TARGET_ESP32 && FREERTOS_UNICORE
  81. default y if IDF_TARGET_ESP32S2
  82. default y if IDF_TARGET_ESP32C3
  83. default y if IDF_TARGET_ESP32S3
  84. default y if IDF_TARGET_ESP32H4
  85. default y if IDF_TARGET_ESP32C6
  86. default n if IDF_TARGET_ESP32H2 # IDF-5667
  87. depends on SOC_RTC_FAST_MEM_SUPPORTED
  88. config ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP
  89. bool "Enable RTC fast memory for dynamic allocations"
  90. default y
  91. depends on ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK
  92. help
  93. This config option allows to add RTC fast memory region to system heap with capability
  94. similar to that of DRAM region but without DMA. This memory will be consumed first per
  95. heap initialization order by early startup services and scheduler related code. Speed
  96. wise RTC fast memory operates on APB clock and hence does not have much performance impact.
  97. config ESP_SYSTEM_USE_EH_FRAME
  98. bool "Generate and use eh_frame for backtracing"
  99. default n
  100. depends on IDF_TARGET_ARCH_RISCV
  101. help
  102. Generate DWARF information for each function of the project. These information will parsed and used to
  103. perform backtracing when panics occur. Activating this option will activate asynchronous frame unwinding
  104. and generation of both .eh_frame and .eh_frame_hdr sections, resulting in a bigger binary size (20% to
  105. 100% larger). The main purpose of this option is to be able to have a backtrace parsed and printed by
  106. the program itself, regardless of the serial monitor used.
  107. This option shall NOT be used for production.
  108. menu "Memory protection"
  109. config ESP_SYSTEM_PMP_IDRAM_SPLIT
  110. bool "Enable IRAM/DRAM split protection"
  111. depends on SOC_CPU_IDRAM_SPLIT_USING_PMP
  112. default "y"
  113. help
  114. If enabled, the CPU watches all the memory access and raises an exception in case
  115. of any memory violation. This feature automatically splits
  116. the SRAM memory, using PMP, into data and instruction segments and sets Read/Execute permissions
  117. for the instruction part (below given splitting address) and Read/Write permissions
  118. for the data part (above the splitting address). The memory protection is effective
  119. on all access through the IRAM0 and DRAM0 buses.
  120. config ESP_SYSTEM_MEMPROT_FEATURE
  121. bool "Enable memory protection"
  122. depends on SOC_MEMPROT_SUPPORTED
  123. default "y"
  124. help
  125. If enabled, the permission control module watches all the memory access and fires the panic handler
  126. if a permission violation is detected. This feature automatically splits
  127. the SRAM memory into data and instruction segments and sets Read/Execute permissions
  128. for the instruction part (below given splitting address) and Read/Write permissions
  129. for the data part (above the splitting address). The memory protection is effective
  130. on all access through the IRAM0 and DRAM0 buses.
  131. config ESP_SYSTEM_MEMPROT_FEATURE_LOCK
  132. depends on ESP_SYSTEM_MEMPROT_FEATURE
  133. bool "Lock memory protection settings"
  134. default "y"
  135. help
  136. Once locked, memory protection settings cannot be changed anymore.
  137. The lock is reset only on the chip startup.
  138. endmenu # Memory protection
  139. config ESP_SYSTEM_EVENT_QUEUE_SIZE
  140. int "System event queue size"
  141. default 32
  142. help
  143. Config system event queue size in different application.
  144. config ESP_SYSTEM_EVENT_TASK_STACK_SIZE
  145. int "Event loop task stack size"
  146. default 2304
  147. help
  148. Config system event task stack size in different application.
  149. config ESP_MAIN_TASK_STACK_SIZE
  150. int "Main task stack size"
  151. default 3584
  152. help
  153. Configure the "main task" stack size. This is the stack of the task
  154. which calls app_main(). If app_main() returns then this task is deleted
  155. and its stack memory is freed.
  156. choice ESP_MAIN_TASK_AFFINITY
  157. prompt "Main task core affinity"
  158. default ESP_MAIN_TASK_AFFINITY_CPU0
  159. help
  160. Configure the "main task" core affinity. This is the used core of the task
  161. which calls app_main(). If app_main() returns then this task is deleted.
  162. config ESP_MAIN_TASK_AFFINITY_CPU0
  163. bool "CPU0"
  164. config ESP_MAIN_TASK_AFFINITY_CPU1
  165. bool "CPU1"
  166. depends on !FREERTOS_UNICORE
  167. config ESP_MAIN_TASK_AFFINITY_NO_AFFINITY
  168. bool "No affinity"
  169. endchoice
  170. config ESP_MAIN_TASK_AFFINITY
  171. hex
  172. default 0x0 if ESP_MAIN_TASK_AFFINITY_CPU0
  173. default 0x1 if ESP_MAIN_TASK_AFFINITY_CPU1
  174. default FREERTOS_NO_AFFINITY if ESP_MAIN_TASK_AFFINITY_NO_AFFINITY
  175. config ESP_MINIMAL_SHARED_STACK_SIZE
  176. int "Minimal allowed size for shared stack"
  177. default 2048
  178. help
  179. Minimal value of size, in bytes, accepted to execute a expression
  180. with shared stack.
  181. choice ESP_CONSOLE_UART
  182. prompt "Channel for console output"
  183. default ESP_CONSOLE_UART_DEFAULT
  184. help
  185. Select where to send console output (through stdout and stderr).
  186. - Default is to use UART0 on pre-defined GPIOs.
  187. - If "Custom" is selected, UART0 or UART1 can be chosen,
  188. and any pins can be selected.
  189. - If "None" is selected, there will be no console output on any UART, except
  190. for initial output from ROM bootloader. This ROM output can be suppressed by
  191. GPIO strapping or EFUSE, refer to chip datasheet for details.
  192. - On chips with USB OTG peripheral, "USB CDC" option redirects output to the
  193. CDC port. This option uses the CDC driver in the chip ROM.
  194. This option is incompatible with TinyUSB stack.
  195. - On chips with an USB serial/JTAG debug controller, selecting the option
  196. for that redirects output to the CDC/ACM (serial port emulation) component
  197. of that device.
  198. config ESP_CONSOLE_UART_DEFAULT
  199. bool "Default: UART0"
  200. config ESP_CONSOLE_USB_CDC
  201. bool "USB CDC"
  202. # && !TINY_USB is because the ROM CDC driver is currently incompatible with TinyUSB.
  203. depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3) && !TINY_USB
  204. config ESP_CONSOLE_USB_SERIAL_JTAG
  205. bool "USB Serial/JTAG Controller"
  206. select ESPTOOLPY_NO_STUB if IDF_TARGET_ESP32C3 #ESPTOOL-252
  207. depends on SOC_USB_SERIAL_JTAG_SUPPORTED
  208. config ESP_CONSOLE_UART_CUSTOM
  209. bool "Custom UART"
  210. config ESP_CONSOLE_NONE
  211. bool "None"
  212. endchoice
  213. choice ESP_CONSOLE_SECONDARY
  214. depends on SOC_USB_SERIAL_JTAG_SUPPORTED
  215. prompt "Channel for console secondary output"
  216. default ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
  217. help
  218. This secondary option supports output through other specific port like USB_SERIAL_JTAG
  219. when UART0 port as a primary is selected but not connected. This secondary output currently only supports
  220. non-blocking mode without using REPL. If you want to output in blocking mode with REPL or
  221. input through this secondary port, please change the primary config to this port
  222. in `Channel for console output` menu.
  223. config ESP_CONSOLE_SECONDARY_NONE
  224. bool "No secondary console"
  225. config ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
  226. bool "USB_SERIAL_JTAG PORT"
  227. depends on !ESP_CONSOLE_USB_SERIAL_JTAG
  228. help
  229. This option supports output through USB_SERIAL_JTAG port when the UART0 port is not connected.
  230. The output currently only supports non-blocking mode without using the console.
  231. If you want to output in blocking mode with REPL or input through USB_SERIAL_JTAG port,
  232. please change the primary config to ESP_CONSOLE_USB_SERIAL_JTAG above.
  233. endchoice
  234. config ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED
  235. # Internal option, indicates that console USB SERIAL JTAG is used
  236. bool
  237. default y if ESP_CONSOLE_USB_SERIAL_JTAG || ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG
  238. config ESP_CONSOLE_UART
  239. # Internal option, indicates that console UART is used (and not USB, for example)
  240. bool
  241. default y if ESP_CONSOLE_UART_DEFAULT || ESP_CONSOLE_UART_CUSTOM
  242. config ESP_CONSOLE_MULTIPLE_UART
  243. bool
  244. default y if !IDF_TARGET_ESP32C3 && !IDF_TARGET_ESP32H4 && !IDF_TARGET_ESP32C2
  245. choice ESP_CONSOLE_UART_NUM
  246. prompt "UART peripheral to use for console output (0-1)"
  247. depends on ESP_CONSOLE_UART_CUSTOM && ESP_CONSOLE_MULTIPLE_UART
  248. default ESP_CONSOLE_UART_CUSTOM_NUM_0
  249. help
  250. This UART peripheral is used for console output from the ESP-IDF Bootloader and the app.
  251. If the configuration is different in the Bootloader binary compared to the app binary, UART
  252. is reconfigured after the bootloader exits and the app starts.
  253. Due to an ESP32 ROM bug, UART2 is not supported for console output
  254. via esp_rom_printf.
  255. config ESP_CONSOLE_UART_CUSTOM_NUM_0
  256. bool "UART0"
  257. config ESP_CONSOLE_UART_CUSTOM_NUM_1
  258. bool "UART1"
  259. endchoice
  260. config ESP_CONSOLE_UART_NUM
  261. int
  262. default 0 if ESP_CONSOLE_UART_DEFAULT
  263. default 0 if !ESP_CONSOLE_MULTIPLE_UART
  264. default 0 if ESP_CONSOLE_UART_CUSTOM_NUM_0
  265. default 1 if ESP_CONSOLE_UART_CUSTOM_NUM_1
  266. default -1 if !ESP_CONSOLE_UART
  267. config ESP_CONSOLE_UART_TX_GPIO
  268. int "UART TX on GPIO#"
  269. depends on ESP_CONSOLE_UART_CUSTOM
  270. range 0 46
  271. default 1 if IDF_TARGET_ESP32
  272. default 20 if IDF_TARGET_ESP32C2
  273. default 21 if IDF_TARGET_ESP32C3
  274. default 16 if IDF_TARGET_ESP32C6
  275. default 24 if IDF_TARGET_ESP32H2
  276. default 43
  277. help
  278. This GPIO is used for console UART TX output in the ESP-IDF Bootloader and the app (including
  279. boot log output and default standard output and standard error of the app).
  280. If the configuration is different in the Bootloader binary compared to the app binary, UART
  281. is reconfigured after the bootloader exits and the app starts.
  282. config ESP_CONSOLE_UART_RX_GPIO
  283. int "UART RX on GPIO#"
  284. depends on ESP_CONSOLE_UART_CUSTOM
  285. range 0 46
  286. default 3 if IDF_TARGET_ESP32
  287. default 19 if IDF_TARGET_ESP32C2
  288. default 20 if IDF_TARGET_ESP32C3
  289. default 17 if IDF_TARGET_ESP32C6
  290. default 23 if IDF_TARGET_ESP32H2
  291. default 44
  292. help
  293. This GPIO is used for UART RX input in the ESP-IDF Bootloader and the app (including
  294. default default standard input of the app).
  295. Note: The default ESP-IDF Bootloader configures this pin but doesn't read anything from the UART.
  296. If the configuration is different in the Bootloader binary compared to the app binary, UART
  297. is reconfigured after the bootloader exits and the app starts.
  298. config ESP_CONSOLE_UART_BAUDRATE
  299. int
  300. prompt "UART console baud rate" if ESP_CONSOLE_UART_CUSTOM
  301. depends on ESP_CONSOLE_UART
  302. default 74880 if (IDF_TARGET_ESP32C2 && XTAL_FREQ_26)
  303. default 115200
  304. range 1200 4000000 if !PM_ENABLE
  305. range 1200 1000000 if PM_ENABLE
  306. help
  307. This baud rate is used by both the ESP-IDF Bootloader and the app (including
  308. boot log output and default standard input/output/error of the app).
  309. The app's maximum baud rate depends on the UART clock source. If Power Management is disabled,
  310. the UART clock source is the APB clock and all baud rates in the available range will be sufficiently
  311. accurate. If Power Management is enabled, REF_TICK clock source is used so the baud rate is divided
  312. from 1MHz. Baud rates above 1Mbps are not possible and values between 500Kbps and 1Mbps may not be
  313. accurate.
  314. If the configuration is different in the Bootloader binary compared to the app binary, UART
  315. is reconfigured after the bootloader exits and the app starts.
  316. config ESP_CONSOLE_USB_CDC_RX_BUF_SIZE
  317. int "Size of USB CDC RX buffer"
  318. depends on ESP_CONSOLE_USB_CDC
  319. default 64
  320. range 4 16384
  321. help
  322. Set the size of USB CDC RX buffer. Increase the buffer size if your application
  323. is often receiving data over USB CDC.
  324. config ESP_CONSOLE_USB_CDC_SUPPORT_ETS_PRINTF
  325. bool "Enable esp_rom_printf / ESP_EARLY_LOG via USB CDC"
  326. depends on ESP_CONSOLE_USB_CDC
  327. default n
  328. help
  329. If enabled, esp_rom_printf and ESP_EARLY_LOG output will also be sent over USB CDC.
  330. Disabling this option saves about 1kB or RAM.
  331. config ESP_INT_WDT
  332. bool "Interrupt watchdog"
  333. default y
  334. help
  335. This watchdog timer can detect if the FreeRTOS tick interrupt has not been called for a certain time,
  336. either because a task turned off interrupts and did not turn them on for a long time, or because an
  337. interrupt handler did not return. It will try to invoke the panic handler first and failing that
  338. reset the SoC.
  339. config ESP_INT_WDT_TIMEOUT_MS
  340. int "Interrupt watchdog timeout (ms)"
  341. depends on ESP_INT_WDT
  342. default 300 if !(SPIRAM && IDF_TARGET_ESP32)
  343. default 800 if (SPIRAM && IDF_TARGET_ESP32)
  344. range 10 10000
  345. help
  346. The timeout of the watchdog, in miliseconds. Make this higher than the FreeRTOS tick rate.
  347. config ESP_INT_WDT_CHECK_CPU1
  348. bool "Also watch CPU1 tick interrupt"
  349. depends on ESP_INT_WDT && !FREERTOS_UNICORE
  350. default y
  351. help
  352. Also detect if interrupts on CPU 1 are disabled for too long.
  353. config ESP_TASK_WDT_EN
  354. bool "Enable Task Watchdog Timer"
  355. default y
  356. select FREERTOS_ENABLE_TASK_SNAPSHOT
  357. help
  358. The Task Watchdog Timer can be used to make sure individual tasks are still
  359. running. Enabling this option will enable the Task Watchdog Timer. It can be
  360. either initialized automatically at startup or initialized after startup
  361. (see Task Watchdog Timer API Reference)
  362. config ESP_TASK_WDT_USE_ESP_TIMER
  363. # Software implementation of Task Watchdog, handy for targets with only a single
  364. # Timer Group, such as the ESP32-C2
  365. bool
  366. depends on ESP_TASK_WDT_EN
  367. default y if IDF_TARGET_ESP32C2
  368. default n if !IDF_TARGET_ESP32C2
  369. select ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD
  370. config ESP_TASK_WDT_INIT
  371. bool "Initialize Task Watchdog Timer on startup"
  372. depends on ESP_TASK_WDT_EN
  373. default y
  374. help
  375. Enabling this option will cause the Task Watchdog Timer to be initialized
  376. automatically at startup.
  377. config ESP_TASK_WDT_PANIC
  378. bool "Invoke panic handler on Task Watchdog timeout"
  379. depends on ESP_TASK_WDT_INIT
  380. default n
  381. help
  382. If this option is enabled, the Task Watchdog Timer will be configured to
  383. trigger the panic handler when it times out. This can also be configured
  384. at run time (see Task Watchdog Timer API Reference)
  385. config ESP_TASK_WDT_TIMEOUT_S
  386. int "Task Watchdog timeout period (seconds)"
  387. depends on ESP_TASK_WDT_INIT
  388. range 1 60
  389. default 5
  390. help
  391. Timeout period configuration for the Task Watchdog Timer in seconds.
  392. This is also configurable at run time (see Task Watchdog Timer API Reference)
  393. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0
  394. bool "Watch CPU0 Idle Task"
  395. depends on ESP_TASK_WDT_INIT
  396. default y
  397. help
  398. If this option is enabled, the Task Watchdog Timer will watch the CPU0
  399. Idle Task. Having the Task Watchdog watch the Idle Task allows for detection
  400. of CPU starvation as the Idle Task not being called is usually a symptom of
  401. CPU starvation. Starvation of the Idle Task is detrimental as FreeRTOS household
  402. tasks depend on the Idle Task getting some runtime every now and then.
  403. config ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1
  404. bool "Watch CPU1 Idle Task"
  405. depends on ESP_TASK_WDT_INIT && !FREERTOS_UNICORE
  406. default y
  407. help
  408. If this option is enabled, the Task Watchdog Timer will wach the CPU1
  409. Idle Task.
  410. config ESP_XT_WDT
  411. bool "Initialize XTAL32K watchdog timer on startup"
  412. depends on !IDF_TARGET_ESP32 && (ESP_SYSTEM_RTC_EXT_OSC || ESP_SYSTEM_RTC_EXT_XTAL)
  413. default n
  414. help
  415. This watchdog timer can detect oscillation failure of the XTAL32K_CLK. When such a failure
  416. is detected the hardware can be set up to automatically switch to BACKUP32K_CLK and generate
  417. an interrupt.
  418. config ESP_XT_WDT_TIMEOUT
  419. int "XTAL32K watchdog timeout period"
  420. depends on ESP_XT_WDT
  421. range 1 255
  422. default 200
  423. help
  424. Timeout period configuration for the XTAL32K watchdog timer based on RTC_CLK.
  425. config ESP_XT_WDT_BACKUP_CLK_ENABLE
  426. bool "Automatically switch to BACKUP32K_CLK when timer expires"
  427. depends on ESP_XT_WDT
  428. default y
  429. help
  430. Enable this to automatically switch to BACKUP32K_CLK as the source of RTC_SLOW_CLK when
  431. the watchdog timer expires.
  432. config ESP_PANIC_HANDLER_IRAM
  433. bool "Place panic handler code in IRAM"
  434. default n
  435. help
  436. If this option is disabled (default), the panic handler code is placed in flash not IRAM.
  437. This means that if ESP-IDF crashes while flash cache is disabled, the panic handler will
  438. automatically re-enable flash cache before running GDB Stub or Core Dump. This adds some minor
  439. risk, if the flash cache status is also corrupted during the crash.
  440. If this option is enabled, the panic handler code (including required UART functions) is placed
  441. in IRAM. This may be necessary to debug some complex issues with crashes while flash cache is
  442. disabled (for example, when writing to SPI flash) or when flash cache is corrupted when an exception
  443. is triggered.
  444. config ESP_DEBUG_STUBS_ENABLE
  445. bool "OpenOCD debug stubs"
  446. default COMPILER_OPTIMIZATION_LEVEL_DEBUG
  447. depends on !ESP32_TRAX && !ESP32S2_TRAX && !ESP32S3_TRAX
  448. help
  449. Debug stubs are used by OpenOCD to execute pre-compiled onboard code
  450. which does some useful debugging stuff, e.g. GCOV data dump.
  451. config ESP_DEBUG_OCDAWARE
  452. bool "Make exception and panic handlers JTAG/OCD aware"
  453. default y
  454. select FREERTOS_DEBUG_OCDAWARE
  455. help
  456. The FreeRTOS panic and unhandled exception handers can detect a JTAG OCD debugger and
  457. instead of panicking, have the debugger stop on the offending instruction.
  458. choice ESP_SYSTEM_CHECK_INT_LEVEL
  459. prompt "Interrupt level to use for Interrupt Watchdog and other system checks"
  460. default ESP_SYSTEM_CHECK_INT_LEVEL_4
  461. help
  462. Interrupt level to use for Interrupt Watchdog and other system checks.
  463. config ESP_SYSTEM_CHECK_INT_LEVEL_5
  464. bool "Level 5 interrupt"
  465. depends on IDF_TARGET_ESP32
  466. help
  467. Using level 5 interrupt for Interrupt Watchdog and other system checks.
  468. config ESP_SYSTEM_CHECK_INT_LEVEL_4
  469. bool "Level 4 interrupt"
  470. depends on !BTDM_CTRL_HLI
  471. help
  472. Using level 4 interrupt for Interrupt Watchdog and other system checks.
  473. endchoice
  474. # Insert chip-specific system config
  475. rsource "./port/soc/$IDF_TARGET/Kconfig.system"
  476. config ESP_SYSTEM_BROWNOUT_INTR
  477. bool
  478. default n
  479. help
  480. This config allows to trigger an interrupt when brownout detected. Software restart will be done
  481. at the end of the default callback.
  482. Two occasions need to restart the chip with interrupt so far.
  483. (1). For ESP32 version 1, brown-out reset function doesn't work (see ESP32 errata 3.4).
  484. So that we must restart from interrupt.
  485. (2). For special workflow, the chip needs do more things instead of restarting directly. This part
  486. needs to be done in callback function of interrupt.
  487. endmenu # ESP System Settings
  488. menu "IPC (Inter-Processor Call)"
  489. config ESP_IPC_TASK_STACK_SIZE
  490. int "Inter-Processor Call (IPC) task stack size"
  491. range 512 65536 if !APPTRACE_ENABLE
  492. range 2048 65536 if APPTRACE_ENABLE
  493. default 2048 if APPTRACE_ENABLE
  494. default 1280 if !APPTRACE_ENABLE && IDF_TARGET_ESP32S3
  495. default 1024
  496. help
  497. Configure the IPC tasks stack size. An IPC task runs on each core (in dual core mode), and allows for
  498. cross-core function calls. See IPC documentation for more details. The default IPC stack size should be
  499. enough for most common simple use cases. However, users can increase/decrease the stack size to their
  500. needs.
  501. config ESP_IPC_USES_CALLERS_PRIORITY
  502. bool "IPC runs at caller's priority"
  503. default y
  504. depends on !FREERTOS_UNICORE
  505. help
  506. If this option is not enabled then the IPC task will keep behavior same as prior to that of ESP-IDF v4.0,
  507. hence IPC task will run at (configMAX_PRIORITIES - 1) priority.
  508. config ESP_IPC_ISR_ENABLE
  509. bool
  510. default y if !FREERTOS_UNICORE
  511. help
  512. The IPC ISR feature is similar to the IPC feature except that the callback function is executed in the
  513. context of a High Priority Interrupt. The IPC ISR feature is itended for low latency execution of simple
  514. callbacks written in assembly on another CPU. Due to being run in a High Priority Interrupt, the assembly
  515. callbacks must be written with particular restrictions (see "IPC" and "High-Level Interrupt" docs for more
  516. details).
  517. endmenu # "IPC (Inter-Processor Call)