Kconfig 25 KB

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