Merge branch 'main' into update-end-scheduler-free-resource

This commit is contained in:
chinglee-iot 2024-01-31 09:42:16 +08:00 committed by GitHub
commit 001d1f204d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View file

@ -217,16 +217,17 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
" port.c\n" " port.c\n"
" portmacro.h\n" " portmacro.h\n"
" Where FreeRTOSCustomPort/CMakeLists.txt is a modified version of:\n" " Where FreeRTOSCustomPort/CMakeLists.txt is a modified version of:\n"
" add_library(freertos_kernel_port STATIC)\n" " add_library(freertos_kernel_port OBJECT)\n"
" target_sources(freertos_kernel_port\n" " target_sources(freertos_kernel_port\n"
" PRIVATE\n" " PRIVATE\n"
" port.c\n" " port.c\n"
" portmacro.h)\n" " portmacro.h)\n"
" target_include_directories(freertos_kernel_port\n" " add_library(freertos_kernel_port_headers INTERFACE)\n"
" PUBLIC\n" " target_include_directories(freertos_kernel_port_headers INTERFACE \n"
" .)\n" " .)\n"
" target_link_libraries(freertos_kernel_port\n" " target_link_libraries(freertos_kernel_port\n"
" PRIVATE\n" " PRIVATE\n"
" freertos_kernel_port_headers\n"
" freertos_kernel_include)") " freertos_kernel_include)")
endif() endif()
@ -257,8 +258,11 @@ endif()
target_link_libraries(freertos_kernel target_link_libraries(freertos_kernel
PUBLIC PUBLIC
freertos_kernel_port
freertos_kernel_include freertos_kernel_include
freertos_kernel_port_headers
PRIVATE
freertos_kernel_port
) )
######################################################################## ########################################################################

View file

@ -15,7 +15,7 @@ endif()
# FreeRTOS internal cmake file. Do not use it in user top-level project # FreeRTOS internal cmake file. Do not use it in user top-level project
add_library(freertos_kernel_port STATIC add_library(freertos_kernel_port OBJECT
# TEMPLATE Port # TEMPLATE Port
$<$<STREQUAL:${FREERTOS_PORT},TEMPLATE>: $<$<STREQUAL:${FREERTOS_PORT},TEMPLATE>:
template/port.c> template/port.c>
@ -755,8 +755,9 @@ if( FREERTOS_PORT MATCHES "GCC_ARM_CM(3|4)_MPU" OR
Common/mpu_wrappers_v2.c Common/mpu_wrappers_v2.c
) )
endif() endif()
add_library(freertos_kernel_port_headers INTERFACE)
target_include_directories(freertos_kernel_port PUBLIC target_include_directories(freertos_kernel_port_headers INTERFACE
# TEMPLATE Port # TEMPLATE Port
$<$<STREQUAL:${FREERTOS_PORT},TEMPLATE>:${CMAKE_CURRENT_LIST_DIR}/template> $<$<STREQUAL:${FREERTOS_PORT},TEMPLATE>:${CMAKE_CURRENT_LIST_DIR}/template>
@ -1094,6 +1095,7 @@ target_link_libraries(freertos_kernel_port
PUBLIC PUBLIC
$<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:pico_base_headers> $<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:pico_base_headers>
$<$<STREQUAL:${FREERTOS_PORT},GCC_XTENSA_ESP32>:idf::esp32> $<$<STREQUAL:${FREERTOS_PORT},GCC_XTENSA_ESP32>:idf::esp32>
freertos_kernel_port_headers
PRIVATE PRIVATE
freertos_kernel_include freertos_kernel_include
$<$<STREQUAL:${FREERTOS_PORT},GCC_POSIX>:Threads::Threads> $<$<STREQUAL:${FREERTOS_PORT},GCC_POSIX>:Threads::Threads>