Skip to content

Fix compilation for PICO_BOARD=pico_w when cyw43_arch is missing#525

Open
lurch wants to merge 4 commits into
developfrom
fix_picow_build
Open

Fix compilation for PICO_BOARD=pico_w when cyw43_arch is missing#525
lurch wants to merge 4 commits into
developfrom
fix_picow_build

Conversation

@lurch

@lurch lurch commented Aug 22, 2024

Copy link
Copy Markdown
Contributor

Currently, if you try to build all of pico-examples for the Pico W and you haven't yet init-ed the cyw43-driver submodule in pico-sdk, then the build of pico-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?

@kilograham

Copy link
Copy Markdown
Contributor

pretty sure this is supposed to work so @peterharperuk may want to revist this

@peterharperuk

peterharperuk commented Aug 22, 2024

Copy link
Copy Markdown
Contributor

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
if (NOT TARGET pico_cyw43_arch)
message("Skipping Pico W examples as support is not available")
else()

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.

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
peterharperuk
peterharperuk previously approved these changes Sep 3, 2024
Comment thread CMakeLists.txt Outdated
Comment thread adc/CMakeLists.txt Outdated
@seamusdemora

This comment was marked as abuse.

@lurch

lurch commented Sep 4, 2024

Copy link
Copy Markdown
Contributor Author

as someone who got "tripped up" with the cyw43 thing, I hope this issue has been fixed - and thanks!

The issue will be fixed after this PR is merged, but we're still discussing the finer details 🙂

@kilograham kilograham left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marked as unapproved since there are comments

@peterharperuk peterharperuk self-assigned this Nov 22, 2024
@peterharperuk

Copy link
Copy Markdown
Contributor

@kilograham I've addressed the comments for this and it seems to work now.

@@ -1,3 +1,6 @@
if (PICO_CYW43_SUPPORTED AND NOT TARGET pico_cyw43_arch)
return()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do some of these have a message (there is one without below too), and some not?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you don't see the same message repeatedly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants