Git log: commit dc4bccffbb0170b59732414dc157e2f926a91a50
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sat Sep 13 14:08:14 2025 +0800
debian: update to 1.26.1+ds
commit 6c4de5ef37831bf4a584feb00876bd1220925dcf
Merge: f9799113d bdf63819c
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sat Sep 13 14:06:28 2025 +0800
Merge tag 'upstream/1.26.1+ds'
commit bdf63819c92f961622b84aebd8601b62ff4ddbef
Author: yangfl <yangfl@users.noreply.github.com>
Date: Sat Sep 13 14:05:42 2025 +0800
Import Upstream version 1.26.1+ds
commit 647c8b96cae7e202c7a020395b7cfe65e5b8ce04
Author: Damien George <damien@micropython.org>
Date: Thu Sep 11 14:21:12 2025 +1000
all: Bump version to 1.26.1.
Signed-off-by: Damien George <damien@micropython.org>
commit 0edead495c46054141cd890acaa94c832e6f9252
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 27 17:40:55 2025 +1000
tools/mpremote: Don't apply Espressif DTR/RTS quirk to TinyUSB CDC dev.
The DTR quirk workaround from dea949e86 is needed for the Espressif
Serial/JTAG device, but not for TinyUSB - in fact DTR must be set for
TinyUSB to correctly determine if the serial port is open (and leads to
issues with lost bytes otherwise).
See discussion in PR #17999.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 69408453a2070fabc8ad5d0dba7451592ec169cf
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Sep 10 09:35:36 2025 +1000
shared/tinyusb/mp_usbd_cdc: Rewrite USB CDC TX loop.
This is related to the previous commit (where due to the new config flag
this loop could end up stuck indefinitely if the USB host was
disconnected). The previous loop could maybe still get stuck if the
low-level USB state and the high-level USB state got out of sync. (Not
clearly possible, but hard to say definitely not possible.)
To be "belts and braces" careful:
- Always run mp_usbd_task() each time around the loop to progress the
state.
- Always evaluate the timeout if we fail to write anything to the FIFO.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 7512ad66222f0c031d4eaf5abf605ab403440e83
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 27 15:34:12 2025 +1000
shared/tinyusb: Fix hang from new tx_overwritabe_if_not_connected flag.
This flag is in the main branch of TinyUSB, included in Espressif since
their v0.18.0~3 component release (but it's not actually in TinyUSB v0.18.0
release).
Setting the flag is needed for the USB device not to block waiting for
space in the FIFO if the host is disconnected.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 1abbdba1d40753cd88aac25a4901566aa341ba84
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 20 16:24:57 2025 +1000
esp32: Add IDF Component Lockfiles to git repo.
This is recommended by Espressif, and it's the only way to ensure
everyone builds the same set of component versions.
The awkward part is that updating the ESP-IDF version will churn a line
in each of these files (and possibly other changes).
Adds a build-time check for lock file changes, which is either a warning or
a hard error depending on the value of MICROPY_MAINTAINER_BUILD
flag (introduced in previous commit).
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit ad220895819456304f9f5fab272668f48d6cc543
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Sep 3 15:44:10 2025 +1000
tools: Add an environment variable MICROPY_MAINTAINER_BUILD.
This allows us to have some things which are fatal errors in CI or nightly
builds, but warnings in normal developer builds.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 02b5d42b242993db6601238729b4420462fb2ce0
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 20 16:26:27 2025 +1000
esp32: Update esp_tinyusb component to v1.7.6.
Reported to fix issues reported with serial corruption when interacting
with MicroPython from macOS hosts.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 4ce2dd2cdab6e57f3982fc899f15a2103d71b0be
Author: Damien George <damien@micropython.org>
Date: Sat Aug 9 23:31:31 2025 +1000
all: Bump version to 1.26.0.
Signed-off-by: Damien George <damien@micropython.org>
commit 593ae04eeb06b6fd7c6232eb41912b8d26170ddd
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 6 15:57:38 2025 +1000
esp32/machine_timer: Fix machine.Timer() tick frequency on ESP32C2,C6.
Also future-proofs this code for other chips. Apart form C6 and C2, all
currently supported chips use APB clock for GPTIMER_CLK_SRC_DEFAULT.
ESP32-C2 uses 40MHz PLL but APB_CLK_FREQ was 26MHz.
ESP32-C6 uses 80MHz PLL but APB_CLK_FREQ was 40MHz.
Implementation now gets the correct frequency from ESP-IDF.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit ce109af712452474dfe3864f82b5430f4e2a5ff0
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Aug 6 15:47:15 2025 +1000
esp32/machine_timer: Enable timer clock source for ESP32C6.
Otherwise the PLL is not enabled. These changes are adapted from
`timer_legacy.h` in ESP-IDF.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit d5ecda05eb743839e9011f3d23657b39cd05e6c0
Author: Damien George <damien@micropython.org>
Date: Thu Aug 7 10:33:26 2025 +1000
ports: Allow MICROPY_PY_MACHINE_I2C_TARGET to be disabled by board cfg.
Signed-off-by: Damien George <damien@micropython.org>
commit 255d74b5a8c31ec06d1c2c528f7888f6c2dfc246
Author: Damien George <damien@micropython.org>
Date: Mon Aug 4 02:00:47 2025 +1000
renesas-ra/mpconfigport: Enable MICROPY_TIME_SUPPORT_Y1969_AND_BEFORE.
This setting was missed in df05caea6c6437a8b4756ec502a5e6210f4b6256. It's
needed for this port to pass its `tests/ports/renesas-ra/modtime.py` test.
Signed-off-by: Damien George <damien@micropython.org>
commit 7c8ae78a0384ce3fac2e9421df2590ef7d7031ef
Author: Damien George <damien@micropython.org>
Date: Mon Aug 4 01:45:30 2025 +1000
lib/micropython-lib: Update submodule to latest.
This brings in:
- lora: fix SNR value in SX126x received packets
- utop: add initial implementation for ESP32
- utop: print MicroPython memory info
- utop: print IDF heap details
- urllib.urequest: add support for headers to urequest.urlopen
- aiorepl: use blocking reads for raw REPL and raw paste
- errno: add ENOTCONN constant
- logging: allow logging.exception helper to handle tracebacks
- aioble-l2cap: raise correct error if l2cap disconnects during send
- abc: add ABC base class
- aiohttp: fix partial reads by using readexactly
- aiorepl: handle stream shutdown
Signed-off-by: Damien George <damien@micropython.org>
commit c0252d73c6499cf8c09fa57e17f4b530315b0ee0
Author: Jeff Epler <jepler@gmail.com>
Date: Sat Aug 2 15:24:45 2025 -0500
py/parse: Fix missing nlr_pop call in complex path of binary_op_maybe.
Reproducer (needs to be run as one compilation unit):
ans = (-1) ** 2.3
aa
Fixes issue #17815.
Signed-off-by: Jeff Epler <jepler@gmail.com>
commit 658a2e3dbd0316204a13f2478d98ea3f8649f064
Author: Damien George <damien@micropython.org>
Date: Sat Aug 2 08:39:16 2025 +1000
github/workflows: Add a CI job to build ESP32-C2 and ESP32-C6 boards.
So that all six supported SoCs are built by CI.
Signed-off-by: Damien George <damien@micropython.org>
commit 3c9546ea0911b50d4b85ad4046864c90f84b3fd3
Author: Damien George <damien@micropython.org>
Date: Sat Aug 2 08:52:05 2025 +1000
esp32/mpconfigport: Disable I2CTarget on ESP32-C6 to reduce code size.
I2CTarget costs about 8k of flash size on ESP32-S2, and about 11k on
ESP32-C6. The ESP32-C6 only has about 8k remaining, so disable I2CTarget
on that SoC until more flash can be made available.
Signed-off-by: Damien George <damien@micropython.org>
commit e6739fc87e9d633484aeb72fa2efac14e4ff7681
Author: Phil Howard <github@gadgetoid.com>
Date: Tue Jul 8 14:02:42 2025 +0100
rp2/rp2_flash: Add binary info for ROMFS.
This describes the ROMFS location and size in Pico SDK's binary declaration
format, so it can be read from a .uf2 file for use with various tools.
Signed-off-by: Phil Howard <github@gadgetoid.com>
commit a9dd741e66a6afba3a6e862d134246d157a56777
Author: Jos Verlinde <Jos_Verlinde@hotmail.com>
Date: Thu May 1 17:25:19 2025 +0200
docs/reference/mpremote: Document location of config file.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
commit 64b3944b0121710199d8d5958415ce71f21d67a7
Author: Jos Verlinde <Jos_Verlinde@hotmail.com>
Date: Thu May 1 17:17:06 2025 +0200
tools/mpremote: Locate config.py location across different host OSes.
Use `platformdirs.user_config_dir()` (see
https://platformdirs.readthedocs.io/en/latest/api.html#user-config-directory)
to provide portability across many different OSes and configuration styles.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
commit 026a20da3e803328c4fc9bce66b9931d18f12c1e
Author: Jos Verlinde <Jos_Verlinde@hotmail.com>
Date: Thu May 1 17:12:45 2025 +0200
tools/mpremote: Add platformdirs dependency to requirements.txt.
Needed to easily find the user configuration file.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
commit 907c5e99769635678e4bfb8dda5c3c0e2aec040f
Author: Angus Gratton <angus@redyak.com.au>
Date: Wed Jul 30 17:20:36 2025 +1000
tests/extmod_hardware: Add basic tests for machine.Counter and Encoder.
These don't test any advanced features, just the basics.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit 641ca2eb0624fc0df2b358f1a4652525af123fd7
Author: Jonathan Hogg <me@jonathanhogg.com>
Date: Mon Sep 12 18:37:22 2022 +0100
docs/library/machine: Add docs for Counter and Encoder.
Add documentation for `machine.Counter` and `machine.Encoder` as currently
implemented by the esp32 port, but intended to be implemented by other
ports.
Originally authored by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com> and
Jonathan Hogg <me@jonathanhogg.com>.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
commit 327655905e9f523070301f2f35459197d46db4fb
Author: Jonathan Hogg <me@jonathanhogg.com>
Date: Sat Sep 10 16:47:19 2022 +0100
esp32/modules/machine.py: Add Counter and Encoder classes.
Adds a Python override of the `machine` module, which delegates to the
built-in module and adds an implementation of `Counter` and `Encoder`,
based on the `esp32.PCNT` class.
Original implementation by: Jonathan Hogg <me@jonathanhogg.com>
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
commit e54553c496bf915ed0263c2d2a61d31d61032dea
Author: Jonathan Hogg <me@jonathanhogg.com>
Date: Sat Sep 10 17:08:27 2022 +0100
docs/esp32: Add documentation for esp32.PCNT.
Document the new `esp32.PCNT` class for hardware pulse counting.
Originally authored by: Jonathan Hogg <me@jonathanhogg.com>
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
commit c3f3339c87444acec814a150fdad28e650483405
Author: Jonathan Hogg <me@jonathanhogg.com>
Date: Tue Aug 15 13:03:45 2023 +0100
esp32/modesp32: Add esp32.PCNT class.
Add a new `esp32.PCNT` class that provides complete, low-level support to
the ESP32 PCNT pulse counting hardware units.
This can be used as a building block to implement the higher-level
`machine.Counter` and `machine.Encoder` classes.
This is enabled by default on all OG, S2, S3, C6 boards, but not on C3 (as
the PCNT peripheral is not supported).
Original implementation by: Jonathan Hogg <me@jonathanhogg.com>
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
commit bf6f229cf3feb6767d37b9df9dcf1e2d9abc49bd
Author: Damien George <damien@micropython.org>
Date: Tue May 27 15:55:46 2025 +1000
docs/library: Document the new machine.I2CTarget class.
With some working examples that show how to use all the features.
Signed-off-by: Damien George <damien@micropython.org>
commit 277b615f261e3ab9c9c19d8b6d2afb6c5f9a5612
Author: Damien George <damien@micropython.org>
Date: Tue Jul 22 18:21:06 2025 +1000
tests/multi_extmod: Add I2CTarget multi tests.
These require two boards wired together, SCL-SCL and SDA-SDA.
Signed-off-by: Damien George <damien@micropython.org>
commit 6558d519a22154795c0da4101bc7bbd1527ed176
Author: Damien George <damien@micropython.org>
Date: Tue May 27 14:00:31 2025 +1000
tests/extmod_hardware: Add self unittest for I2CTarget.
This test uses a SoftI2C controller wired to an I2CTarget on the one board,
and tests all functionality of the I2CTarget class.
Signed-off-by: Damien George <damien@micropython.org>
commit 7bc83afee2115d1a470bc2e901d998b63cef7b25
Author: Damien George <damien@micropython.org>
Date: Mon Jul 28 15:20:19 2025 +1000
esp32/machine_i2c_target: Implement I2CTarget class.
Only soft IRQs are supported.
Signed-off-by: Damien George <damien@micropython.org>
commit ac5b1bce9986775e787a24f77f827c4ad50ffff5
Author: Damien George <damien@micropython.org>
Date: Wed Jul 30 11:26:42 2025 +1000
esp32/machine_i2c: Factor default pin macros to header file.
So the implementation of I2CTarget can use them.
Signed-off-by: Damien George <damien@micropython.org>
commit 79d182deb28a478413c187e1db33681a46e1d20e
Author: robert-hh <robert@hammelrath.com>
Date: Thu Jun 5 20:48:25 2025 +0200
samd/machine_i2c_target: Support I2C target mode.
Supporting readfrom_mem*(). writeto_mem() and a set of IRQs. Enabled by
default for SAMD51 devices and SAMD21 devices with external flash.
Tested with ItsyBitsy M4 and ItsyBitsy M0 with both on-board SoftI2C and a
RP2 Pico as controller.
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: robert-hh <robert@hammelrath.com>
commit 5c78762c166a22d66269357bc0ffe2129586dca0
Author: robert-hh <robert@hammelrath.com>
Date: Thu May 29 09:48:02 2025 +0200
mimxrt/machine_i2c_target: Support I2C target mode.
The functionality is similar to the RP2 implementation. The supported
address size is 7 bit. In order to achieve a sufficient response, the
target I2C IRQ handler has to run from RAM, causing much more code moved to
RAM than required.
Tested with Teensy 4.1, MIMXRT1021EVK, MIMXRT1011EVK and MIMXRT1170, using
both a On-Board SoftI2C as controller and a RP2 Pico as external
controller.
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: robert-hh <robert@hammelrath.com>
commit 67a442d8fabef4f203dd6b13ded46b3836232522
Author: Damien George <damien@micropython.org>
Date: Thu Jul 31 23:52:39 2025 +1000
alif/machine_i2c: Allow changing I2C SCL/SDA pins.
Signed-off-by: Damien George <damien@micropython.org>
commit 6e72cae619f4172205249b831382bd43205a4b10
Author: Damien George <damien@micropython.org>
Date: Wed Jul 16 16:30:56 2025 +1000
alif/machine_i2c_target: Implement I2CTarget class.
Signed-off-by: Damien George <damien@micropython.org>
commit 0c50343145c04b0b67c4b1eb3a337c4b0ea70b1f
Author: Damien George <damien@micropython.org>
Date: Mon Jun 23 12:41:01 2025 +1000
zephyr/machine_i2c_target: Implement I2CTarget class.
Tested and working on rpi_pico and nucleo_wb55rg.
Signed-off-by: Damien George <damien@micropython.org>
commit 1839340dda5040fab0d05a5c58660ad0f4b5513e
Author: Damien George <damien@micropython.org>
Date: Tue May 27 14:00:05 2025 +1000
rp2/machine_i2c_target: Implement I2CTarget class.
Signed-off-by: Damien George <damien@micropython.org>
commit 56d2b47370d90616ae7ad6b6f078446efd69d0ff
Author: Damien George <damien@micropython.org>
Date: Wed Jul 30 11:23:11 2025 +1000
rp2/machine_i2c: Factor default pin macros to header file.
So they can be reused by the I2CTarget implementation.
Signed-off-by: Damien George <damien@micropython.org>
commit 01e570a347c1c679db93931a7f143c74762174fa
Author: Damien George <damien@micropython.org>
Date: Tue May 27 12:22:23 2025 +1000
stm32/machine_i2c_target: Implement I2CTarget class.
Works, tested on PYBV10, PYBD_SF2 and PYBD_SF6:
buf = bytearray(16)
machine.I2CTargetMemory("X", addr=67, mem=buf)
Signed-off-by: Damien George <damien@micropython.org>
commit 78d16672e1bbc2727b879ecaa8ce12be69616c1e
Author: Damien George <damien@micropython.org>
Date: Tue Jul 29 00:19:24 2025 +1000
stm32/i2cslave: Account for slow addr_match callback.
Signed-off-by: Damien George <damien@micropython.org>
commit 2443878bd903a79c1522bd0a572dcd93e5ae777e
Author: Damien George <damien@micropython.org>
Date: Fri Aug 1 17:06:26 2025 +1000
stm32/i2cslave: Support i2c_slave_process_tx_end callback on F4.
The rounds out the F4 implementation to match the other supported MCUs.
Signed-off-by: Damien George <damien@micropython.org>
commit 17d0449ac80723fd5ab4f5cbba28b39818046814
Author: Damien George <damien@micropython.org>
Date: Fri Aug 1 17:02:53 2025 +1000
stm32/i2cslave: Add functions to read/write I2C data.
Instead of requiring the callback to consume/provide the data. This allows
the data to be consumed/provided later on, which will stretch the I2C clock
until that occurs.
Signed-off-by: Damien George <damien@micropython.org>
commit a4ca42f094f0c33ba8d4e8db2f9351586c3104e2
Author: Damien George <damien@micropython.org>
Date: Sat Jul 19 01:59:41 2025 +1000
stm32/i2cslave: Change irq handler name to i2c_slave_irq_handler.
Remove the "ev" part, so this handler can be generalised to also handle
error IRQs.
Signed-off-by: Damien George <damien@micropython.org>
commit 9b1778fc77af2f1631143adc0f4f760e184260ac
Author: Damien George <damien@micropython.org>
Date: Tue May 27 11:06:08 2025 +1000
stm32/i2c: Move I2C IRQ handlers from stm32_it.c to i2c.c.
And add MP_STATIC_ASSERT to statically check that the IRQ names are correct
on the MCU that it's compiled for.
Signed-off-by: Damien George <damien@micropython.org>
commit 1b578fe2c04402b1fe85b49fb5a89c23ae961f89
Author: Damien George <damien@micropython.org>
Date: Tue May 27 12:21:57 2025 +1000
extmod/machine_i2c_target: Add new machine.I2CTarget class.
This commit implements a generic I2C target/peripheral/"slave" device,
called `machine.I2CTarget`. It can work in two separate modes:
- A general device with interrupts/events/callbacks for low-level I2C
operations like address match, read request and stop.
- A memory device that allows reading/writing a specific region of memory
(or "registers") on the target I2C device.
To make a memory device is very simple:
from machine import I2CTarget
mem = bytearray(8)
i2c = I2CTarget(addr=67, mem=mem)
That's all that's needed to start the I2C target. From then on it will
respond to any I2C controller on the bus, allowing reads and writes to the
mem bytearray.
It's also possible to register to receive events. For example to be
notified when the memory is read/written:
from machine import I2CTarget
def irq_handler(i2c_target):
flags = i2c_target.irq().flags()
if flags & I2CTarget.IRQ_END_READ:
print("controller read target at addr", i2c_target.memaddr)
if flags & I2CTarget.IRQ_END_WRITE:
print("controller wrote target at addr", i2c_target.memaddr)
mem = bytearray(8)
i2c = I2CTarget(addr=67, mem=mem)
i2c.irq(irq_handler)
Instead of a memory device, an arbitrary I2C device can be implemented
using all the events (see docs).
This is based on the discussion in #3935.
Signed-off-by: Damien George <damien@micropython.org>
commit ab7c5a1733b394af43035bdcf844b91fd7756dd9
Author: Koudai Aono <koxudaxi@gmail.com>
Date: Thu Jul 10 01:50:55 2025 +0900
docs/library/btree: Fix method links to explicitly specify class.
So they don't clash with other potential references.
Signed-off-by: Koudai Aono <koxudaxi@gmail.com>
commit 769453c7504ebf71d65a57767fbeea41f2de63f4
Author: root <root@WG112.localdomain>
Date: Tue Jun 17 23:17:43 2025 -0400
rp2/rp2_pio: Fix use of PIO2 in prog data structure.
The RP2350 PIO2 State Machines (8, 9, 10, 11) did not work. The data
structure used to pass the PIO arguments was missing an entry for PIO2,
thus causing the PIO2 instances to write wrong data to wrong locations.
Fixes issue #17509.
Signed-off-by: Matt Westveld <github@intergalacticmicro.com>
commit c9b52b2b7f164745eda7210ccf6640fce3737f59
Author: Dryw Wade <dryw.wade@sparkfun.com>
Date: Thu Jul 31 15:37:46 2025 -0600
rp2/CMakeLists.txt: Fix flash size check logic.
Follow up to 6bfb83e30aa28e7bbfb0f77f378da05b32574f3d, if the variable
`PICO_FLASH_SIZE_BYTES` is not a numeric constant, eg "(2 * 1024 * 1024)",
then it won't pass the GREATER check. So change the if logic to just test
if it's defined.
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
commit a9a606bf5d518375efb2b836a07df7d95dbd7b56
Author: Damien George <damien@micropython.org>
Date: Tue Jul 29 17:25:35 2025 +1000
docs/library/rp2.StateMachine: Add a note about PIO in and jmp pins.
Signed-off-by: Damien George <damien@micropython.org>
commit 41987c6cf43c18ff387e88d227469bf8b8e29b55
Author: Damien George <damien@micropython.org>
Date: Tue Jul 29 17:19:09 2025 +1000
rp2/rp2_pio: Configure jmp_pin for PIO use if it's isolation is set.
Signed-off-by: Damien George <damien@micropython.org>