freertos: Update SMP idle hooks

This commit updates the usage of idle hooks in SMP FreeRTOS as follows:

- IDF style idle hooks are now called from vApplicationMinimalIdleHook()
- If the user provdies their own vApplicationMinimalIdleHook(), it can be
  wrapped using -Wl,--wrap if CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK is
  enabled.
- SMP port no longer uses vApplicationIdleHook() as it's only called from
  the prvIdleTask() and not every prvMinimalIdleTask()
This commit is contained in:
Darian Leung
2022-03-24 11:29:10 +08:00
parent e13bb580c7
commit e6d43ab56f
4 changed files with 32 additions and 9 deletions
+6
View File
@@ -206,6 +206,12 @@ else()
list(APPEND link_options "-Wl,--gc-sections")
endif()
# SMP FreeRTOS user provided minimal idle hook. This allows the user to provide
# their own copy of vApplicationMinimalIdleHook()
if(CONFIG_FREERTOS_USE_MINIMAL_IDLE_HOOK)
list(APPEND link_options "-Wl,--wrap=vApplicationMinimalIdleHook")
endif()
# Placing jump tables in flash would cause issues with code that required
# to be placed in IRAM
list(APPEND compile_options "-fno-jump-tables")