@ -21,20 +21,31 @@ if (NOT TARGET _FreeRTOS_kernel_inclusion_marker)
pico_is_top_level_project ( FREERTOS_KERNEL_TOP_LEVEL_PROJECT )
# i f t h e S D K h a s a l r e a d y b e e n i n i t i a l i z e d , t h e n j u s t a d d o u r l i b r a r i e s n o w - t h i s a l l o w s
# t h i s F r e e R T O S p o r t t o j u s t b e a d d e d a s a s u b - d i r e c t o r y o r i n c l u d e w i t h i n a n o t h e r p r o j e c t , r a t h e r t h a n
# h a v i n g t o i n c l u d e i t a t t h e t o p l e v e l b e f o r e pico_sdk_init ( )
if ( TARGET _pico_sdk_inclusion_marker )
if ( PICO_SDK_VERSION_STRING VERSION_LESS "1.3.2" )
message ( FATAL_ERROR "Require at least Raspberry Pi Pico SDK version 1.3.2 to include FreeRTOS after pico_sdk_init()" )
endif ( )
include ( ${ CMAKE_CURRENT_LIST_DIR } /library.cmake )
else ( )
# T h e r e a l w o r k g e t s d o n e i n l i b r a r y . c m a k e w h i c h i s c a l l e d a t t h e e n d o f p i c o _ s d k _ i n i t
list ( APPEND PICO_SDK_POST_LIST_FILES ${ CMAKE_CURRENT_LIST_DIR } /library.cmake )
if ( PICO_SDK_VERSION_STRING VERSION_LESS "1.3.2" )
# W e n e e d t o i n j e c t t h e f o l l o w i n g h e a d e r f i l e i n t o A L L S D K files ( which we do via the config header )
list ( APPEND PICO_CONFIG_HEADER_FILES ${ CMAKE_CURRENT_LIST_DIR } /include/freertos_sdk_config.h )
endif ( )
if ( FREERTOS_KERNEL_TOP_LEVEL_PROJECT )
message ( "FreeRTOS: initialize SDK since we're the top-level" )
# I n i t i a l i z e t h e S D K
pico_sdk_init ( )
else ( )
set ( PICO_SDK_POST_LIST_FILES ${ PICO_SDK_POST_LIST_FILES } PARENT_SCOPE )
set ( PICO_CONFIG_HEADER_FILES ${ PICO_CONFIG_HEADER_FILES } PARENT_SCOPE )
set ( FREERTOS_KERNEL_PATH ${ FREERTOS_KERNEL_PATH } PARENT_SCOPE )
set ( PICO_CONFIG_HEADER_FILES ${ PICO_CONFIG_HEADER_FILES } PARENT_SCOPE )
set ( PICO_SDK_POST_LIST_FILES ${ PICO_SDK_POST_LIST_FILES } PARENT_SCOPE )
endif ( )
endif ( )
endif ( )