Repository navigation
lib/pico-sdk: sync rp2040/rp2350 headers to pico-sdk v2.2.0 - #188
Closed
justinh-rahb wants to merge 5 commits into
Closed
justinh-rahb wants to merge 5 commits into
justinh-rahb wants to merge 5 commits into
Conversation
* rp2040: add RP2350 A4 stepping and RP2350b support Port changes from Klipper PRs #7141 and #7146: - Fix BOOTROM_WELL_KNOWN_PTR_SIZE to constant 2, removing the runtime A2 silicon revision check. Required for RP2350 A4 stepping (current production) to correctly locate bootrom functions. - Add void *sio field to gpio_out/gpio_in structs and update all GPIO operations to use it, enabling support for the RP2350b's 48 GPIO pins (GPIOs 32-47 use the SIO hi-bank via a +4 byte pointer offset). - Expand CAN GPIO range to 0-47 for RP2350, keeping 0-29 for RP2040. * docs: update README to include rp2350 MCU support and flashing instructions Signed-off-by: Justin Hayes <justinh@rahb.ca>
Signed-off-by: Justin Hayes <justinh@rahb.ca>
This fix will be reintroduced as part of the full pico-sdk v2.2.0 resync in a follow-up PR, per discussion with Arksine, so it should not live here as a standalone change. Signed-off-by: Justin Hayes <justinh@rahb.ca>
Ports Klipper's pico-sdk resync (Klipper3d/klipper#7141), which brings the imported pico-sdk headers up to v2.2.0 to properly support RP2350 A4 stepping and newer variants. - lib/pico-sdk/pico/bootrom_constants.h: content moved to the new upstream location lib/pico-sdk/boot/bootrom_constants.h; the old path is kept as a backwards-compatible shim. This includes the BOOTROM_WELL_KNOWN_PTR_SIZE fix from PR Arksine#174 (now folded into the full resync rather than living as a standalone change). - src/rp2040/rp2350_bootrom.c: updated include to the new boot/bootrom_constants.h location. - rp2350 register/struct headers (clocks, ticks, usb, busctrl, powman, rosc, rvcsr, syscfg, dreq, glitch_detector, intctrl, pio) and cmsis_include headers: corrected reset values and descriptions to match v2.2.0. - rp2040 boot_stage2, platform_defs.h, intctrl.h, structs/busctrl.h: matching updates from the same upstream resync. - lib/README, lib/pico-sdk/pico-sdk.patch: document the new checkout procedure/revision. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Signed-off-by: Justin Hayes <justinh@rahb.ca>
justinh-rahb
force-pushed
the
copilot/update-pico-sdk-and-bootrom
branch
from
August 13, 2026 15:43
09d100a to
885997e
Compare
Contributor
Author
|
Hello @Arksine I hope you're doing well and not too busy. If there's anything I can do to make my PRs more reviewable please let me know. |
Owner
|
Thanks. I picked and pushed the relevant commit locally since VS Code unexpectedly added a merge commit to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to Arksine/katapult#174, where Arksine noted that Klipper resynced its entire imported pico-sdk to v2.2.0 (rather than just the one
BOOTROM_WELL_KNOWN_PTR_SIZEfix) and suggested Katapult do the same. This ports that full resync: Klipper3d/klipper#7141.Why the full resync, not just the one-line fix
Per Klipper's own PR description, only
BOOTROM_WELL_KNOWN_PTR_SIZEwas strictly required — the rest of #7141 is mostly cosmetic (register descriptions, reset-value comments,\ingrouptags). Bringing it all in anyway keeps the vendored pico-sdk copy in sync with Klipper's, so future upstream patches don't need manual reconciliation against a drifted copy.Changes
lib/pico-sdk/pico/bootrom_constants.h: content moved to the new upstream locationlib/pico-sdk/boot/bootrom_constants.h; the old path is kept as a backwards-compatible shim (#include "boot/bootrom_constants.h"). This folds in theBOOTROM_WELL_KNOWN_PTR_SIZEfix that's currently a standalone change in rp2040: add RP2350 A4 stepping support #174.src/rp2040/rp2350_bootrom.c: updated include path to match the newbootrom_constants.hlocation.clocks,ticks,usb,busctrl,powman,rosc,rvcsr,syscfg,dreq,glitch_detector,intctrl,pio) andcmsis_includeheaders: corrected reset values and descriptions to match v2.2.0.boot_stage2/*,platform_defs.h,intctrl.h,structs/busctrl.h: matching updates from the same upstream resync.lib/README,lib/pico-sdk/pico-sdk.patch: document the updated checkout procedure/revision.Notes
Once this merges, #174 can drop its standalone
bootrom_constants.hchange (already discussed with Arksine there) and be rebased on top of this.