From 0dc6d1685dd1512c6d479834f8e06bb645ab690b Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Thu, 22 Aug 2024 10:34:17 +0100 Subject: [PATCH 1/3] Fix compilation for PICO_BOARD=pico_w when cyw43_arch is missing --- CMakeLists.txt | 10 +++++++++- adc/CMakeLists.txt | 12 ++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59c958630..58ee47148 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,15 @@ function(add_subdirectory_exclude_platforms NAME) endfunction() # Add blink example -add_subdirectory_exclude_platforms(blink) +if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w + if (NOT TARGET pico_cyw43_arch) + message("Skipping blink for Pico W as support is not available") + else() + add_subdirectory_exclude_platforms(blink) + endif() +else() + add_subdirectory_exclude_platforms(blink) +endif() add_subdirectory_exclude_platforms(blink_simple) # Add hello world example diff --git a/adc/CMakeLists.txt b/adc/CMakeLists.txt index 71c423541..b628a4547 100644 --- a/adc/CMakeLists.txt +++ b/adc/CMakeLists.txt @@ -5,7 +5,15 @@ if (TARGET hardware_adc) add_subdirectory_exclude_platforms(joystick_display) add_subdirectory_exclude_platforms(onboard_temperature) add_subdirectory_exclude_platforms(microphone_adc) - add_subdirectory_exclude_platforms(read_vsys) + if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w + if (NOT TARGET pico_cyw43_arch) + message("Skipping read_vsys for Pico W as support is not available") + else() + add_subdirectory_exclude_platforms(read_vsys) + endif() + else() + add_subdirectory_exclude_platforms(read_vsys) + endif() else() message("Skipping ADC examples as hardware_adc is unavailable on this platform") -endif() \ No newline at end of file +endif() From 50d495d1bc16d97cb5ce574f30cd3d6749c17b01 Mon Sep 17 00:00:00 2001 From: Peter Harper Date: Thu, 22 Aug 2024 18:36:14 +0100 Subject: [PATCH 2/3] Simplify things a bit --- CMakeLists.txt | 8 ++------ adc/CMakeLists.txt | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58ee47148..8f601316a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,12 +43,8 @@ function(add_subdirectory_exclude_platforms NAME) endfunction() # Add blink example -if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w - if (NOT TARGET pico_cyw43_arch) - message("Skipping blink for Pico W as support is not available") - else() - add_subdirectory_exclude_platforms(blink) - endif() +if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch) + message("Skipping blink for Pico W as support is not available") else() add_subdirectory_exclude_platforms(blink) endif() diff --git a/adc/CMakeLists.txt b/adc/CMakeLists.txt index b628a4547..5168ce2f3 100644 --- a/adc/CMakeLists.txt +++ b/adc/CMakeLists.txt @@ -5,12 +5,8 @@ if (TARGET hardware_adc) add_subdirectory_exclude_platforms(joystick_display) add_subdirectory_exclude_platforms(onboard_temperature) add_subdirectory_exclude_platforms(microphone_adc) - if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w - if (NOT TARGET pico_cyw43_arch) - message("Skipping read_vsys for Pico W as support is not available") - else() - add_subdirectory_exclude_platforms(read_vsys) - endif() + if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch) + message("Skipping read_vsys for Pico W as support is not available") else() add_subdirectory_exclude_platforms(read_vsys) endif() From 0c88be2839a4aa10c950e353f501adda9a043357 Mon Sep 17 00:00:00 2001 From: Peter Harper Date: Tue, 3 Sep 2024 14:10:54 +0100 Subject: [PATCH 3/3] Fix message displayed when cyw43-driver is missing --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f601316a..6e1ecfef4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ endfunction() # Add blink example if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch) - message("Skipping blink for Pico W as support is not available") + message("Wi-Fi driver is not available") else() add_subdirectory_exclude_platforms(blink) endif()