From 850b69b44565fa6cd87dcc8f176a860c08ace388 Mon Sep 17 00:00:00 2001 From: Thomas Eberhardt Date: Sat, 21 Dec 2024 09:11:54 +0100 Subject: [PATCH] move stdio_msc_usb back to libs Also use PICO_CYW43_SUPPORTED in CMakeLists.txt to decide if to link the pico_cyw43_arch_none library, as done by pico-examples. --- picosim/{srcsim => libs}/stdio_msc_usb/CMakeLists.txt | 0 .../stdio_msc_usb/include/stdio_msc_usb.h | 0 .../{srcsim => libs}/stdio_msc_usb/include/tusb_config.h | 0 picosim/{srcsim => libs}/stdio_msc_usb/msc_usb.c | 0 picosim/{srcsim => libs}/stdio_msc_usb/reset_interface.c | 0 picosim/{srcsim => libs}/stdio_msc_usb/stdio_msc_usb.c | 0 .../stdio_msc_usb/stdio_msc_usb_descriptors.c | 0 picosim/srcsim/CMakeLists.txt | 8 +++----- 8 files changed, 3 insertions(+), 5 deletions(-) rename picosim/{srcsim => libs}/stdio_msc_usb/CMakeLists.txt (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/include/stdio_msc_usb.h (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/include/tusb_config.h (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/msc_usb.c (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/reset_interface.c (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/stdio_msc_usb.c (100%) rename picosim/{srcsim => libs}/stdio_msc_usb/stdio_msc_usb_descriptors.c (100%) diff --git a/picosim/srcsim/stdio_msc_usb/CMakeLists.txt b/picosim/libs/stdio_msc_usb/CMakeLists.txt similarity index 100% rename from picosim/srcsim/stdio_msc_usb/CMakeLists.txt rename to picosim/libs/stdio_msc_usb/CMakeLists.txt diff --git a/picosim/srcsim/stdio_msc_usb/include/stdio_msc_usb.h b/picosim/libs/stdio_msc_usb/include/stdio_msc_usb.h similarity index 100% rename from picosim/srcsim/stdio_msc_usb/include/stdio_msc_usb.h rename to picosim/libs/stdio_msc_usb/include/stdio_msc_usb.h diff --git a/picosim/srcsim/stdio_msc_usb/include/tusb_config.h b/picosim/libs/stdio_msc_usb/include/tusb_config.h similarity index 100% rename from picosim/srcsim/stdio_msc_usb/include/tusb_config.h rename to picosim/libs/stdio_msc_usb/include/tusb_config.h diff --git a/picosim/srcsim/stdio_msc_usb/msc_usb.c b/picosim/libs/stdio_msc_usb/msc_usb.c similarity index 100% rename from picosim/srcsim/stdio_msc_usb/msc_usb.c rename to picosim/libs/stdio_msc_usb/msc_usb.c diff --git a/picosim/srcsim/stdio_msc_usb/reset_interface.c b/picosim/libs/stdio_msc_usb/reset_interface.c similarity index 100% rename from picosim/srcsim/stdio_msc_usb/reset_interface.c rename to picosim/libs/stdio_msc_usb/reset_interface.c diff --git a/picosim/srcsim/stdio_msc_usb/stdio_msc_usb.c b/picosim/libs/stdio_msc_usb/stdio_msc_usb.c similarity index 100% rename from picosim/srcsim/stdio_msc_usb/stdio_msc_usb.c rename to picosim/libs/stdio_msc_usb/stdio_msc_usb.c diff --git a/picosim/srcsim/stdio_msc_usb/stdio_msc_usb_descriptors.c b/picosim/libs/stdio_msc_usb/stdio_msc_usb_descriptors.c similarity index 100% rename from picosim/srcsim/stdio_msc_usb/stdio_msc_usb_descriptors.c rename to picosim/libs/stdio_msc_usb/stdio_msc_usb_descriptors.c diff --git a/picosim/srcsim/CMakeLists.txt b/picosim/srcsim/CMakeLists.txt index b962b05d..9d986898 100644 --- a/picosim/srcsim/CMakeLists.txt +++ b/picosim/srcsim/CMakeLists.txt @@ -68,10 +68,9 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${Z80PACK}/z80core ) -add_subdirectory(stdio_msc_usb) - add_subdirectory(../libs/no-OS-FatFS-SD-SDIO-SPI-RPi-Pico/src FatFs) add_subdirectory(../libs/pico-ds3231/lib ds3231) +add_subdirectory(../libs/stdio_msc_usb stdio_msc_usb) target_compile_definitions(${PROJECT_NAME} PRIVATE PICO_STACK_SIZE=4096 @@ -107,12 +106,11 @@ target_link_libraries(${PROJECT_NAME} pico_stdlib tinyusb_device - stdio_msc_usb - no-OS-FatFS-SD-SDIO-SPI-RPi-Pico pico-ds3231 + stdio_msc_usb ) -if(PICO_BOARD STREQUAL pico_w OR PICO_BOARD STREQUAL pico2_w) +if(PICO_CYW43_SUPPORTED) target_link_libraries(${PROJECT_NAME} pico_cyw43_arch_none )