Description
CircuitPython version and board name
Building any RP2350-based raspberrypi with current top of `main`.
This is *not* a 9.2.5 regression.
Code/REPL
n/a
Behavior
n/a
Description
Including the header sdk/src/rp2_common/hardware_xip_cache/include/hardware/xip_cache.h
results in:
In file included from common-hal/picodvi/Framebuffer_RP2350.c:42:
./sdk/src/rp2_common/hardware_xip_cache/include/hardware/xip_cache.h:67:5: error: "PICO_RP2040" is not defined, evaluates to 0 [-Werror=undef]
67 | #if PICO_RP2040
| ^~~~~~~~~~~
./sdk/src/rp2_common/hardware_xip_cache/include/hardware/xip_cache.h:74:5: error: "PICO_RP2040" is not defined, evaluates to 0 [-Werror=undef]
74 | #if PICO_RP2040
| ^~~~~~~~~~~
./sdk/src/rp2_common/hardware_xip_cache/include/hardware/xip_cache.h:180:6: error: "PICO_RP2040" is not defined, evaluates to 0 [-Werror=undef]
180 | #if !PICO_RP2040 || PICO_COMBINED_DOCS
| ^~~~~~~~~~~
Additional information
The root cause of these errors is misuse of the PICO_RP2040
and PICO_RP2350
macros in CP. The Pico SDK, currently at version 2.1.1, expects these macros to always be defined. For an RP2040 target PICO_RP2040=1
and PICO_RP2350=0
. Likewise, for an RP2350 target PICO_RP2040=0
and PICO_RP2350=1
.
Unfortunately, there are a few places where Pico SDK 2.1.1 overlooked updating its use of these macros, resulting in an un-bootable UF2 file when building CP with CP's usage corrected. See: raspberrypi/pico-sdk#2356 . This pull has been merged into the Pico SDK develop
branch and is scheduled for inclusion in 2.1.2.
I'm holding the CP pull in my repo here: https://github.com/eightycc/circuitpython/tree/fix-defines . Once Pico SDK 2.1.2 is released I'll submit a pull to update the SDK version as well as the pull for this issue.