pico-sdk icon indicating copy to clipboard operation
pico-sdk copied to clipboard

CYW43 support only if PICO_BOARD=pico_w

Open Memotech-Bill opened this issue 3 years ago • 2 comments

The various CMake link library options pico_cyw43_arch_... 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).

Memotech-Bill avatar Aug 18 '22 16:08 Memotech-Bill

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.

erdometo avatar Jun 05 '23 04:06 erdometo

We plan to add a PICO_CARRIER_BOARD or similar in the future

kilograham avatar Aug 09 '24 19:08 kilograham

Note you can create a top-level board header yourself, and place the following in it:

 // pico_cmake_set PICO_CYW43_SUPPORTED = 1

or assuming you are using develop branch, the now preferred style:

 pico_board_cmake_set(PICO_CYW43_SUPPORTED, 1)

kilograham avatar Jul 02 '25 15:07 kilograham

This is also (briefly) mentioned in https://datasheets.raspberrypi.com/rm2/rm2-datasheet.pdf 🙂

lurch avatar Jul 02 '25 15:07 lurch