# micropython changelog > MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems - Vendor: micropython - Category: Frameworks & Libraries - Official site: https://micropython.org/ - Tracked by: What's New (https://whatsnew.fyi/product/micropython) - Harvested from: GitHub (micropython/micropython) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## Releases ### v1.28.0 — PWM on alif and stm32, new machine.CAN API, t-strings and weakref module - Date: 2026-04-06 - Version: v1.28.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.28.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.28.0 - **added** — Add machine.PWM support to the stm32 port with freq(), duty_u16(), duty_ns() methods and output inversion - **added** — Add machine.PWM support to the alif port with freq(), duty_u16(), duty_ns() methods, invert keyword argument, and 11 independent timers with 22 PWM outputs - **added** — Add machine.CAN class with documentation, bindings, comprehensive tests, and implementation for the stm32 port - **added** — Add template strings (t-strings) as per PEP 750, with similar syntax to f-strings but keeping components separate within a Template object - **added** — Add support for nested f-strings within expressions within f-string literals - **added** — Add weakref module with weakref.ref and weakref.finalize classes for registering callbacks when objects are garbage collected - **added** — Add RISC-V 32-bit architecture flag zcmp for targets supporting compressed instructions, using Zcmp opcodes for function prologues and epilogues - **added** — Add support for configuring MicroPython to load native code from .mpy files without the native emitter enabled - **added** — Add inline Xtensa assembler support on windowed cores like the esp32 - **added** — Enable ROM filesystem support and VfsRom class on mimxrt, nrf, renesas-ra and samd ports - **added** — Add machine.Counter and machine.Encoder classes to the mimxrt port with min/max values, index, reset, match pins, cycle counting and IRQ callbacks - **added** — Add SPARKFUN_THINGPLUS_ESP32C5 and SEEED_XIAO_ESP32C6 boards to the esp32 port - **added** — Add PHYBOARD_RT1170 board to the mimxrt port - **changed** — Update alif port with alif_ensemble-cmsis-dfp library to v1.3.4 - **changed** — Add external flash sleep support to the alif port - **changed** — Improve deepsleep power saving modes in the alif port with wake-up from falling GPIO or RTC alarm - **changed** — Add new LDO driver to the esp32 port - **changed** — Enable Zcmp opcodes for ESP32-P4 SoCs in the esp32 port - **changed** — Improve os.dupterm() reading in the esp32 port, removing the need to call os.dupterm_notify() - **changed** — Update esp32 port to support ESP-IDF versions 5.3 and up to 5.5.1, dropping support for IDF below v5.3 - **changed** — Update mimxrt port nxp_driver SDK to MCUX_2.16.100 - **changed** — Add PSRAM support to the mimxrt port - **changed** — Add DP83867 PHY Ethernet support to the mimxrt port - **changed** — Increase RTC resolution in the mimxrt port from 1 second to 1/32768 seconds - **changed** — Update rp2 port pico-sdk to version 2.2.0 - **changed** — Switch all RNG sources in the rp2 port from ROSC to the pico_rand component - **changed** — Enable Zcmp opcodes for RP2350 in RV32 mode in the rp2 port This release of MicroPython sees `machine.PWM` support finally added to the stm32 port, as well as the alif port. This rounds out PWM support to all Tier 1 and Tier 2 microcontroller-based ports, making it easy to create and control PWM outputs in a consistent way. A new `machine.CAN` class that has been in development for a couple of years has now been finalised in this release, with added documentation, a common set of bindings, comprehensive tests, and an implementation for the stm32 port. This is a big step forward for a consistent way to use CAN across all of the ports, and implementations for other ports will follow soon. This release also sees the addition of template strings as per PEP 750 https://peps.python.org/pep-0750/. Template strings (or t-strings) are similar to f-strings, allowing expressions within the string literal. But unlike f-strings, t-strings do not concatenate the pieces of the literal, rather they remain as separate components within a `Template` object. MicroPython's t-strings match CPython almost exactly, except for a few minor differences (the a/ascii conversion specifier and space after a conversion specifier are not supported). Template strings are enabled at the "full feature" level, which includes the alif, mimxrt, samd (SAMD51 only) and webassembly (pyscript variant) ports. The t-string parsing code is an extension of the existing f-string parser, and in order to support nested t-string, f-strings now also support nested f-strings: f-strings within expressions within f-string literals. Another Python feature added in this release is the `weakref` module with `weakref.ref` and `weakref.finalize` classes. These classes allow registering a callback to be called when an object is reclaimed by the garbage collector. The semantics of this follow very closely the weakref semantics in CPython (except for the fact that MicroPython does not use reference counting). Due to the memory and garbage collector overhead, this module is currently only enabled on the webassembly pyscript variant, although it can be manually enabled on any port if needed. An outline of MicroPython's design values has been added to the main README. This aims to put into words some of the more intangible aspects of the project, in the hope that it will help strengthen and maintain those values moving forward. All MicroPython users and developers are encouraged to read these values, which can be found at https://github.com/micropython/micropython/blob/master/README.md#micropython-design-values In the native emitter component, the RISC-V 32-bit emitter has a new architecture flag "zcmp" which can be enabled for RV32 targets that support compressed instructions. When this flag is enabled, Zcmp opcodes are used for function prologues and epilogues. There have also been some optimisations to generated native code, as well as added support for inline Xtensa assembler on windowed cores (like the esp32). Furthermore, it's now possible to configure MicroPython (at build time) to be able to load native code from .mpy files without having the native emitter enabled. As usual, work has continued on the test suite, making it more robust to target failures, better able to skip tests that can't run on a target, and run consistently across a broader range of targets. All these things help maintain the high quality of the MicroPython code base. ROM filesystem support and the VfsRom class have been enabled on a few more ports, namely: mimxrt, nrf, renesas-ra and samd (both SAMD21 and SAMD51). The alif port sees the `alif_ensemble-cmsis-dfp` library updated to v1.3.4, support to put external flash to sleep, and improved support for deepsleep power saving modes, with wake-up from deepsleep via a falling GPIO or RTC alarm (the latter is available by the standard `timeout_ms` argument to `machine.deepsleep()`). As mentioned above, this port now has PWM support via the standard `machine.PWM` interface, and provi _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.28.0]_ ### v1.27.0 — ESP32C5, ESP32P4 & STM32U5 support, enhanced test suite, port Tier levels - Date: 2025-12-09 - Version: v1.27.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.27.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.27.0 - **added** — Support for ESP32-C5 and ESP32-P4 microcontrollers with board profiles - **added** — Support for STM32U5xx series microcontrollers with board profile for NUCLEO-U5A5ZJ-Q - **added** — Board-specific target_wiring.py configuration for test-related hardware connections - **added** — Support for relative imports in custom __import__ callback - **added** — bool and len unary operation support for dict views - **added** — Support for start and end position in re match and search methods - **added** — IPv6 support in asyncio.start_server() - **added** — Soft and hard IRQ callbacks for machine.Timer objects on most ports except esp32 - **added** — VIRT_RV64 board definition for 64-bit RISC-V in qemu port - **added** — MPS2_AN500 and MPS3_AN547 board definitions in qemu port - **added** — machine.RTC.datetime() method and time.time_ns() to alif port - **added** — esp32.wake_on_gpio() function to support waking up the SoC via GPIO pins - **added** — Hardware I2C implementation for STM32G4xx - **added** — I2CTarget support for STM32L4xx - **added** — Optional TinyUSB support as USB stack for stm32 port - **added** — DAC support for STM32G0xx - **added** — Support for STM32F469xx microcontrollers - **added** — PIO pin wrapping support and RP2350 alternate functions for rp2 port - **changed** — sys module is now enabled at all feature levels by default - **changed** — esp32 port updated to use ESP-IDF v5.5.1 This release of MicroPython adds support for ESP32-C5 and ESP32-P4 microcontrollers. The ESP32-P4 can work either standalone as a general purpose processor, or with an external wireless co-processor, currently either an ESP32-C5 or ESP32-C6. Board profiles are provided for all three of these configurations, as well as for the new ESP32-C5. Support for the low-power and high performing STM32U5xx series is also added in this release, supporting USB, ADC, DAC, UART, I2C, SPI and RTC, with a board profile for the NUCLEO-U5A5ZJ-Q. Rigorous and ongoing hardware-based testing is an important part of MicroPython, and with the increasing number of supported hardware platforms -- along with a growing test suite -- it's important to make the tests run as smoothly and as automated as possible. This release makes progress here by making many improvements to the test suite, such as: - auto-detecting if the target has unicode support - automatically including float tests when possible - always including stress tests - improving the skipping of tests that use slice and the micropython module - supporting different expected outputs when running native tests - making tests behave in low-memory condition - tweaking some tests so they can run on minimal builds - making all test runners use the `-t` argument to select the target - converting some tests to use `unittest` - converting some port-specific tests to cross-port tests - adding a test for serial (REPL) reliability and throughput - updating to use CPython 3.8.2 as the reference Python version - adding more internal benchmark tests. In order to support testing on more hardware targets in a scalable way, this release introduces board-specific `target_wiring.py` configuration. This feature allows defining in one location (one file) all the needed test-related hardware connections for a given port or board, definitions which are then imported and used by the tests that need them. Along with providing default definitions, this scheme allows custom hardware to easily specify its own wiring set up for the tests. To start with, all of the `machine.UART` tests have been converted to use `target_wiring.py`. With all the improvements to the test suite, the MicroPython continuous integration (CI) tests now run on the unix minimal variant, and as many tests as possible now run on the zephyr port CI. MicroPython now defines port Tier levels, which categorizes the 20 existing ports into four groups according to their stage of development. This aims to set expectations for the level of support and development each port receives. And also lower the bar of entry for new ports so they can enter at a low Tier and gradually rise up to Tier 1. See the top-level `README.md` and the docs at https://docs.micropython.org/en/latest/develop/support_tiers.html This release also sees MicroPython drop support for Python 2.7 in its build scripts and tools. Python 2.7 has been EOL since January 2020 and all modern operating systems support Python 3. There have been quite a few other improvements, optimizations and bug fixes to the core runtime, including: better 32-bit RISC-V code generation for the native emitter and Zba opcode support, support for relative imports in custom `__import__` callback, `bool` and `len` unary operation support for `dict` views, support for start and end position in `re` match and search methods and IPv6 support in `asyncio.start_server()`. Most ports (except esp32) now support soft and hard IRQ callbacks for `machine.Timer` objects. And the `sys` module is now enabled at all feature levels by default. Some third party libraries have been updated in this release: LittleFS is now at v2.11.2, TinyUSB is at 0.19.0-24, and stm32lib has N6 at 1.2.0, WB at 1.23.0 and newly added U5 support. The mimxrt's nxp_driver submodule has been restructured to match the official mcux-sdk. The alif port sees the addition of `machine.RTC.datetime()` to get and set _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.27.0]_ ### v1.26.1 — Patch release for ESP32 native USB support - Date: 2025-09-11 - Version: v1.26.1 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.26.1 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.26.1 - **changed** — Update esp_tinyusb component to v1.7.6 - **added** — Add MICROPY_MAINTAINER_BUILD environment variable - **fixed** — Fix hang from new tx_overwritable_if_not_connected flag in shared/tinyusb - **changed** — Rewrite USB CDC TX loop in shared/tinyusb/mp_usbd_cdc - **changed** — Do not apply Espressif DTR/RTS quirk to TinyUSB CDC devices in mpremote This is a patch release containing the following commits: - esp32: update esp_tinyusb component to v1.7.6 - tools: add an environment variable MICROPY_MAINTAINER_BUILD - esp32: add IDF Component Lockfiles to git repo - shared/tinyusb: fix hang from new tx_overwritabe_if_not_connected flag - shared/tinyusb/mp_usbd_cdc: rewrite USB CDC TX loop - tools/mpremote: don't apply Espressif DTR/RTS quirk to TinyUSB CDC dev ### v1.26.0 — I2CTarget, improved floats and native emitter, STM32N6 & ESP32C2 support - Date: 2025-08-09 - Version: v1.26.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.26.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.26.0 - **added** — Introduce machine.I2CTarget class to allow Python code to implement I2C target devices, available on alif, esp32, mimxrt, rp2, samd, stm32 and zephyr ports - **changed** — Rewrite float formatting to significantly improve repr reversibility, increasing correct repr and parse-back from 28% to 98.5% for single precision and from 38% to 99.8% for double precision - **added** — Add compiler support for handling floats as constants, allowing float folding in arithmetic operations and const assignments - **changed** — Improve float object representation C by applying a heuristic when recovering float values to copy the last two bits from previous bits instead of truncating - **changed** — Optimize native and viper emitter backends to emit more compact machine code for ARM, Thumb, Xtensa, RISC-V 32, x86 and x64 architectures - **added** — Enable Thumb v1 to support long jumps greater than 12 bits, allowing larger Python functions to be compiled to this native architecture - **added** — Implement most of the Xtensa LX3 opcodes in the inline assembler, including addx2, subx2, ssl and ssr - **added** — Add support for STM32N6xx MCU with USB, XSPI memory-mapped external flash, filesystem, basic peripherals and deepsleep - **added** — Add support for ESP32-C2 MCU with REPL, filesystem, GPIO, I2C, ADC, PWM, timers, WiFi and BLE - **changed** — Standardize the date range supported by the time module to work consistently across all platforms, supporting dates from at least 1970 up to 2099 - **changed** — Optimize slice handling in bytearray and memoryview subscripting to avoid heap allocation by allocating slice objects on the C stack - **added** — Add support for using __all__ in star imports - **added** — Add support for PEP487's __set_name__ special method - **added** — Add support for the _b/o/x specifier in str.format - **changed** — Allow arrays to be extended from any iterable, not just from an object with the buffer protocol - **added** — Add new sys.implementation._thread attribute that exists when threading is enabled and indicates which threading model is used - **changed** — Enable framebuf module to blit read-only data to FrameBuffer, allowing custom fonts to be stored in ROM - **changed** — Enable DTLS HelloVerify and Anti Replay protection in the tls module mbedTLS backend - **changed** — Enhance lwIP socket layer with a queue of incoming UDP and raw packets instead of only room for one outstanding packet This release of MicroPython sees the introduction of `machine.I2CTarget`, which allows Python code to implement an I2C target device. It's available on the alif, esp32, mimxrt, rp2, samd, stm32 and zephyr ports. In the simplest case it can create an I2C register/memory device that connects to a bytearray (or similar buffer) and allows an I2C controller to read from and write into that bytearray. For more complex scenarios the `I2CTarget` class exposes a set of interrupts which can be acted upon by Python code, allowing an arbitrary I2C device to be created. See the documentation for more details and examples. Floating point support has been improved in a few ways in this release. First, the formatting (printing) of floats has been rewritten to significantly improve the `repr` reversibility of floating-point numbers. That is, formatting and then re-parsing a float should return the original value. In MicroPython the percentage of floats that correctly repr and parse back was around 28% (single precision) and 38% (double precision), but has now been improved (in the standard build configuration) to 98.5% and 99.8% (single and double respectively). In addition to printing out more accurate floats, that helps a lot when saving floats to .mpy files, because it means they can be loaded back to the same value. Second, there is now support in the compiler for handling floats as constants. Floats can now be folded (along with integers) in arithmetic operations, and be part of `const` assignments. This helps to optimize bytecode because constant float expressions can now be evaluated in the compiler instead of at runtime. The third float improvement involves object representation C, where floats are stored within the immediate object value rather than on the heap. In this object module, the float can only take up 30 bits, so the last two bits of the single precision number are lost. Previously they were just truncated, but now a heuristic is applied when recovering the float value from the object such that the last two bits are copied from the previous two. This alleviates a bias towards zero and in general improves floating point calculations when using this representation. The native and viper emitter backends have been improved to emit more optimal machine code, for example to use more compact instructions in loads and stores. This is for all supported architectures: ARM, Thumb, Xtensa, RISC-V 32, x86 and x64. Thumb v1 (for example RP2040) now supports long jumps greater than 12 bits, allowing larger Python functions to be compiled to this native architecture. Also, the inline Xtensa assembler now implements most of the LX3 opcodes, with additions including addx2, subx2, ssl and ssr, among others. Two new MCUs are supported by this release: STM32N6xx and ESP32-C2 (aka ESP8684). The STM32N6xx is a new STMicroelectronics MCU running at 800MHz with a large amount of RAM and machine-learning accelerators. MicroPython now supports this MCU with USB, XSPI memory-mapped external flash, a filesystem, basic peripherals and deepsleep. The ESP32-C2 is by Espressif and is a small and low cost RISC-V MCU with WiFi and BLE. MicroPython running on this MCU supports a REPL, filesystem, GPIO, I2C, ADC, PWM, timers, WiFi and BLE. The date range supported by the `time` module has now been standardized to work the same across all platforms. The functions `time()`, `localtime()` and `mktime()` now work properly on a reasonable range of dates, from at least 1970 up to 2099, regardless of the Epoch used by the platform. The MicroPython virtual machine is now able to avoid heap-allocating slices when subscripting bytearray and memoryview objects, for example expressions like `bytearray_obj[a:b] = c`. The slice object is now allocated on the C stack, helping to reduce memory churn and allowing such expressions to work when the heap is locked, for example during a hard interrupt handler. This improvement goes in the _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.26.0]_ ### v1.25.0 — ROMFS, alif port, RISCV inline assembler, DTLS, mpremote recursive remove - Date: 2025-04-15 - Version: v1.25.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.25.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.25.0 - **added** — ROMFS feature providing a read-only, memory-mappable filesystem for executing bytecode and storing resources in-place without copying to RAM - **added** — mpremote romfs command with query, build, and deploy sub-commands for building and deploying ROMFS partitions - **added** — New alif port supporting Alif Ensemble MCUs with USB, dual-core support, octal SPI flash, machine classes, and WiFi and BLE support - **added** — Support for 32-bit RISC-V assembly code via @micropython.asm_rv32 decorator on rp2 port when RP2350 runs in RISC-V mode - **added** — Datagram TLS (DTLS) support in tls module via tls.PROTOCOL_DTLS_CLIENT and tls.PROTOCOL_DTLS_SERVER modes - **added** — mpremote rm -r option for recursive removal of files and directories - **added** — Full support for tuples and start/end arguments in str.startswith() and str.endswith() methods - **added** — Two-argument version of built-in next() function on most ports - **added** — sys.implementation._build entry holding the build name of the target - **added** — marshal module with dumps() and loads() functions supporting code objects and function conversion - **added** — Support for 32-bit RISC-V code in native modules - **added** — Dynamic USB device support on ESP32-S2 and ESP32-S3 MCUs for runtime configuration - **added** — Pin.toggle() method on esp32 port - **added** — exFAT filesystem support on mimxrt port - **added** — PPP driver for mimxrt boards with lwIP networking - **added** — UF2 bootloader support on mimxrt port - **added** — ADC.read_uv() method on mimxrt port - **changed** — vfs.mount() with no arguments now returns a list of mounted filesystems - **changed** — esp32 port now supports IDF v5.3 and v5.4; support for versions below v5.2.0 dropped - **changed** — I2C bus identifier is now an optional argument on esp32 port with bus 0 as default After more than three years in development, the "ROMFS" feature has been finalised, its filesystem format specified, and the VFS driver and supporting code are included in this release of MicroPython. This feature builds on bytecode version 6 (available for many years now), which supports executing bytecode in-place, that is, without the need to copy it to RAM. ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources, including precompiled mpy files, and allows executing bytecode directly from the filesystem. This makes importing significantly faster and use a lot less memory. Also, data resources such as fonts can be used in-place on a ROMFS without loading into RAM. ROMFS is currently enabled only on selected boards: PYBD-SFx, all alif-port boards, a new ESP8266_GENERIC variant called FLASH_2M_ROMFS, and all stm32 Arduino boards. Other boards will have ROMFS enabled in the future, or it can be manually enabled on user-defined boards. To build and deploy a ROMFS, mpremote has a new `mpremote romfs` command, with "query", "build", and "deploy" sub-commands, which can build and deploy a directory structure to a ROMFS partition on a target device. These initial ROMFS features will be extended in the future, but for now they provide a way to try out this long-anticipated feature. This release also introduces a brand new "alif" port supporting Alif Ensemble MCUs. These MCUs offer multiple ARM cores, including Ethos-U55 machine-learning processors, and a comprehensive set of peripherals. Current features of the MicroPython alif port include USB support via TinyUSB, dual-core support using OpenAMP, octal SPI flash with XIP, the machine classes Pin, UART, SPI and I2C, and cyw43 WiFi and BLE support. Two alif board definitions are currently available: ALIF_ENSEMBLE for the official Alif Ensemble E7 DevKit, and OPENMV_AE3 for OpenMV's upcoming AE3-based camera board. MicroPython's inline assembler now supports 32-bit RISC-V assembly code via the newly implemented `@micropython.asm_rv32` decorator. This allows writing small snippets of RISC-V machine code that can be called directly from Python code. It is enabled on the rp2 port when the RP2350 is running in RISC-V mode. Datagram TLS (DTLS) is now supported by the `tls` module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports. An `SSLContext` can be created in DTLS mode using `tls.PROTOCOL_DTLS_CLIENT` or `tls.PROTOCOL_DTLS_SERVER` as the mode option, and this context can then be used to wrap a normal UDP socket to get a secure UDP connection. The mpremote command-line tool now supports recursive remove via the new `rm -r` option; for example, `mpremote rm -rv :` can be used to remove all files and directories in the current working directory of the target device. mpremote also now supports relative URLs in the `package.json` file, installing from the local filesystem, and has optimised readline support in `mpremote mount`. Improvements to the core interpreter include: full support for tuples and start/end arguments in the `str.startswith()` and `str.endswith()` methods; enabling of the two-argument version of the built-in `next()` function on most of the ports; a new `sys.implementation._build` entry which holds the build name of the target; and `vfs.mount()` with no arguments now returns a list of mounted filesystems. The `marshal` module has been added with `dumps()` and `loads()` functions, which currently support code objects and, in combination with `function.__code__`, allow converting functions to/from a bytes object. This module is not enabled by default but can be used in custom build configurations. The MicroPython native linker `mpy_ld.py` now includes support for linking in static libraries automatically. This allows the native-module build scripts to look for required symbols from libraries such as `libgcc` and `libm` that are provided by the compiler. This now makes i _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.25.0]_ ### v1.24.1 — Patch release for mpremote, rp2 IGMP, esp32 PWM, SDCard, and AP channel - Date: 2024-11-29 - Version: v1.24.1 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.24.1 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.24.1 - **fixed** — fix UnboundLocalError in Transport.fs_writefile() in tools/mpremote - **fixed** — use IDF functions to calculate resolution correctly in esp32/machine_pwm - **fixed** — make pic16bit build with recent XC16 versions - **fixed** — fix buffer overflow in deque_subscr in py/objdeque - **fixed** — fix IGMP address type when IPv6 is enabled in extmod/modlwip - **fixed** — restore PWM support for ESP-IDF v5.0.x and v5.1.x in esp32/machine_pwm - **fixed** — workaround native code execution crash on ESP32-S2 - **fixed** — make sure stdout and stderr output appear in order in tools/mpremote - **added** — support trailing slash on dest for non-recursive copy in tools/mpremote - **fixed** — fix getaddrinfo hints to set AI_CANONNAME in esp32/modsocket - **changed** — support bool return from Python read/write blocks in extmod/vfs_blockdev - **fixed** — fix isconnected() result on AP interface in extmod/network_cyw43 - **fixed** — fix uninitialised variable in status('stations') in extmod/network_cyw43 - **changed** — allow configuring active AP interface in extmod/network_cyw43 - **fixed** — fix setting WLAN channel in AP mode in esp32 - **fixed** — use hardware version for touchpad macro defines in esp32 - **fixed** — fix machine.TouchPad startup on ESP32-S2 and S3 - **fixed** — fix 0 radius bug in FrameBuffer.ellipse in extmod/modframebuf - **fixed** — reset slow ticker callback count on soft reboot in nrf/drivers/ticker - **fixed** — workaround non-constant NAN definition on Windows MSVC in py/objfloat This is a patch release containing the following commits: - tools/mpremote: fix UnboundLocalError in Transport.fs_writefile() - esp32/machine_pwm: use IDF functions to calculate resolution correctly - pic16bit: make it build with recent XC16 versions - py/objdeque: fix buffer overflow in deque_subscr - extmod/modlwip: fix IGMP address type when IPv6 is enabled - esp32/machine_pwm: restore PWM support for ESP-IDF v5.0.x and v5.1.x - esp32: workaround native code execution crash on ESP32-S2 - tools/mpremote: make sure stdout and stderr output appear in order - tools/mpremote: add test for forced copy - tools/mpremote: support trailing slash on dest for non-recursive copy - esp32/modsocket: fix getaddrinfo hints to set AI_CANONNAME - extmod/vfs_blockdev: support bool return from Python read/write blocks - extmod/network_cyw43: fix isconnected() result on AP interface - extmod/network_cyw43: fix uninitialised variable in status('stations') - extmod/network_cyw43: allow configuring active AP interface - esp32: fix setting WLAN channel in AP mode - esp32: use hardware version for touchpad macro defines - esp32: fix machine.TouchPad startup on ESP32-S2 and S3 - extmod/modframebuf: fix 0 radius bug in FrameBuffer.ellipse - nrf/drivers/ticker: reset slow ticker callback count on soft reboot - py/objfloat: workaround non-constant NAN definition on Windows MSVC ### v1.24.0 — RP2350 and ESP32-C6 support, RISC-V native emitter, common TinyUSB code - Date: 2024-10-26 - Version: v1.24.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.24.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.24.0 - **added** — Support for the RP2350 MCU in both ARM and RISC-V mode and both 30- and 48-pin variants - **added** — RV32IMC native code emitter for RISC-V architecture with native NLR and GC register scanning implementations for 32- and 64-bit RISC-V - **added** — Support for placing RV32IMC native code in .mpy files and freezing it - **added** — RISC-V semihosting support - **added** — Support for concatenation of adjacent f-strings and raw f-strings - **added** — New micropython.RingIO class providing a stream interface to a thread-safe byte-oriented ring-buffer - **added** — Support for ESP32-C6 MCUs with RISC-V native emitter enabled on C3 and C6 - **added** — Global network.ipconfig() function and nic.ipconfig() method for configuring IP addresses with support for both IPv4 and IPv6 - **added** — Portable network.PPP implementation based on lwIP for bare-metal boards - **added** — Least-significant-bit (LSB) mode support in machine.SoftSPI class - **added** — Hashing ability to mpremote tool via sha256sum command - **added** — Threading support in the zephyr port through the _thread module - **added** — Support for constructing machine objects using device-tree node labels in the zephyr port - **changed** — Unified TinyUSB bindings across esp32 (S2 and S3), mimxrt, renesas-ra, rp2 and samd ports with shared helper code for CDC serial - **changed** — Startup CDC serial data is now buffered and sent to the host upon connection so REPL banner and prompt appear on first connection - **changed** — sys.exit() and raise SystemExit now trigger a soft reset of the device instead of dropping to the REPL - **changed** — Most ports now support registering Python callbacks for UART IRQs with consistent semantics across esp32, mimxrt, nrf, renesas-ra, rp2, samd and stm32 ports - **changed** — Enhanced mpremote recursive copy checks file hash and only updates destination if hash differs - **changed** — qemu port renamed from qemu-arm to qemu and reworked to support both ARM and RISC-V architectures with REPL and test running via pty serial port - **changed** — USB remains active during machine.lightsleep() on the rp2 port - **fixed** — Stack corruption issues in the esp32 port and fixes for handling native code loaded from .mpy files This release of MicroPython adds support for the new RP2350 MCU, improved RISC-V support with native code generation, support for ESP32-C6 MCUs, update Zephyr version with threading support, unified TinyUSB bindings across ports, a portable UART IRQ API, and enhanced mpremote recursive copy. There are also numerous bug fixes, enhancements to the test suite and more attention to testing of the machine module and its API. Read on for more details. Support for the RISC-V architecture has been significantly extended, to include an RV32IMC native code emitter, native NLR and GC register scanning implementations for 32- and 64-bit RISC-V, support for placing RV32IMC native code in .mpy files and also freezing it, and RISC-V semihosting support. Testing for RISC-V is done with the qemu and unix ports, and the support is utilised in the esp32 and rp2 ports. There is now support concatenation of adjacent f-strings, as well as raw f-strings. There is also a new `micropython.RingIO` class which provides a stream interface to an efficient, thread-safe, byte-oriented ring-buffer implementation. All the ports that use TinyUSB have now been unified to use the same shared helper code for CDC serial. This includes: esp32 (S2 and S3), mimxrt, renesas-ra, rp2 and samd ports. With this has come the useful feature that the startup CDC serial data is buffered and then sent to the host upon connection. This means that (among other things) the REPL banner and initial prompt is now seen on first connection to a board. Most ports now support registering Python callbacks for UART IRQs, and the semantics for the callback are made as consistent as possible across the ports. The possible IRQs are IRQ_RX, IRQ_RXIDLE, IRQ_TXIDLE and IRQ_BREAK, and the ports that have added support for these are esp32, mimxrt, nrf, renesas-ra, rp2 and samd (stm32 already had this feature). In the networking sub-system, a new API for configuring IP addresses and related settings has been added: the global `network.ipconfig()` function, and a `nic.ipconfig()` method on individual network interfaces. This new API supports both IPv4 and IPv6, with much more control compared to the original `nic.ifconfig()` method; the latter is still available for backwards compatibility, but `ipconfig()` is now preferred moving forward. A portable `network.PPP` implementation has been added, based on lwIP. This is not enabled by default but can be added to custom boards that use bare-metal lwIP. The `machine.SoftSPI` class now supports least-significant-bit (LSB) mode, as well as the existing MSB mode. The behaviour of `sys.exit()` and `raise SystemExit` (which are equivalent) has been changed: previously this would terminate the running script and drop to the REPL, but now it terminates the running script and triggers a soft reset of the device. This is more consistent with the unix port, which exits completely on a `SystemExit` exception. This change in behaviour is a breaking change and may impact certain applications; see commit 69c25ea8653566ec97690b5121bd10b753c89426 for details. The mpremote tool has a new hashing ability, eg `mpremote sha256sum ` and also has enhanced recursive copy which first checks the hash and only updates the destination file if the hash is different. This makes copying a large directory to a device significantly faster, and enables a "sync" workflow, where small changes can be made to a large application and then quickly deployed to the device via the recursive copy. The esp32 port now supports ESP-IDF v5.2.2, and with this comes support for ESP32-C6 MCUs. The RISC-V native emitter has been enabled on C3 and C6 MCUs. There have also been some important bug fixes, for handling of native code loaded from .mpy files, fixes for stack corruption, and a fix to I2S, among other things. Also, applications that use many TCP sockets in quick succession should see an improvement because there is now a hard limit on the number _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.24.0]_ ### v1.23.0 — Dynamic USB devices, revamped webassembly port, openamp, tls, vfs modules - Date: 2024-05-31 - Version: v1.23.0 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.23.0 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.23.0 - **added** — Added support for user-defined USB devices via new `machine.USBDevice` class allowing USB descriptors and Python callbacks for USB endpoint transfers on rp2 and samd ports - **added** — Added `openamp` module for asymmetric multiprocessing protocol support to control other CPU cores, load and start processes, and communicate through endpoints on mimxrt and stm32 ports - **added** — Added `vfs` module containing virtual filesystem related functions and classes such as `mount`, `umount` and `VfsFat` - **added** — Added `tls` module as evolution of `ssl` module with all existing functionality moved and new ability to register certificate verification callback - **added** — Added more methods to `deque` object to make it doubly-ended and support iteration - **added** — Added support for half-float 'e' format in `struct.pack`/`struct.unpack` - **added** — Added `esp32.mcu_temperature()` for ESP32-C3/S2/S3 devices - **added** — Added support to enter bootloader via `machine.bootloader()` on esp32 port - **added** — Added direct memory access to PIO and SPI FIFOs via proxy arrays on rp2 port - **added** — Added support for new raw filesystem in Mboot to allow simpler and more robust firmware updates - **changed** — Increased .mpy sub-version from v6.2 to v6.3 requiring recompilation of native code in .mpy files - **changed** — Network interface constants such as `IF_STA` and `SEC_WPA2` consolidated at `WLAN` class level for example `network.WLAN.SEC_WPA2` - **changed** — Updated mbedtls to version 3.5.1 - **changed** — Removed internal `STATIC` macro definition, code should now use `static` instead - **changed** — Implemented significant code size optimisations for frozen modules using new internal `mp_proto_fun_t` type - **changed** — Improved code size for very small targets by adding option to remove qstr hash bytes - **changed** — Applied firmware performance optimisations to rp2 port critical runtime and VM parts giving about 10% performance boost - **changed** — Exposed additional runtime methods on dynamic native modules - **changed** — esp32 port now uses new I2S IDF driver and supports IDF 5.0.5 and 5.2 - **fixed** — Fixed BLE component on esp32 port to deinitialise without crashing and increased BLE task stack size This release of MicroPython adds support for dynamic USB devices defined in Python, adds new `openamp`, `tls` and `vfs` modules, completely revamps the webassembly port to add proxying between JavaScript and Python, and implements significant code size optimisations for frozen modules. There are also many other enhancements and bug fixes. Keep reading for a more detailed summary of the main changes. After a lot of design, development and testing, MicroPython now has full support for user-defined USB devices. The interface is via a new `machine.USBDevice` class, and this allows the user to specify the USB descriptors and implement Python callbacks for USB endpoint transfers. With this, any USB device can be implemented in pure Python. While the `machine.USBDevice` interface is low-level and complete, there is a higher-level USB library in `micropython-lib` that allows easier implementation of devices, with examples for keyboard, mouse, MIDI and serial CDC. This feature is currently available on rp2 and samd ports, and other ports will follow in the future. Support for the OpenAMP (asymmetric multiprocessing) protocol has been added through the new `openamp` module. This allows MicroPython to control other CPU cores in the system, to load and start processes and communicate with them through endpoints. This feature is currently available on the mimxrt and stm32 ports. Two other new modules have been added: `vfs` and `tls`. The `vfs` module contains all VFS (virtual filesystem) related functions and classes, such as `mount`, `umount` and `VfsFat`. These were originally in the `os` module but having them there is not compatible with CPython, so they have been moved to their own dedicated module. They still exist in the `os` module for now but will eventually be removed from there, so it's recommended to start using the `vfs` module from now on. Similarly the new `tls` module is an evolution of the `ssl` module, whereby all the existing functionality in `ssl` has been moved to the `tls` module. This is done because MicroPython's SSL interface is becoming increasingly different to CPython's and moving this SSL/TLS functionality to a new `tls` module gives it room to grow and obtain new features that are useful for embedded applications. And compatibility with normal Python is still retained via a pure Python implementation of the `ssl` module. One new feature in the new `tls` module is the ability to register a certificate verification callback. Other additions include more methods on the `deque` object so it is doubly-ended and supports iteration, and support for half-float 'e' format in `struct.pack`/`struct.unpack`. Dynamic native modules have had some additional runtime methods exposed, and the .mpy sub-version has been increased from v6.2 to v6.3 (native code in .mpy files will need to be recompiled, but bytecode does not and is still compatible). There has also been significant code size optimisations for frozen modules. A new internal `mp_proto_fun_t` type has been defined which allows the common case of bytecode functions (as opposed to native code) to be stored in frozen code without any additional overhead of the `mp_raw_code_t` descriptor structure. All firmware builds using frozen modules will see a significant decrease in size. Code size has also improved further for very small targets by adding an option to remove the qstr hash bytes. Internally in the source code the "STATIC" macro definition has been removed. Code should now just use "static" instead. If you have C/C++ code that uses "STATIC" then either replace it with "static", or provide your own #define to define "STATIC" as "static". See commit decf8e6a8bb940d5829ca3296790631fcece7b21 for details. Mbedtls has been updated to version 3.5.1. And network interface constants, such as `IF_STA` and `SEC_WPA2`, have now been consolidated across ports so they all live at the `WLAN` class level, for example `network.WLAN.SEC_WPA2 _[Truncated at 4000 characters — full notes: https://github.com/micropython/micropython/releases/tag/v1.23.0]_ ### v1.22.2 — Patch release for rp2 DMA, UART and BLE, esp32 BLE, renesas-ra I2C - Date: 2024-02-20 - Version: v1.22.2 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.22.2 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.22.2 - **fixed** — fix potential Py-stack overflow in try-finally with return - **changed** — support gather of tasks that finish early in asyncio - **fixed** — fix cipher iteration in SSLContext.get_ciphers - **fixed** — reset pending_value_handle before calling write-done callback in btstack - **fixed** — reset pending_value_handle before calling read-done callback in btstack - **changed** — release the GIL while doing NimBLE port deinit on esp32 - **changed** — increase NimBLE task stack size and overflow detection headroom on esp32 - **fixed** — fix deepsleep wakeup pin ifdef in mimxrt modmachine - **fixed** — fix SysTick clock source on renesas-ra - **fixed** — fix the RTC clock source on renesas-ra ARDUINO_PORTENTA_C33 - **fixed** — fix 1 byte and 2 bytes read issue in renesas-ra ra_i2c - **fixed** — fix fetching 'write' buffers for writing not reading in rp2_dma - **fixed** — fix event wait in uart.flush() and uart.read() on rp2 machine_uart - **changed** — change machine.I2S and rp2.DMA to use shared DMA IRQ handlers This is a patch release containing the following commits: - py/compile: fix potential Py-stack overflow in try-finally with return - extmod/asyncio: support gather of tasks that finish early - extmod/modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers - extmod/btstack: reset pending_value_handle before calling write-done cb - extmod/btstack: reset pending_value_handle before calling read-done cb - esp32/mpnimbleport: release the GIL while doing NimBLE port deinit - esp32: increase NimBLE task stack size and overflow detection headroom - mimxrt/modmachine: fix deepsleep wakeup pin ifdef - renesas-ra/ra: fix SysTick clock source - renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock source - renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue - rp2/rp2_dma: fix fetching 'write' buffers for writing not reading - rp2/machine_uart: fix event wait in uart.flush() and uart.read() - rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ handlers ### v1.22.1 — Patch release for rp2 atomic mutex - Date: 2024-01-05 - Version: v1.22.1 - Original notes: https://github.com/micropython/micropython/releases/tag/v1.22.1 - Permalink: https://whatsnew.fyi/product/micropython/releases/v1.22.1 - **fixed** — Race condition and potential deadlock in the rp2 port's mp_thread_begin_atomic_section() function when the second core is in use This is a patch release to fix a race condition and potential deadlock in the rp2 port's `mp_thread_begin_atomic_section()` function, when the second core is in use.