Kconfig 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. menu "FreeRTOS"
  2. menu "Kernel"
  3. # Upstream FreeRTOS configurations go here
  4. config FREERTOS_SMP
  5. bool "Run the Amazon SMP FreeRTOS kernel instead (FEATURE UNDER DEVELOPMENT)"
  6. depends on !IDF_TARGET_ESP32P4 #TODO: IDF-8113: Enable P4 support on AMZ SMP
  7. default "n"
  8. help
  9. Amazon has released an SMP version of the FreeRTOS Kernel which can be found via the following link:
  10. https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/smp
  11. IDF has added an experimental port of this SMP kernel located in
  12. components/freertos/FreeRTOS-Kernel-SMP. Enabling this option will cause IDF to use the Amazon SMP
  13. kernel. Note that THIS FEATURE IS UNDER ACTIVE DEVELOPMENT, users use this at their own risk.
  14. Leaving this option disabled will mean the IDF FreeRTOS kernel is used instead, which is located in:
  15. components/freertos/FreeRTOS-Kernel. Both kernel versions are SMP capable, but differ in
  16. their implementation and features.
  17. config FREERTOS_UNICORE
  18. # Todo: Replace with CONFIG_NUM_CORES (IDF-4986)
  19. bool "Run FreeRTOS only on first core"
  20. default "y" if IDF_TARGET_ESP32S2 || IDF_TARGET_LINUX
  21. select ESP_SYSTEM_SINGLE_CORE_MODE
  22. help
  23. This version of FreeRTOS normally takes control of all cores of the CPU. Select this if you only want
  24. to start it on the first core. This is needed when e.g. another process needs complete control over the
  25. second core.
  26. config FREERTOS_HZ
  27. # Todo: Rename to CONFIG_FREERTOS_TICK_RATE_HZ (IDF-4986)
  28. int "configTICK_RATE_HZ"
  29. range 1 1000
  30. default 100
  31. help
  32. Sets the FreeRTOS tick interrupt frequency in Hz (see configTICK_RATE_HZ documentation for more
  33. details).
  34. config FREERTOS_OPTIMIZED_SCHEDULER
  35. # Todo: Not available in SMP FREERTOS (IDF-3733)
  36. bool "configUSE_PORT_OPTIMISED_TASK_SELECTION"
  37. depends on FREERTOS_UNICORE && !FREERTOS_SMP
  38. default y
  39. help
  40. Enables port specific task selection method. This option can speed up the search of ready tasks
  41. when scheduling (see configUSE_PORT_OPTIMISED_TASK_SELECTION documentation for more details).
  42. choice FREERTOS_CHECK_STACKOVERFLOW
  43. prompt "configCHECK_FOR_STACK_OVERFLOW"
  44. default FREERTOS_CHECK_STACKOVERFLOW_CANARY
  45. help
  46. Enables FreeRTOS to check for stack overflows (see configCHECK_FOR_STACK_OVERFLOW documentation for
  47. more details).
  48. Note: If users do not provide their own ``vApplicationStackOverflowHook()`` function, a default
  49. function will be provided by ESP-IDF.
  50. config FREERTOS_CHECK_STACKOVERFLOW_NONE
  51. bool "No checking"
  52. help
  53. Do not check for stack overflows (configCHECK_FOR_STACK_OVERFLOW = 0)
  54. config FREERTOS_CHECK_STACKOVERFLOW_PTRVAL
  55. bool "Check by stack pointer value (Method 1)"
  56. help
  57. Check for stack overflows on each context switch by checking if the stack pointer is in a valid
  58. range. Quick but does not detect stack overflows that happened between context switches
  59. (configCHECK_FOR_STACK_OVERFLOW = 1)
  60. config FREERTOS_CHECK_STACKOVERFLOW_CANARY
  61. bool "Check using canary bytes (Method 2)"
  62. help
  63. Places some magic bytes at the end of the stack area and on each context switch, check if these
  64. bytes are still intact. More thorough than just checking the pointer, but also slightly slower.
  65. (configCHECK_FOR_STACK_OVERFLOW = 2)
  66. endchoice # FREERTOS_CHECK_STACKOVERFLOW
  67. config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
  68. int "configNUM_THREAD_LOCAL_STORAGE_POINTERS"
  69. range 1 256
  70. default 1
  71. help
  72. Set the number of thread local storage pointers in each task (see
  73. configNUM_THREAD_LOCAL_STORAGE_POINTERS documentation for more details).
  74. Note: In ESP-IDF, this value must be at least 1. Index 0 is reserved for use by the pthreads API
  75. thread-local-storage. Other indexes can be used for any desired purpose.
  76. config FREERTOS_IDLE_TASK_STACKSIZE
  77. int "configMINIMAL_STACK_SIZE (Idle task stack size)"
  78. range 768 32768
  79. default 1536
  80. help
  81. Sets the idle task stack size in bytes (see configMINIMAL_STACK_SIZE documentation for more details).
  82. Note:
  83. - ESP-IDF specifies stack sizes in bytes instead of words.
  84. - The default size is enough for most use cases.
  85. - The stack size may need to be increased above the default if the app installs idle or thread local
  86. storage cleanup hooks that use a lot of stack memory.
  87. - Conversely, the stack size can be reduced to the minimum if non of the idle features are used.
  88. config FREERTOS_USE_IDLE_HOOK
  89. bool "configUSE_IDLE_HOOK"
  90. default n
  91. help
  92. Enables the idle task application hook (see configUSE_IDLE_HOOK documentation for more details).
  93. Note:
  94. - The application must provide the hook function ``void vApplicationIdleHook( void );``
  95. - ``vApplicationIdleHook()`` is called from FreeRTOS idle task(s)
  96. - The FreeRTOS idle hook is NOT the same as the ESP-IDF Idle Hook, but both can be enabled
  97. simultaneously.
  98. config FREERTOS_USE_MINIMAL_IDLE_HOOK
  99. bool "Use FreeRTOS minimal idle hook"
  100. depends on FREERTOS_SMP
  101. default n
  102. help
  103. Enables the minimal idle task application hook (see configUSE_IDLE_HOOK documentation for more
  104. details).
  105. Note:
  106. - The application must provide the hook function ``void vApplicationMinimalIdleHook( void );``
  107. - ``vApplicationMinimalIdleHook()`` is called from FreeRTOS minimal idle task(s)
  108. config FREERTOS_USE_TICK_HOOK
  109. bool "configUSE_TICK_HOOK"
  110. default n
  111. help
  112. Enables the tick hook (see configUSE_TICK_HOOK documentation for more details).
  113. Note:
  114. - The application must provide the hook function ``void vApplicationTickHook( void );``
  115. - ``vApplicationTickHook()`` is called from FreeRTOS's tick handling function ``xTaskIncrementTick()``
  116. - The FreeRTOS tick hook is NOT the same as the ESP-IDF Tick Interrupt Hook, but both can be enabled
  117. simultaneously.
  118. config FREERTOS_MAX_TASK_NAME_LEN
  119. int "configMAX_TASK_NAME_LEN"
  120. range 1 256
  121. default 16
  122. help
  123. Sets the maximum number of characters for task names (see configMAX_TASK_NAME_LEN documentation for
  124. more details).
  125. Note: For most uses, the default of 16 characters is sufficient.
  126. config FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
  127. bool "configENABLE_BACKWARD_COMPATIBILITY"
  128. default n
  129. depends on !IDF_TARGET_LINUX
  130. help
  131. Enable backward compatibility with APIs prior to FreeRTOS v8.0.0. (see
  132. configENABLE_BACKWARD_COMPATIBILITY documentation for more details).
  133. config FREERTOS_TIMER_SERVICE_TASK_NAME
  134. string "configTIMER_SERVICE_TASK_NAME"
  135. default "Tmr Svc"
  136. help
  137. Sets the timer task's name (see configTIMER_SERVICE_TASK_NAME documentation for more details).
  138. config FREERTOS_TIMER_TASK_PRIORITY
  139. int "configTIMER_TASK_PRIORITY"
  140. range 1 25
  141. default 1
  142. help
  143. Sets the timer task's priority (see configTIMER_TASK_PRIORITY documentation for more details).
  144. config FREERTOS_TIMER_TASK_STACK_DEPTH
  145. int "configTIMER_TASK_STACK_DEPTH"
  146. range 1536 32768
  147. default 2053 if IDF_TARGET_LINUX
  148. default 2048
  149. help
  150. Set the timer task's stack size (see configTIMER_TASK_STACK_DEPTH documentation for more details).
  151. config FREERTOS_TIMER_QUEUE_LENGTH
  152. int "configTIMER_QUEUE_LENGTH"
  153. range 5 20
  154. default 10
  155. help
  156. Set the timer task's command queue length (see configTIMER_QUEUE_LENGTH documentation for more
  157. details).
  158. config FREERTOS_QUEUE_REGISTRY_SIZE
  159. int "configQUEUE_REGISTRY_SIZE"
  160. range 0 20
  161. default 0
  162. help
  163. Set the size of the queue registry (see configQUEUE_REGISTRY_SIZE documentation for more details).
  164. Note: A value of 0 will disable queue registry functionality
  165. config FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES
  166. int "configTASK_NOTIFICATION_ARRAY_ENTRIES"
  167. range 1 32
  168. default 1
  169. help
  170. Set the size of the task notification array of each task. When increasing this value, keep in
  171. mind that this means additional memory for each and every task on the system.
  172. However, task notifications in general are more light weight compared to alternatives
  173. such as semaphores.
  174. config FREERTOS_USE_TRACE_FACILITY
  175. bool "configUSE_TRACE_FACILITY"
  176. default n
  177. help
  178. Enables additional structure members and functions to assist with execution visualization and tracing
  179. (see configUSE_TRACE_FACILITY documentation for more details).
  180. config FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
  181. bool "configUSE_STATS_FORMATTING_FUNCTIONS"
  182. depends on FREERTOS_USE_TRACE_FACILITY
  183. default n
  184. help
  185. Set configUSE_TRACE_FACILITY and configUSE_STATS_FORMATTING_FUNCTIONS to 1 to include the
  186. ``vTaskList()`` and ``vTaskGetRunTimeStats()`` functions in the build (see
  187. configUSE_STATS_FORMATTING_FUNCTIONS documentation for more details).
  188. config FREERTOS_USE_LIST_DATA_INTEGRITY_CHECK_BYTES
  189. bool "configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES"
  190. #TODO: Enable by default for debug builds (IDF-8517)
  191. default n
  192. help
  193. Enable list integrity checker (see configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES documentation for more details).
  194. config FREERTOS_VTASKLIST_INCLUDE_COREID
  195. # Core affinity is supported in stats for Amazon FreeRTOS SMP by default
  196. bool "Enable display of xCoreID in vTaskList"
  197. depends on !FREERTOS_SMP && FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
  198. default n
  199. help
  200. If enabled, this will include an extra column when vTaskList is called to display the CoreID the task
  201. is pinned to (0,1) or -1 if not pinned.
  202. config FREERTOS_GENERATE_RUN_TIME_STATS
  203. bool "configGENERATE_RUN_TIME_STATS"
  204. default n
  205. select FREERTOS_USE_TRACE_FACILITY
  206. select FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
  207. help
  208. Enables collection of run time statistics for each task (see configGENERATE_RUN_TIME_STATS
  209. documentation for more details).
  210. Note: The clock used for run time statistics can be configured in FREERTOS_RUN_TIME_STATS_CLK.
  211. choice FREERTOS_RUN_TIME_COUNTER_TYPE
  212. prompt "configRUN_TIME_COUNTER_TYPE"
  213. depends on FREERTOS_GENERATE_RUN_TIME_STATS && !FREERTOS_SMP
  214. default FREERTOS_RUN_TIME_COUNTER_TYPE_U32
  215. help
  216. Sets the data type used for the FreeRTOS run time stats. A larger data type can be used to reduce the
  217. frequency of the counter overflowing.
  218. config FREERTOS_RUN_TIME_COUNTER_TYPE_U32
  219. bool "uint32_t"
  220. help
  221. configRUN_TIME_COUNTER_TYPE is set to uint32_t
  222. config FREERTOS_RUN_TIME_COUNTER_TYPE_U64
  223. bool "uint64_t"
  224. help
  225. configRUN_TIME_COUNTER_TYPE is set to uint64_t
  226. endchoice # FREERTOS_RUN_TIME_COUNTER_TYPE
  227. config FREERTOS_USE_TICKLESS_IDLE
  228. # Todo: Currently not supported in SMP FreeRTOS yet (IDF-4986)
  229. # Todo: Consider whether this option should still be exposed (IDF-4986)
  230. bool "configUSE_TICKLESS_IDLE"
  231. depends on PM_ENABLE
  232. default n
  233. help
  234. If power management support is enabled, FreeRTOS will be able to put the system into light sleep mode
  235. when no tasks need to run for a number of ticks. This number can be set using
  236. FREERTOS_IDLE_TIME_BEFORE_SLEEP option. This feature is also known as "automatic light sleep".
  237. Note that timers created using esp_timer APIs may prevent the system from entering sleep mode, even
  238. when no tasks need to run. To skip unnecessary wake-up initialize a timer with the
  239. "skip_unhandled_events" option as true.
  240. If disabled, automatic light sleep support will be disabled.
  241. config FREERTOS_IDLE_TIME_BEFORE_SLEEP
  242. # Todo: Rename to CONFIG_FREERTOS_EXPECTED_IDLE_TIME_BEFORE_SLEEP (IDF-4986)
  243. int "configEXPECTED_IDLE_TIME_BEFORE_SLEEP"
  244. depends on FREERTOS_USE_TICKLESS_IDLE
  245. default 3
  246. range 2 4294967295
  247. # Minimal value is 2 because of a check in FreeRTOS.h (search configEXPECTED_IDLE_TIME_BEFORE_SLEEP)
  248. help
  249. FreeRTOS will enter light sleep mode if no tasks need to run for this number of ticks.
  250. You can enable PM_PROFILING feature in esp_pm components and dump the sleep status with
  251. esp_pm_dump_locks, if the proportion of rejected sleeps is too high, please increase
  252. this value to improve scheduling efficiency
  253. endmenu # Kernel
  254. menu "Port"
  255. # ESP-IDF FreeRTOS port configurations go here (and HW configurations related to FreeRTOS)
  256. config FREERTOS_TASK_FUNCTION_WRAPPER
  257. bool "Wrap task functions"
  258. depends on COMPILER_OPTIMIZATION_DEBUG || ESP_COREDUMP_ENABLE || ESP_GDBSTUB_ENABLED
  259. default y
  260. help
  261. If enabled, all FreeRTOS task functions will be enclosed in a wrapper function. If a task function
  262. mistakenly returns (i.e. does not delete), the call flow will return to the wrapper function. The
  263. wrapper function will then log an error and abort the application. This option is also required for GDB
  264. backtraces and C++ exceptions to work correctly inside top-level task functions.
  265. config FREERTOS_WATCHPOINT_END_OF_STACK
  266. bool "Enable stack overflow debug watchpoint"
  267. default n
  268. help
  269. FreeRTOS can check if a stack has overflown its bounds by checking either the value of the stack
  270. pointer or by checking the integrity of canary bytes. (See FREERTOS_CHECK_STACKOVERFLOW for more
  271. information.) These checks only happen on a context switch, and the situation that caused the stack
  272. overflow may already be long gone by then. This option will use the last debug memory watchpoint to
  273. allow breaking into the debugger (or panic'ing) as soon as any of the last 32 bytes on the stack of a
  274. task are overwritten. The side effect is that using gdb, you effectively have one hardware watchpoint
  275. less because the last one is overwritten as soon as a task switch happens.
  276. Another consequence is that due to alignment requirements of the watchpoint, the usable stack size
  277. decreases by up to 60 bytes. This is because the watchpoint region has to be aligned to its size and
  278. the size for the stack watchpoint in IDF is 32 bytes.
  279. This check only triggers if the stack overflow writes within 32 bytes near the end of the stack, rather
  280. than overshooting further, so it is worth combining this approach with one of the other stack overflow
  281. check methods.
  282. When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no JTAG OCD is attached,
  283. esp-idf will panic on an unhandled debug exception.
  284. config FREERTOS_TLSP_DELETION_CALLBACKS
  285. bool "Enable thread local storage pointers deletion callbacks"
  286. depends on (FREERTOS_THREAD_LOCAL_STORAGE_POINTERS > 0)
  287. default y
  288. help
  289. ESP-IDF provides users with the ability to free TLSP memory by registering TLSP deletion callbacks.
  290. These callbacks are automatically called by FreeRTOS when a task is deleted. When this option is turned
  291. on, the memory reserved for TLSPs in the TCB is doubled to make space for storing the deletion
  292. callbacks. If the user does not wish to use TLSP deletion callbacks then this option could be turned
  293. off to save space in the TCB memory.
  294. config FREERTOS_TASK_PRE_DELETION_HOOK
  295. # This option is a replacement for FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP (which is now deprecated). If the
  296. # deprecated option is defined, we hide this option to avoid multiple pre-deletion hooks from running.
  297. bool "Enable task pre-deletion hook"
  298. depends on !FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
  299. default n
  300. help
  301. Enable this option to make FreeRTOS call a user provided hook function right before it deletes a task
  302. (i.e., frees/releases a dynamically/statically allocated task's memory). This is useful if users want
  303. to know when a task is actually deleted (in case the task's deletion is delegated to the IDLE task).
  304. If this config option is enabled, users must define a ``void vTaskPreDeletionHook( void * pxTCB )``
  305. hook function in their application.
  306. config FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP
  307. # This option is deprecated (replaced by FREERTOS_TASK_PRE_DELETION_HOOK) but still exists to maintain
  308. # compatibility. Todo: Remove by v6.0 (see IDF-8097).
  309. bool "Enable static task clean up hook (DEPRECATED)"
  310. default n
  311. help
  312. THIS OPTION IS DEPRECATED. Use FREERTOS_TASK_PRE_DELETION_HOOK instead.
  313. Enable this option to make FreeRTOS call the static task clean up hook when a task is deleted.
  314. Note: Users will need to provide a ``void vPortCleanUpTCB ( void *pxTCB )`` callback
  315. config FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER
  316. # This feature is innately supported in FreeRTOS SMP, and hence not available as a config option when
  317. # FreeRTOS SMP is enabled.
  318. depends on !FREERTOS_SMP
  319. bool "Check that mutex semaphore is given by owner task"
  320. default y
  321. help
  322. If enabled, assert that when a mutex semaphore is given, the task giving the semaphore is the task
  323. which is currently holding the mutex.
  324. config FREERTOS_ISR_STACKSIZE
  325. int "ISR stack size"
  326. range 2096 32768 if ESP_COREDUMP_DATA_FORMAT_ELF
  327. default 2096 if ESP_COREDUMP_DATA_FORMAT_ELF
  328. range 1536 32768
  329. default 1536
  330. help
  331. The interrupt handlers have their own stack. The size of the stack can be defined here. Each processor
  332. has its own stack, so the total size occupied will be twice this.
  333. config FREERTOS_INTERRUPT_BACKTRACE
  334. # Todo: Consider removing this. Not sure when users will ever want it to be disabled (IDF-4986)
  335. bool "Enable backtrace from interrupt to task context"
  336. default y
  337. help
  338. If this option is enabled, interrupt stack frame will be modified to point to the code of the
  339. interrupted task as its return address. This helps the debugger (or the panic handler) show a backtrace
  340. from the interrupt to the task which was interrupted. This also works for nested interrupts: higher
  341. level interrupt stack can be traced back to the lower level interrupt. This option adds 4 instructions
  342. to the interrupt dispatching code.
  343. config FREERTOS_FPU_IN_ISR
  344. bool "Use float in Level 1 ISR"
  345. depends on IDF_TARGET_ESP32
  346. default n
  347. help
  348. When enabled, the usage of float type is allowed inside Level 1 ISRs. Note that usage of float types in
  349. higher level interrupts is still not permitted.
  350. config FREERTOS_TICK_SUPPORT_CORETIMER
  351. bool
  352. default y if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2
  353. config FREERTOS_TICK_SUPPORT_SYSTIMER
  354. bool
  355. default y if !FREERTOS_TICK_SUPPORT_CORETIMER
  356. # All targets except ESP32 and ESP32S2 can use Systimer for FreeRTOS SysTick
  357. # ESP32S2 also has SYSTIMER but it can not be used for the FreeRTOS SysTick because:
  358. # - It has only one counter, which already in use esp_timer.
  359. # A counter for SysTick should be stall in debug mode but work esp_timer.
  360. # - It is not possible to allocate two handlers for esp_timer and SysTick.
  361. choice FREERTOS_CORETIMER
  362. prompt "Tick timer source (Xtensa Only)"
  363. default FREERTOS_CORETIMER_0 if FREERTOS_TICK_SUPPORT_CORETIMER
  364. default FREERTOS_CORETIMER_SYSTIMER_LVL1 if FREERTOS_TICK_SUPPORT_SYSTIMER
  365. help
  366. FreeRTOS needs a timer with an associated interrupt to use as the main tick source to increase
  367. counters, run timers and do pre-emptive multitasking with. There are multiple timers available to do
  368. this, with different interrupt priorities.
  369. config FREERTOS_CORETIMER_0
  370. bool "Timer 0 (int 6, level 1)"
  371. depends on FREERTOS_TICK_SUPPORT_CORETIMER
  372. help
  373. Select this to use timer 0
  374. config FREERTOS_CORETIMER_1
  375. bool "Timer 1 (int 15, level 3)"
  376. depends on FREERTOS_TICK_SUPPORT_CORETIMER
  377. help
  378. Select this to use timer 1
  379. config FREERTOS_CORETIMER_SYSTIMER_LVL1
  380. bool "SYSTIMER 0 (level 1)"
  381. depends on FREERTOS_TICK_SUPPORT_SYSTIMER
  382. help
  383. Select this to use systimer with the 1 interrupt priority.
  384. config FREERTOS_CORETIMER_SYSTIMER_LVL3
  385. bool "SYSTIMER 0 (level 3)"
  386. depends on FREERTOS_TICK_SUPPORT_SYSTIMER
  387. help
  388. Select this to use systimer with the 3 interrupt priority.
  389. endchoice # FREERTOS_CORETIMER
  390. config FREERTOS_SYSTICK_USES_SYSTIMER
  391. bool
  392. default y if FREERTOS_CORETIMER_SYSTIMER_LVL1 || FREERTOS_CORETIMER_SYSTIMER_LVL3
  393. select ESP_SLEEP_SYSTIMER_STALL_WORKAROUND if IDF_TARGET_ESP32C3
  394. config FREERTOS_SYSTICK_USES_CCOUNT
  395. bool
  396. default y if FREERTOS_CORETIMER_0 || FREERTOS_CORETIMER_1
  397. choice FREERTOS_RUN_TIME_STATS_CLK
  398. prompt "Choose the clock source for run time stats"
  399. depends on FREERTOS_GENERATE_RUN_TIME_STATS
  400. default FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER
  401. help
  402. Choose the clock source for FreeRTOS run time stats. Options are CPU0's CPU Clock or the ESP Timer.
  403. Both clock sources are 32 bits. The CPU Clock can run at a higher frequency hence provide a finer
  404. resolution but will overflow much quicker. Note that run time stats are only valid until the clock
  405. source overflows.
  406. config FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER
  407. bool "Use ESP TIMER for run time stats"
  408. help
  409. ESP Timer will be used as the clock source for FreeRTOS run time stats. The ESP Timer runs at a
  410. frequency of 1MHz regardless of Dynamic Frequency Scaling. Therefore the ESP Timer will overflow in
  411. approximately 4290 seconds.
  412. config FREERTOS_RUN_TIME_STATS_USING_CPU_CLK
  413. # Todo: This should be disabled for multi-core due to different CCOUNTs (IDF-4986)
  414. bool "Use CPU Clock for run time stats"
  415. depends on FREERTOS_SYSTICK_USES_CCOUNT
  416. help
  417. CPU Clock will be used as the clock source for the generation of run time stats. The CPU Clock has
  418. a frequency dependent on ESP_DEFAULT_CPU_FREQ_MHZ and Dynamic Frequency Scaling (DFS). Therefore
  419. the CPU Clock frequency can fluctuate between 80 to 240MHz. Run time stats generated using the CPU
  420. Clock represents the number of CPU cycles each task is allocated and DOES NOT reflect the amount of
  421. time each task runs for (as CPU clock frequency can change). If the CPU clock consistently runs at
  422. the maximum frequency of 240MHz, it will overflow in approximately 17 seconds.
  423. endchoice # FREERTOS_RUN_TIME_STATS_CLK
  424. config FREERTOS_PLACE_FUNCTIONS_INTO_FLASH
  425. bool "Place FreeRTOS functions into Flash"
  426. default n
  427. help
  428. When enabled the selected Non-ISR FreeRTOS functions will be placed into Flash memory instead of IRAM.
  429. This saves up to 8KB of IRAM depending on which functions are used.
  430. config FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE
  431. # Todo: Check if we still need this (IDF-4986)
  432. bool "Tests compliance with Vanilla FreeRTOS port*_CRITICAL calls"
  433. default n
  434. help
  435. If enabled, context of port*_CRITICAL calls (ISR or Non-ISR) would be checked to be in compliance with
  436. Vanilla FreeRTOS. e.g Calling port*_CRITICAL from ISR context would cause assert failure
  437. endmenu # Port
  438. # Hidden or compatibility options
  439. config FREERTOS_PORT
  440. # This invisible config value indicates the FreeRTOS is selected as the current RTOS used by ESP-IDF
  441. bool
  442. default y
  443. config FREERTOS_NO_AFFINITY
  444. # This invisible config value sets the value of tskNO_AFFINITY in task.h.
  445. # Intended to be used as a constant from other Kconfig files.
  446. # Value is (32-bit) INT_MAX.
  447. hex
  448. default 0x7FFFFFFF if !FREERTOS_SMP
  449. default 0xFFFFFFFF if FREERTOS_SMP
  450. config FREERTOS_SUPPORT_STATIC_ALLOCATION
  451. # Always enabled. Kconfig option preserved for compatibility with code which checked for
  452. # CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION.
  453. # Todo: Check if we still need this (IDF-4986)
  454. bool
  455. default y
  456. config FREERTOS_DEBUG_OCDAWARE
  457. bool
  458. help
  459. Hidden option, gets selected by CONFIG_ESP_DEBUG_OCDAWARE
  460. config FREERTOS_ENABLE_TASK_SNAPSHOT
  461. # Invisible option that is always enabled. Task Snapshot APIs are now private thus are always enabled. This
  462. # option is kept here in case any user code conditionally depends on this option.
  463. # Todo: Remove in v6.0 (IDF-8143)
  464. bool
  465. default y
  466. config FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH
  467. # Invisible option that is always enabled. Task Snapshot APIs are now private API thus are always placed into
  468. # flash by default. This option is kept here in case any user code conditionally depends on this option.
  469. # Todo: Remove in v6.0 (IDF-8143)
  470. bool
  471. default y
  472. depends on !ESP_PANIC_HANDLER_IRAM
  473. endmenu # FreeRTOS