Skip to content

Commit 549a67d

Browse files
authored
Merge branch 'main' into audioeffect-chorus
2 parents 6255c46 + 71a023c commit 549a67d

File tree

480 files changed

+113951
-3894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+113951
-3894
lines changed

Diff for: .github/actions/deps/ports/broadcom/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ runs:
55
steps:
66
- name: Get broadcom toolchain
77
run: |
8-
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
9-
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
8+
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-elf.tar.xz
9+
sudo tar -C /usr --strip-components=1 -xaf arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-elf.tar.xz
1010
sudo apt-get update
1111
sudo apt-get install -y mtools
1212
shell: bash

Diff for: .github/pull_request_template.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Thanks for submitting a pull request to CircuitPython! Remove these instructions before submitting.
2+
3+
See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github for detailed instructions.
4+
5+
- Consider whether to submit this PR against `main` or against (if it exists) the branch for the current stable release or an upcoming minor release. The branch will be named `i.j.x`, for example, `9.2.x`. Bug fixes and minor enhancements can be submitted against the stable release branch, and will be merged to `main` regularly.
6+
- Create your own fork of `circuitpython` and create a branch for your changes.
7+
- Use `pre-commit` to check your commits before submitting. See https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/check-your-code.
8+
- Test your changes and tell us how you tested.
9+
10+
---

Diff for: .github/workflows/build-board-custom.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,18 @@ jobs:
7373
uses: actions/setup-python@v5
7474
with:
7575
python-version: 3.x
76+
- name: Board to port
77+
id: board-to-port
78+
run: |
79+
PORT=$(python tools/board_to_port.py "${{ inputs.board }}")
80+
echo "port=$PORT" >> $GITHUB_OUTPUT
81+
shell: bash
7682
- name: Set up port
7783
id: set-up-port
7884
uses: ./.github/actions/deps/ports
7985
with:
8086
board: ${{ inputs.board }}
87+
port: ${{ steps.board-to-port.outputs.port }}
8188
- name: Set up submodules
8289
id: set-up-submodules
8390
uses: ./.github/actions/deps/submodules
@@ -88,7 +95,7 @@ jobs:
8895
uses: ./.github/actions/deps/external
8996
with:
9097
action: cache
91-
port: ${{ steps.set-up-port.outputs.port }}
98+
port: ${{ steps.board-to-port.outputs.port }}
9299
- name: Set up mpy-cross
93100
if: steps.set-up-submodules.outputs.frozen == 'True'
94101
uses: ./.github/actions/mpy_cross
@@ -115,9 +122,9 @@ jobs:
115122
FLAGS: ${{ inputs.flags }}
116123
DEBUG: ${{ inputs.debug && '1' || '0' }}
117124
run: make -j4 $FLAGS BOARD="$BOARD" DEBUG=$DEBUG TRANSLATION="$TRANSLATION"
118-
working-directory: ports/${{ steps.set-up-port.outputs.port }}
125+
working-directory: ports/${{ steps.board-to-port.outputs.port }}
119126
- name: Upload artifact
120127
uses: actions/upload-artifact@v4
121128
with:
122129
name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }}
123-
path: ports/${{ steps.set-up-port.outputs.port }}/build-${{ inputs.board }}/firmware.*
130+
path: ports/${{ steps.board-to-port.outputs.port }}/build-${{ inputs.board }}/firmware.*

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,8 @@ TAGS
9797
# clangd cache
9898
##############
9999
.cache
100+
101+
**/CLAUDE.local.md
102+
103+
# windsurf rules
104+
.windsurfrules

Diff for: .gitmodules

+2-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
[submodule "ports/raspberrypi/lib/lwip"]
313313
path = ports/raspberrypi/lib/lwip
314314
url = https://github.com/adafruit/lwip.git
315-
branch = circuitpython8
315+
branch = circuitpython9
316316
[submodule "lib/mbedtls"]
317317
path = lib/mbedtls
318318
url = https://github.com/ARMmbed/mbedtls.git
@@ -346,6 +346,7 @@
346346
[submodule "ports/raspberrypi/lib/Pico-PIO-USB"]
347347
path = ports/raspberrypi/lib/Pico-PIO-USB
348348
url = https://github.com/adafruit/Pico-PIO-USB.git
349+
branch = main
349350
[submodule "lib/micropython-lib"]
350351
path = lib/micropython-lib
351352
url = https://github.com/micropython/micropython-lib.git

Diff for: .pre-commit-config.yaml

+40-33
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,33 @@
44

55
# CIRCUITPY-CHANGE: CircuitPython-specific.
66

7+
# Note that by default, pre-commit hooks do not look inside submodules.
8+
# So you don't need to exclude submodules explicitly here.
9+
710
repos:
8-
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
912
rev: v5.0.0
1013
hooks:
11-
- id: check-yaml
12-
- id: end-of-file-fixer
13-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/raspberrypi/sdk|lib/tinyusb)'
14-
- id: trailing-whitespace
15-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/generate_errors.diff|ports/raspberrypi/sdk|lib/tinyusb)'
16-
- repo: https://github.com/codespell-project/codespell
14+
- id: check-yaml
15+
- id: end-of-file-fixer
16+
exclude: |
17+
(?x)^(
18+
tests/.*\.exp|
19+
tests/cmdline/.*|
20+
tests/.*/data/.*
21+
)
22+
- id: trailing-whitespace
23+
exclude: |
24+
(?x)^(
25+
tests/.*\.exp|
26+
tests/cmdline/.*|
27+
tests/.*/data/.*|
28+
lib/mbedtls_errors/generate_errors.diff
29+
)
30+
- repo: https://github.com/codespell-project/codespell
1731
rev: v2.2.4
1832
hooks:
19-
- id: codespell
33+
- id: codespell
2034
args: [-w]
2135
exclude: |
2236
(?x)^(
@@ -25,37 +39,30 @@ repos:
2539
tests/unicode/data/utf-8_invalid.txt|
2640
tests/extmod/data/qr.pgm|
2741
tests/basics/bytearray_byte_operations.py|
28-
ports/raspberrypi/sdk|
2942
ports/zephyr-cp/cptools/compat2driver.py
3043
)
31-
- repo: local
44+
- repo: local
3245
hooks:
33-
- id: translations
46+
- id: translations
3447
name: Translations
3548
entry: sh -c "if ! make check-translate; then make translate; fi"
3649
types: [c]
3750
pass_filenames: false
3851
language: system
39-
- id: formatting
52+
- id: formatting
4053
name: Formatting
41-
entry: python3 tools/codeformat.py
42-
types: [c]
43-
language: system
44-
exclude: |
45-
(?x)^(
46-
lib/tinyusb|
47-
ports/raspberrypi/sdk
48-
)
49-
- repo: https://github.com/astral-sh/ruff-pre-commit
50-
# Ruff version.
51-
rev: v0.9.4
52-
hooks:
53-
# Run the linter.
54-
- id: ruff
55-
args: [ --fix ]
56-
# Run the formatter.
57-
- id: ruff-format
58-
- repo: https://github.com/tox-dev/pyproject-fmt
59-
rev: "v2.5.0"
60-
hooks:
61-
- id: pyproject-fmt
54+
entry: python3 tools/codeformat.py -v -c
55+
language: python
56+
- repo: https://github.com/astral-sh/ruff-pre-commit
57+
# Ruff version.
58+
rev: v0.9.4
59+
hooks:
60+
# Run the linter.
61+
- id: ruff
62+
args: [ --fix ]
63+
# Run the formatter.
64+
- id: ruff-format
65+
- repo: https://github.com/tox-dev/pyproject-fmt
66+
rev: "v2.5.0"
67+
hooks:
68+
- id: pyproject-fmt

Diff for: Makefile

+15-6
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,30 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
4040
# the i18n builder cannot share the environment and doctrees with the others
4141
I18NSPHINXOPTS = $(BASEOPTS)
4242

43-
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/analog ports/cxd56 ports/espressif ports/mimxrt10xx ports/nordic ports/raspberrypi ports/renode ports/stm py shared-bindings shared-module supervisor
43+
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/analog ports/cxd56 ports/espressif ports/mimxrt10xx ports/nordic ports/raspberrypi ports/renode ports/stm ports/zephyr-cp py shared-bindings shared-module supervisor
4444
# Paths to exclude from TRANSLATE_SOURCES
4545
# Each must be preceded by "-path"; if any wildcards, enclose in quotes.
4646
# Separate by "-o" (Find's "or" operand)
4747
TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
4848
-o -path "ports/*/build" \
49+
-o -path ports/analog/msdk \
4950
-o -path ports/atmel-samd/asf4 \
5051
-o -path ports/cxd56/spresense-exported-sdk \
52+
-o -path ports/espressif/esp-camera \
5153
-o -path ports/espressif/esp-idf \
54+
-o -path ports/espressif/esp-protocols \
5255
-o -path ports/mimxrt10xx/sdk \
56+
-o -path ports/nordic/bluetooth \
57+
-o -path ports/nordic/nrfx \
58+
-o -path ports/raspberrypi/lib \
5359
-o -path ports/raspberrypi/sdk \
60+
-o -path ports/stm/peripherals \
5461
-o -path ports/stm/st_driver \
55-
-o -path lib/tinyusb \
56-
-o -path lib/lwip \
62+
-o -path ports/zephyr-cp/bootloader \
63+
-o -path ports/zephyr-cp/modules \
64+
-o -path ports/zephyr-cp/tools \
65+
-o -path ports/zephyr-cp/zephyr \
66+
-o -path lib \
5767
-o -path extmod/ulab/circuitpython \
5868
-o -path extmod/ulab/micropython \
5969

@@ -265,9 +275,8 @@ stubs:
265275
@mkdir circuitpython-stubs
266276
@$(PYTHON) tools/extract_pyi.py shared-bindings/ $(STUBDIR)
267277
@$(PYTHON) tools/extract_pyi.py extmod/ulab/code/ $(STUBDIR)/ulab
268-
@$(PYTHON) tools/extract_pyi.py ports/atmel-samd/bindings $(STUBDIR)
269-
@$(PYTHON) tools/extract_pyi.py ports/espressif/bindings $(STUBDIR)
270-
@$(PYTHON) tools/extract_pyi.py ports/raspberrypi/bindings $(STUBDIR)
278+
@for d in ports/*/bindings; do \
279+
$(PYTHON) tools/extract_pyi.py "$$d" $(STUBDIR); done
271280
@sed -e "s,__version__,`python -msetuptools_scm`," < setup.py-stubs > circuitpython-stubs/setup.py
272281
@cp README.rst-stubs circuitpython-stubs/README.rst
273282
@cp MANIFEST.in-stubs circuitpython-stubs/MANIFEST.in

Diff for: docs/environment.rst

+78-4
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,14 @@ Wi-Fi SSID to auto-connect to even if user code is not running.
101101
Additional board specific keys
102102
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103103

104-
`MaTouch ESP32-S3 Parallel TFT with Touch 7“ <https://circuitpython.org/board/makerfabs_tft7/>`_
105-
106-
CIRCUITPY_DISPLAY_WIDTH
107-
~~~~~~~~~~~~~~~~~~~~~~~
104+
CIRCUITPY_DISPLAY_WIDTH (Sunton, MaTouch)
105+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108106
Selects the correct screen resolution (1024x600 or 800x640) for the particular board variant.
109107
If the CIRCUITPY_DISPLAY_WIDTH parameter is set to a value of 1024 the display is initialized
110108
during power up at 1024x600 otherwise the display will be initialized at a resolution
111109
of 800x480.
112110

111+
`MaTouch ESP32-S3 Parallel TFT with Touch 7“ <https://circuitpython.org/board/makerfabs_tft7/>`_
113112
`Sunton ESP32-2432S028 <https://circuitpython.org/board/sunton_esp32_2432S028/>`_
114113
`Sunton ESP32-2432S024C <https://circuitpython.org/board/sunton_esp32_2432S024C/>`_
115114

@@ -122,6 +121,8 @@ a rotation of 0. Attempting to initialize the screen with a rotation other than
122121
90, 180 or 270 is not supported and will result in an unexpected screen rotation.
123122

124123
`Sunton ESP32-8048S050 <https://circuitpython.org/board/sunton_esp32_8048S050/>`_
124+
`Adafruit Feather RP2350 <https://circuitpython.org/board/adafruit_feather_rp2350/>`_
125+
`Adafruit Metro RP2350 <https://circuitpython.org/board/adafruit_metro_rp2350/>`_
125126

126127
CIRCUITPY_DISPLAY_FREQUENCY
127128
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -130,3 +131,76 @@ If a valid frequency is not defined the board will initialize the framebuffer wi
130131
frequency of 12500000hz (12.5Mhz). The value should be entered as an integer in hertz
131132
i.e. CIRCUITPY_DISPLAY_FREQUENCY=16000000 will override the default value with a 16Mhz
132133
display frequency.
134+
135+
`Sunton ESP32-8048S050 <https://circuitpython.org/board/sunton_esp32_8048S050/>`_
136+
137+
138+
CIRCUITPY_PICODVI_ENABLE
139+
~~~~~~~~~~~~~~~~~~~~~~~~
140+
Whether to configure the display at board initialization time, one of the following:
141+
142+
.. code-block::
143+
144+
CIRCUITPY_PICODVI_ENABLE="detect" # when EDID EEPROM is detected (default)
145+
CIRCUITPY_PICODVI_ENABLE="always"
146+
CIRCUITPY_PICODVI_ENABLE="never"
147+
148+
A display configured in this manner is available at ``supervisor.runtime.display``
149+
until it is released by ``displayio.release_displays()``. It does not appear at
150+
``board.DISPLAY``.
151+
152+
`Adafruit Feather RP2350 <https://circuitpython.org/board/adafruit_feather_rp2350/>`_
153+
`Adafruit Metro RP2350 <https://circuitpython.org/board/adafruit_metro_rp2350/>`_
154+
155+
CIRCUITPY_DISPLAY_WIDTH, CIRCUITPY_DISPLAY_HEIGHT, and CIRCUITPY_DISPLAY_COLOR_DEPTH (RP2350 boards with DVI or HSTX connector)
156+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157+
Selects the desired resolution and color depth.
158+
159+
Supported resolutions are:
160+
* 640x480 with color depth 1, 2, 4 or 8 bits per pixel
161+
* 320x240 with pixel doubling and color depth 8, 16, or 32 bits per pixel
162+
* 360x200 with pixel doubling and color depth 8, 16, or 32 bits per pixel
163+
164+
See :py:class:`picodvi.Framebuffer` for more details.
165+
166+
The default value, if unspecified, is 360x200 16 bits per pixel if the connected
167+
display is 1920x1080 or a multiple of it, otherwise 320x240 with 16 bits per pixel.
168+
169+
If height is unspecified, it is set from the width. For example, a width of 640
170+
implies a height of 480.
171+
172+
Example: Configure the display to 640x480 black and white (1 bit per pixel):
173+
174+
.. code-block::
175+
176+
CIRCUITPY_DISPLAY_WIDTH=640
177+
CIRCUITPY_DISPLAY_COLOR_DEPTH=1
178+
179+
`Adafruit Feather RP2350 <https://circuitpython.org/board/adafruit_feather_rp2350/>`_
180+
`Adafruit Metro RP2350 <https://circuitpython.org/board/adafruit_metro_rp2350/>`_
181+
182+
CIRCUITPY_TERMINAL_SCALE
183+
~~~~~~~~~~~~~~~~~~~~~~~~
184+
Allows the entry of a display scaling factor used during the terminalio console construction.
185+
The entered scaling factor only affects the terminalio console and has no impact on
186+
the UART, Web Workflow, BLE Workflow, etc consoles.
187+
188+
This feature is not enabled on boards that the CIRCUITPY_OS_GETENV (os CIRCUIPTY_FULL_BUILD)
189+
flag has been set to 0. Currently this is primarily boards with limited flash including some
190+
of the Atmel_samd boards based on the SAMD21/M0 microprocessor.
191+
192+
CIRCUITPY_TERMINAL_FONT
193+
~~~~~~~~~~~~~~~~~~~~~~~
194+
Specifies a custom font file path to use for the terminalio console instead of the default
195+
``/fonts/terminal.lvfontbin``. This allows users to create and use custom fonts for the
196+
CircuitPython console.
197+
198+
This feature requires both CIRCUITPY_OS_GETENV and CIRCUITPY_LVFONTIO to be enabled.
199+
200+
Example:
201+
202+
.. code-block::
203+
204+
CIRCUITPY_TERMINAL_FONT="/fonts/myfont.lvfontbin"
205+
206+
`boards that the terminalio core module is available on <https://docs.circuitpython.org/en/latest/shared-bindings/terminalio/>`_

Diff for: docs/library/errno.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
|see_cpython_module| :mod:`python:errno`.
88

99
This module provides access to symbolic error codes for `OSError` exception.
10-
The codes available may vary per CircuitPython build.
10+
Some codes are not available on the smallest CircuitPython builds, such as SAMD21, for space reasons.
1111

1212
Constants
1313
---------

Diff for: docs/porting.rst

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ as a natural "TODO" list. An example minimal build list is shown below:
7272
CIRCUITPY_FRAMEBUFFERIO = 0
7373
CIRCUITPY_FREQUENCYIO = 0
7474
CIRCUITPY_I2CTARGET = 0
75+
CIRCUITPY_SPITARGET = 0
7576
# Requires SPI, PulseIO (stub ok):
7677
CIRCUITPY_DISPLAYIO = 0
7778

Diff for: docs/shared_bindings_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def support_matrix(arg):
362362
if use_branded_name:
363363
board_name = branded_name
364364
else:
365-
board_name = board_directory.name
365+
board_name = board_id
366366

367367
if add_chips:
368368
with open(board_directory / "mpconfigboard.h") as get_name:

Diff for: extmod/vfs.h

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ typedef struct _mp_vfs_proto_t {
7171
typedef struct _mp_vfs_blockdev_t {
7272
uint16_t flags;
7373
size_t block_size;
74+
#if CIRCUITPY_SAVES_PARTITION_SIZE > 0
75+
size_t offset;
76+
int size;
77+
#endif
7478
mp_obj_t readblocks[5];
7579
mp_obj_t writeblocks[5];
7680
// new protocol uses just ioctl, old uses sync (optional) and count

0 commit comments

Comments
 (0)