Skip to content

Commit 6f63294

Browse files
committed
Fix CMake build for RP2040
Add public dependency to hardware_sync because portable\ThirdParty\GCC\RP2040\include\portmacro.h exposes include "hardware/sync.h" to FreeRTOS.h which is PUBLIC. Add private dependency to pico_multicore because of usage prvFIFOInterruptHandler() and sio_hw in portable/ThirdParty/GCC/RP2040/port.c.
1 parent 874fa7b commit 6f63294

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

portable/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,11 @@ target_include_directories(freertos_kernel_port_headers INTERFACE
12151215
$<$<STREQUAL:${FREERTOS_PORT},WIZC_PIC18>:${CMAKE_CURRENT_LIST_DIR}/WizC/PIC18>
12161216
)
12171217

1218+
target_link_libraries(freertos_kernel_port_headers
1219+
INTERFACE
1220+
$<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:hardware_sync>
1221+
)
1222+
12181223
if(FREERTOS_PORT STREQUAL GCC_POSIX)
12191224
find_package(Threads REQUIRED)
12201225
endif()
@@ -1227,6 +1232,6 @@ target_link_libraries(freertos_kernel_port
12271232
PRIVATE
12281233
freertos_kernel_include
12291234
$<$<STREQUAL:${FREERTOS_PORT},GCC_POSIX>:Threads::Threads>
1230-
"$<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:hardware_clocks;hardware_exception>"
1235+
"$<$<STREQUAL:${FREERTOS_PORT},GCC_RP2040>:hardware_clocks;hardware_exception;pico_multicore>"
12311236
$<$<STREQUAL:${FREERTOS_PORT},MSVC_MINGW>:winmm> # Windows library which implements timers
12321237
)

0 commit comments

Comments
 (0)