RP2040: Allow FreeRTOS to be added to the parent CMake project post initialization of the Pico SDK (#497)

Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
This commit is contained in:
Graham Sanderson 2022-06-24 06:52:49 -05:00 committed by GitHub
parent 7af41c29cb
commit d2a81539e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 17 deletions

View file

@ -16,6 +16,11 @@ target_sources(FreeRTOS-Kernel-Core INTERFACE
)
target_include_directories(FreeRTOS-Kernel-Core INTERFACE ${FREERTOS_KERNEL_PATH}/include)
if (PICO_SDK_VERSION_STRING VERSION_GREATER_EQUAL "1.3.2")
target_compile_definitions(FreeRTOS-Kernel-Core INTERFACE
PICO_CONFIG_RTOS_ADAPTER_HEADER=${CMAKE_CURRENT_LIST_DIR}/include/freertos_sdk_config.h)
endif()
add_library(FreeRTOS-Kernel INTERFACE)
target_sources(FreeRTOS-Kernel INTERFACE
${CMAKE_CURRENT_LIST_DIR}/port.c