Open slimhazard opened 2 months ago
Note we didn't notice this change, as we always tend to pass PICO_BOARD to CMake either on the command line or from the env, or from the IDE
@Memotech-Bill pointed out in the forum that this also came up in an SDK issue.
This came up in the SDK forum, where @kilograham asked for a pico-feedback issue, so that it can be better documented.
https://forums.raspberrypi.com/viewtopic.php?t=376508&sid=19c9d2fc64cb0e6ba4d4cac25787e270
Prior to version 2.0.0, it was sufficient to call
set(PICO_BOARD)
inCMakeLists.txt
before invokingpico_sdk_init()
. Theset()
call could come after including the SDK import code:That would lead to a successful build for a PicoW.
But as of 2.0.0, that same code leads to this output from cmake:
And then the build fails for a PicoW.
Evidently it's now necessary to set
PICO_BOARD
before including the SDK import code:With that, cmake output confirms that the build is set for a PicoW, and the build succeeds.