Skip to content

rp2: Update to use include linker scripts#19251

Draft
will-v-pi wants to merge 2 commits into
micropython:masterfrom
will-v-pi:include-linker-scripts
Draft

rp2: Update to use include linker scripts#19251
will-v-pi wants to merge 2 commits into
micropython:masterfrom
will-v-pi:include-linker-scripts

Conversation

@will-v-pi
Copy link
Copy Markdown

Summary

In the next pico-sdk release, the linker scripts will be re-formatted to allow only overriding certain parts of them, rather than having to replace the whole script. This draft PR shows how this functionality could be used for MicroPython, to make it simpler for MicroPython to keep the scripts up-to-date going forwards.

Note that this PR should not be merged as-is, as it updates the Pico SDK submodule to the current develop branch where these linker script changes are. I'm raising it as a draft so that these changes can be included in any wider updates for the next Pico SDK release, either using this PR with a changed Update pico-sdk ... commit, or cherry-picked into a PR with wider updates.

Testing

Checked the RPI_PICO and RPI_PICO2 firmware.elf.map files for changes, and all changes seem reasonable (mostly related to the new SDK, including fixing a bug where memcpy etc were in Flash on RP2350 due to a missing space). Also checked those ports both booted successfully.

Generative AI

I did not use generative AI tools when creating this PR.

@will-v-pi will-v-pi force-pushed the include-linker-scripts branch from 6ff360f to 6ee1a07 Compare May 21, 2026 11:12
will-v-pi added 2 commits May 21, 2026 12:14
Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
Upstream pico-sdk now allows overriding parts of the linker script, rather
than replacing the entire script. This change makes use of that
functionality.

Signed-off-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
@will-v-pi will-v-pi force-pushed the include-linker-scripts branch from 6ee1a07 to c9d8f23 Compare May 21, 2026 11:15
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.47%. Comparing base (dc33f04) to head (c9d8f23).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19251   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files         176      176           
  Lines       22845    22845           
=======================================
  Hits        22497    22497           
  Misses        348      348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

Code size report:

Reference:  docs/library/rp2.DMA: Correct and add pack_ctrl defaults. [8f3a416]
Comparison: rp2: Update to use include linker scripts. [merge of c9d8f23]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2: +10460 +1.134% RPI_PICO_W[incl +232(bss)]
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants