-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compilation for PICO_BOARD=pico_w when cyw43_arch is missing #525
base: develop
Are you sure you want to change the base?
Conversation
pretty sure this is supposed to work so @peterharperuk may want to revist this |
If ${PICO_CYW43_DRIVER_PATH}/${CYW43_DRIVER_TEST_FILE} is missing then we don't add the cyw43_driver_picow library. If cyw43_driver_picow doesn't exist we don't add the pico_cyw43_arch library. We have this guarding the pico_w examples, so I guess we should have it here as well. if (PICO_CYW43_SUPPORTED) # set by PICO_BOARD=pico_w But having said that. I don't like the change. It looks brittle having the repetition in the cmake files. I'd rather just fix the examples to do the right thing. |
@@ -43,7 +43,11 @@ function(add_subdirectory_exclude_platforms NAME) | |||
endfunction() | |||
|
|||
# Add blink example | |||
add_subdirectory_exclude_platforms(blink) | |||
if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch) | |||
message("Wi-Fi driver is not available") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had meant "Skipping blink example as Wi-Fi driver is not available"
Can you also move this check into the blink CMakeLists.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also move this check into the blink CMakeLists.txt
By the time we're "in" the blink CMakeLists.txt, is it not then too late to call add_subdirectory_exclude_platforms(blink)
?
@@ -5,7 +5,11 @@ 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 AND NOT TARGET pico_cyw43_arch) | |||
message("Skipping read_vsys for Pico W as support is not available") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and fix this up to be "as Wi Fi driver is not available"
This comment was marked as abuse.
This comment was marked as abuse.
The issue will be fixed after this PR is merged, but we're still discussing the finer details 🙂 |
Currently, if you try to build all of
pico-examples
for the Pico W and you haven't yet init-ed thecyw43-driver
submodule inpico-sdk
, then the build ofpico-examples
will halt with a fatal build-error. This PR fixes that 🙂I'm not very familiar with CMake though, so perhaps there's a "neater" way of doing what I'm doing here?