Kconfig 26 KB

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