From cb0e7172105fd8f0dccb46fc599ec956f2d038bf Mon Sep 17 00:00:00 2001 From: Cavin McKinley <30472644+mcknly@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:05:06 -0500 Subject: [PATCH] Moved pico-sdk-specific hw libraries from root CMakeLists.txt to hardware/rp2xxx/prebuild.cmake (#27) --- CMakeLists.txt | 6 ------ hardware/rp2xxx/prebuild.cmake | 10 +++++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d788bc6..965b690 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,12 +40,6 @@ target_link_libraries(${PROJ_NAME} PUBLIC cli littlefs cmake_git_version_tracking - hardware_i2c - hardware_spi - hardware_flash - hardware_adc - cmsis_core - tinyusb_device ${hardware_libs} ) target_include_directories(${PROJ_NAME} PUBLIC diff --git a/hardware/rp2xxx/prebuild.cmake b/hardware/rp2xxx/prebuild.cmake index 673ad59..bea7da2 100644 --- a/hardware/rp2xxx/prebuild.cmake +++ b/hardware/rp2xxx/prebuild.cmake @@ -8,7 +8,15 @@ include(${hardware_dir}/pico_sdk_import.cmake) # Platform-specific variable for paths/libraries/etc set(hardware_includes ${hardware_dir}) -set(hardware_libs "pico_unique_id" "pico_stdlib") +set(hardware_libs "pico_unique_id" + "pico_stdlib" + "hardware_i2c" + "hardware_spi" + "hardware_flash" + "hardware_adc" + "cmsis_core" + "tinyusb_device" +) # FreeRTOS port subdirectory for this platform (relative to $FREERTOS_KERNEL_PATH) # If it is a RP2350 board the board name needs to be added here to select the right port