Skip to content

Update nuke.c to auto-detect flash size - #653

Merged
kilograham merged 2 commits into
raspberrypi:developfrom
tyeth:flash-nuke-autodetect-size
Jun 17, 2026
Merged

kilograham merged 2 commits into
raspberrypi:developfrom
tyeth:flash-nuke-autodetect-size

Conversation

@tyeth

@tyeth tyeth commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

Fixes #642

Original work by @Gadgetoid 🥇

Comment thread flash/nuke/nuke.c
@github-actions

Copy link
Copy Markdown

Please do not submit against master, use develop instead

@peterharperuk
peterharperuk changed the base branch from master to develop December 12, 2025 13:40

@peterharperuk peterharperuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 as this needs a fix to the sdk

tyeth and others added 2 commits June 9, 2026 14:24
Fixes raspberrypi#642


Thanks to @Gadgetoid for the work "Making A Thing" - Support [PiMoRoNi by buying stuff](https://shop.pimoroni.com/)!
If flash_do_cmd returns a bad size for the flash or fails,
use a default flash size of 16MB
@peterharperuk
peterharperuk force-pushed the flash-nuke-autodetect-size branch from 9fb77ff to 70bd44a Compare June 9, 2026 13:29
@peterharperuk
peterharperuk requested a review from will-v-pi June 9, 2026 13:30
@peterharperuk peterharperuk added this to the 2.2.1 milestone Jun 9, 2026

@will-v-pi will-v-pi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and it still builds universal UF2s (https://github.com/will-v-pi/pico-sdk-uf2s/actions/runs/27211253008)

One thought from testing is it might be nice to turn on the LED when the erase starts, as it can take a long time on some chips? Picos are very fast, but my Pimoroni Pico Plus 2 takes forever.

@kilograham

Copy link
Copy Markdown
Contributor

please add LED as separate PR

@kilograham
kilograham merged commit 8048ab9 into raspberrypi:develop Jun 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Official flash nuke doesn't work, but https://github.com/Gadgetoid/pico-universal-flash-nuke does work

6 participants