Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Pico-W: shrink firmware region

未关闭
#11,515 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
c
领域
embedded-iot

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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_
主要语言
C
星标
4.6k
派生
1.4k
平均合并
1 天 7 小时
30 天内合并 PR
147

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

adafruit/circuitpython 的其他 Issue

查看 adafruit/circuitpython 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。