You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to version 2.0.0, it was sufficient to call set(PICO_BOARD) in CMakeLists.txt before invoking pico_sdk_init(). The set() call could come after including the SDK import code:
include(pico_sdk_import.cmake)
project(myproject C CXX ASM)
# [...]
set(PICO_BOARD pico_w)
pico_sdk_init()
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:
Defaulting platform (PICO_PLATFORM) to 'rp2040' since not specified.
Defaulting target board (PICO_BOARD) to 'pico' since not specified.
And then the build fails for a PicoW.
Evidently it's now necessary to set PICO_BOARD before including the SDK import code:
set(PICO_BOARD pico_w)
include(pico_sdk_import.cmake)
project(myproject C CXX ASM)
# [...]
pico_sdk_init()
With that, cmake output confirms that the build is set for a PicoW, and the build succeeds.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: