raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.7k stars 918 forks source link

CYW43 support only if PICO_BOARD=pico_w #979

Open Memotech-Bill opened 2 years ago

Memotech-Bill commented 2 years ago

The various CMake link library options pico_cyw43arch... only have any affect if the CMake call defines PICO_BOARD=pico_w. Otherwise they default to no-op.

This causes problems if (for example) the Pico W is plugged into a VGA Demo Board. Creating a vgaboard_w.h file, which is a copy of vgaboard.h, but with the #include "boards/pico.h" replaced by #include "boards/pico_w.h" does not resolve the problem.

The simplest work around I have found is to include the following very early in the CMake file:

set(PICO_CYW43_SUPPORTED 1)

I have yet to work out whether this needs to be above pico_sdk_init() or above include(pico_sdk_import.cmake).

erdometo commented 1 year ago

If you are building from command line, no problem. But VSCode uses its own cmake extension to lint errors. That extension has no setting to pass extra arguments. Only fix is set(PICO_CYW43_SUPPORTED 1) in cmakelists.txt.

kilograham commented 2 months ago

We plan to add a PICO_CARRIER_BOARD or similar in the future