Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Pico-W: shrink firmware region

Aperta
#11,515 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Start by comparing the Pico-W mpconfigboard.mk and link.ld settings mentioned in the issue, then trace how the firmware region and /saves partition are laid out. Check whether the size values need to account for other regions or alignment. Done means a smaller firmware region can coexist with the added partition without corrupting the CIRCUITPY drive.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
CircuitPython version and board name
built from tag 10.3.0
Code/REPL
n.a.
Behavior

n.a.

Description

I am trying to create a custom build for the Pico-W with a much smaller firmware region to fit in a /saves partition. Reducing required firmware size works by deactivating all modules I don't need:

Memory region         Used Size  Region Size  %age Used
  FLASH_FIRMWARE:     1266372 B      1250 KB     98.94%
             RAM:       46812 B       256 KB     17.86%
       SCRATCH_Y:           0 B         4 KB      0.00%
       SCRATCH_X:           0 B         4 KB      0.00%

The firmware size / region size is configured in two places:

# mpconfigboard.mk
CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)'

and

# link.ld
firmware_size = 1532k;

My questions:

  • why do the figures differ (1536 vs. 1532)?
  • are there other things to take into account? Does the firmware_size has to be a multiple of 4?

I did change the firmware_size to 1250k and CIRCUITPY_FIRMWARE_SIZE accordingly, added a 200k /saves partition, and this results in a partly corrupted CIRCUITPY drive (mounts as ro after errors):

ls: Zugriff auf '/mnt/.fseventsd' nicht möglich: Eingabe-/Ausgabefehler
ls: Zugriff auf '/mnt/sd' nicht möglich: Eingabe-/Ausgabefehler
insgesamt 18
drwxr-xr-x 6 bablokb users 16384  1. Jan 1970  ./
drwxr-xr-x 1 root    root    300 25. Mär 2025  ../
-rwxr-xr-x 1 bablokb users   166  1. Jan 2000  boot_out.txt*
-rwxr-xr-x 1 bablokb users    22  1. Jan 2000  code.py*
d????????? ? ?       ?         ?             ? .fseventsd/
drwxr-xr-x 2 bablokb users   512  1. Jan 2000  lib/
-rwxr-xr-x 1 bablokb users     0  1. Jan 2000  .metadata_never_index*
drwxr-xr-x 2 bablokb users   512  1. Jan 2000  saves/
d????????? ? ?       ?         ?             ? sd/
-rwxr-xr-x 1 bablokb users     0  1. Jan 2000  .Trash-1000*
-rwxr-xr-x 1 bablokb users     0  1. Jan 2000  .Trashes*


### Additional information

_No response_
Lingua principale
C
Stelle
4.6k
Fork
1.4k
Merge medio
1g 8h
PR unite (30g)
153

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di adafruit/circuitpython

Tutte le issue di adafruit/circuitpython

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.