From 33b8aca6b2025cf507a3f8408311dac072b959b2 Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Wed, 22 Oct 2025 16:35:39 -0400 Subject: [PATCH 1/9] make jpegio unsupported format error more helpful --- locale/circuitpython.pot | 16 ++++------------ shared-module/jpegio/JpegDecoder.c | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 1e167c30353dd..86587e0a4e804 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -159,10 +159,6 @@ msgstr "" msgid "%q length must be >= %d" msgstr "" -#: py/runtime.c -msgid "%q moved from %q to %q" -msgstr "" - #: py/argcheck.c msgid "%q must be %d" msgstr "" @@ -1644,10 +1640,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: shared-module/jpegio/JpegDecoder.c -msgid "Not supported JPEG standard" -msgstr "" - #: ports/espressif/common-hal/paralleldisplaybus/ParallelBus.c #: ports/espressif/common-hal/sdioio/SDCard.c #, c-format @@ -2371,6 +2363,10 @@ msgid "" "declined or ignored." msgstr "" +#: shared-module/jpegio/JpegDecoder.c +msgid "Unsupported JPEG (may be progressive)" +msgstr "" + #: shared-bindings/bitmaptools/__init__.c msgid "Unsupported colorspace" msgstr "" @@ -3174,10 +3170,6 @@ msgstr "" msgid "file write is not available" msgstr "" -#: shared-bindings/storage/__init__.c -msgid "filesystem must provide mount method" -msgstr "" - #: extmod/ulab/code/numpy/vector.c msgid "first argument must be a callable" msgstr "" diff --git a/shared-module/jpegio/JpegDecoder.c b/shared-module/jpegio/JpegDecoder.c index 484ba8e7ccd09..89cb624a8d03f 100644 --- a/shared-module/jpegio/JpegDecoder.c +++ b/shared-module/jpegio/JpegDecoder.c @@ -46,7 +46,7 @@ static void check_jresult(JRESULT j) { msg = MP_ERROR_TEXT("Right format but not supported"); break; case JDR_FMT3: - msg = MP_ERROR_TEXT("Not supported JPEG standard"); + msg = MP_ERROR_TEXT("Unsupported JPEG (may be progressive)"); break; } mp_raise_RuntimeError(msg); From 9e7edf2d1a76586f85d4ae5b5097bce9d7232516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Alse=CC=81n?= Date: Mon, 15 Dec 2025 20:01:49 +0100 Subject: [PATCH 2/9] Fixed compilation error when disabling CIRCUITPY_SERIAL_BLE || CIRCUITPY_BLE_FILE_SERVICE + variable name mismatch --- ports/espressif/common-hal/_bleio/PacketBuffer.c | 6 ++++++ shared-bindings/_bleio/PacketBuffer.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/_bleio/PacketBuffer.c b/ports/espressif/common-hal/_bleio/PacketBuffer.c index db035157ceb6b..00aaae44e38ec 100644 --- a/ports/espressif/common-hal/_bleio/PacketBuffer.c +++ b/ports/espressif/common-hal/_bleio/PacketBuffer.c @@ -159,7 +159,13 @@ static int packet_buffer_on_ble_client_evt(struct ble_gap_event *event, void *pa return false; } +#if CIRCUITPY_SERIAL_BLE || CIRCUITPY_BLE_FILE_SERVICE +// Exposed via shared-bindings header when enabled void _common_hal_bleio_packet_buffer_construct( +#else +// Internal static helper when disabled (avoids "missing prototype" error) +static void _common_hal_bleio_packet_buffer_construct( +#endif bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, uint32_t *incoming_buffer, size_t incoming_buffer_size, uint32_t *outgoing_buffer1, uint32_t *outgoing_buffer2, size_t max_packet_size, diff --git a/shared-bindings/_bleio/PacketBuffer.h b/shared-bindings/_bleio/PacketBuffer.h index 1a872512da27c..e58a2c39371fb 100644 --- a/shared-bindings/_bleio/PacketBuffer.h +++ b/shared-bindings/_bleio/PacketBuffer.h @@ -25,7 +25,7 @@ void common_hal_bleio_packet_buffer_construct( void _common_hal_bleio_packet_buffer_construct( bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, uint32_t *incoming_buffer, size_t incoming_buffer_size, - uint32_t *outgoing_buffer1, uint32_t *outgoing_buffer2, size_t outgoing_buffer_size, + uint32_t *outgoing_buffer1, uint32_t *outgoing_buffer2, size_t max_packet_size, ble_event_handler_t *static_handler_entry); #endif mp_int_t common_hal_bleio_packet_buffer_write(bleio_packet_buffer_obj_t *self, const uint8_t *data, size_t len, uint8_t *header, size_t header_len); From 1e9c67312c544444cfe5fdec4750c65e2d68f92b Mon Sep 17 00:00:00 2001 From: David Dyck Date: Wed, 24 Dec 2025 13:28:35 -0800 Subject: [PATCH 3/9] Update monotonic function docstring for clarity Clarify the return value of the monotonic function to specify it returns fractional seconds. looking at cpython's time.monotonic() documentation, one sees in the first line "Return the value (in fractional seconds) of a monotonic clock" - I would have expected a similar introduction when reading that for circuitpython at https://docs.circuitpython.org/en/latest/shared-bindings/time/ I see there is a fall back that says "For more information, refer to the original CPython documentation" but would it have hurt to have mention that the units of the float returned by time.monotomic was in seconds? ( there are 7 mentions of millisecond(s), --- shared-bindings/time/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/time/__init__.c b/shared-bindings/time/__init__.c index 8a591da368858..86f73d95ca6b2 100644 --- a/shared-bindings/time/__init__.c +++ b/shared-bindings/time/__init__.c @@ -22,7 +22,7 @@ //| //| //| def monotonic() -> float: -//| """Returns an always increasing value of time with an unknown reference +//| """Returns an always increasing value of time (in fractional **seconds**) with an unknown reference //| point. Only use it to compare against other values from `time.monotonic()` //| during the same code run. //| From 75b3c3974315c063ab9bd1fcc57fe13c2599efaa Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 24 Dec 2025 16:34:10 -0500 Subject: [PATCH 4/9] Fix comment formatting in monotonic function --- shared-bindings/time/__init__.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/time/__init__.c b/shared-bindings/time/__init__.c index 86f73d95ca6b2..e19d97251bcb8 100644 --- a/shared-bindings/time/__init__.c +++ b/shared-bindings/time/__init__.c @@ -22,12 +22,12 @@ //| //| //| def monotonic() -> float: -//| """Returns an always increasing value of time (in fractional **seconds**) with an unknown reference +//| """Returns an always increasing value of time, in fractional seconds, with an unknown reference //| point. Only use it to compare against other values from `time.monotonic()` //| during the same code run. //| //| On most boards, `time.monotonic()` converts a 64-bit millisecond tick counter -//| to a float. Floats on most boards are encoded in 30 bits internally, with +//| to seconds, as a float. Floats on most boards are encoded in 30 bits internally, with //| effectively 22 bits of precision. The float returned by `time.monotonic()` will //| accurately represent time to millisecond precision only up to 2**22 milliseconds //| (about 1.165 hours). From 5a4446ea09ad3f883d9db136b5d92f15476c7e3c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 4 Jan 2026 22:24:50 -0500 Subject: [PATCH 5/9] espressif_bindings/Camera.c: fix type of framebuffer_count --- ports/espressif/bindings/espcamera/Camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/bindings/espcamera/Camera.c b/ports/espressif/bindings/espcamera/Camera.c index ed6b542a02ff3..712ff8827d779 100644 --- a/ports/espressif/bindings/espcamera/Camera.c +++ b/ports/espressif/bindings/espcamera/Camera.c @@ -261,7 +261,7 @@ static mp_obj_t espcamera_camera_reconfigure(mp_uint_t n_args, const mp_obj_t *p args[ARG_grab_mode].u_obj != MP_ROM_NONE ? validate_grab_mode(args[ARG_grab_mode].u_obj, MP_QSTR_grab_mode) : common_hal_espcamera_camera_get_grab_mode(self); - bool framebuffer_count = + mp_int_t framebuffer_count = args[ARG_framebuffer_count].u_obj != MP_ROM_NONE ? mp_obj_get_int(args[ARG_framebuffer_count].u_obj) : common_hal_espcamera_camera_get_framebuffer_count(self); From c5e4979655ed6a90e8510723d18949a01979a84d Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 5 Nov 2025 12:10:55 -0500 Subject: [PATCH 6/9] stop building intel and universal macos mpy-cross --- .github/workflows/build.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f837d793bddc..697a110605425 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,33 +131,18 @@ jobs: gcc --version python3 --version msgfmt --version - - name: Build mpy-cross - run: make -C mpy-cross -j4 - - uses: actions/upload-artifact@v4 - with: - name: mpy-cross-macos-x64 - path: mpy-cross/build/mpy-cross - name: Build mpy-cross (arm64) run: make -C mpy-cross -j4 -f Makefile.m1 V=2 - uses: actions/upload-artifact@v4 with: name: mpy-cross-macos-arm64 path: mpy-cross/build-arm64/mpy-cross-arm64 - - name: Make universal binary - run: lipo -create -output mpy-cross-macos-universal mpy-cross/build/mpy-cross mpy-cross/build-arm64/mpy-cross-arm64 - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: mpy-cross-macos-universal - path: mpy-cross-macos-universal - name: Upload to S3 if: >- (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) run: | - [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-universal --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build-arm64/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-arm64 --no-progress --region us-east-1 - [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/build/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/macos/mpy-cross-macos-"${CP_VERSION}"-x64 --no-progress --region us-east-1 env: AWS_PAGER: '' AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} From 0caa9edc6d1b594ddf819166dacc3ccad6d21918 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 4 Nov 2025 16:36:14 -0800 Subject: [PATCH 7/9] Use latest macos in CI --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 697a110605425..fbd3af440c6b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,7 +107,7 @@ jobs: cp-version: ${{ needs.scheduler.outputs.cp-version }} mpy-cross-mac: - runs-on: macos-13 + runs-on: macos-latest needs: scheduler if: needs.scheduler.outputs.ports != '{}' env: From 85a8f1ec464c84084af0fdff3998c52039e6de75 Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Tue, 6 Jan 2026 07:11:52 -0500 Subject: [PATCH 8/9] Add APA102 and DEFAULT_I2C_BUS definitions to the lilygo_tdongle_s3 --- ports/espressif/boards/lilygo_tdongle_s3/mpconfigboard.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/lilygo_tdongle_s3/mpconfigboard.h b/ports/espressif/boards/lilygo_tdongle_s3/mpconfigboard.h index fe5525ef05633..0edea0bf63b40 100644 --- a/ports/espressif/boards/lilygo_tdongle_s3/mpconfigboard.h +++ b/ports/espressif/boards/lilygo_tdongle_s3/mpconfigboard.h @@ -11,5 +11,8 @@ #define MICROPY_HW_BOARD_NAME "LILYGO T-Dongle S3" #define MICROPY_HW_MCU_NAME "ESP32S3" -#define DEFAULT_UART_BUS_RX (&pin_GPIO44) -#define DEFAULT_UART_BUS_TX (&pin_GPIO43) +#define MICROPY_HW_APA102_MOSI (&pin_GPIO40) +#define MICROPY_HW_APA102_SCK (&pin_GPIO39) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO44) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO43) From 65151c2ca182cc8c5a102df3619def5ee35cc5c3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 8 Feb 2026 15:21:50 -0500 Subject: [PATCH 9/9] Apply suggestions from code review --- ports/espressif/common-hal/_bleio/PacketBuffer.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ports/espressif/common-hal/_bleio/PacketBuffer.c b/ports/espressif/common-hal/_bleio/PacketBuffer.c index 00aaae44e38ec..db035157ceb6b 100644 --- a/ports/espressif/common-hal/_bleio/PacketBuffer.c +++ b/ports/espressif/common-hal/_bleio/PacketBuffer.c @@ -159,13 +159,7 @@ static int packet_buffer_on_ble_client_evt(struct ble_gap_event *event, void *pa return false; } -#if CIRCUITPY_SERIAL_BLE || CIRCUITPY_BLE_FILE_SERVICE -// Exposed via shared-bindings header when enabled void _common_hal_bleio_packet_buffer_construct( -#else -// Internal static helper when disabled (avoids "missing prototype" error) -static void _common_hal_bleio_packet_buffer_construct( -#endif bleio_packet_buffer_obj_t *self, bleio_characteristic_obj_t *characteristic, uint32_t *incoming_buffer, size_t incoming_buffer_size, uint32_t *outgoing_buffer1, uint32_t *outgoing_buffer2, size_t max_packet_size,