Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Pico-W: shrink firmware region

Đang mở
#11,515 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
embedded-iot

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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_
Ngôn ngữ chính
C
Star
4.6k
Fork
1.4k
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
147

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của adafruit/circuitpython

Tất cả issue của adafruit/circuitpython

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.