update freeRTOS kernel to latest for library cmake

add per family freeRTOSConfig.h also make changes to build with
freertos_kernel cmake
- hard coded configPRIO_BITS based on family
- change configSUPPORT_STATIC_ALLOCATION to 0,
configSUPPORT_DYNAMIC_ALLOCATION to 1
- enable configRECORD_STACK_HIGH_ADDRESS for tracing
- enable INCLUDE_xTaskGetCurrentTaskHandle which is required to compile
stream_buffer (although we don't use it).
This commit is contained in:
hathach
2023-04-21 20:55:44 +07:00
parent 6daa135201
commit 11e1aff389
5 changed files with 219 additions and 5 deletions

View File

@@ -58,6 +58,8 @@ function(family_configure_target TARGET)
target_link_options(${TARGET} PUBLIC
"LINKER:--script=${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_VARIANT}xxxxx_flexspi_nor.ld"
)
else ()
# TODO support IAR
endif ()
target_include_directories(${TARGET} PUBLIC
@@ -77,6 +79,22 @@ function(family_configure_target TARGET)
include(${TOP}/src/CMakeLists.txt)
endfunction()
function(family_add_freertos_config TARGET)
add_library(freertos_config INTERFACE)
# add path to FreeRTOSConfig.h
target_include_directories(freertos_config SYSTEM INTERFACE
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/FreeRTOSConfig
)
# select freertos port
if (TOOLCHAIN STREQUAL "gcc")
set(FREERTOS_PORT "GCC_ARM_CM7" CACHE INTERNAL "")
else ()
# TODO support IAR
endif ()
endfunction()
function(family_configure_device_example TARGET)
family_configure_target(${TARGET})
endfunction()