MicroPython 1.24.1

MicroPython is a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments.

Tags python education home automation internet embedded systems hardware networking industry
License MITL
State stable

Recent Releases

1.24.105 Dec 2024 08:05 minor feature: Patch release for mpremote, rp2 IGMP, esp32 PWM, SDCard, and AP channel This is a patch release containing the following commits: Tools/mpremote: 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: buffer overflow in deque_subscr. Extmod/modlwip: 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: getaddrinfo hints to set AI_CANONNAME. Extmod/vfs_blockdev: support bool return from Python read/write blocks. Extmod/network_cyw43: isconnected() result on AP interface. Extmod/network_cyw43: uninitialised variable in status('stations'). Extmod/network_cyw43: allow configuring active AP interface. Esp32: setting WLAN channel in AP mode. Esp32: use hardware version for touchpad macro defines. Esp32: machine.TouchPad startup on ESP32-S2 and S3. Extmod/modframebuf: radius in FrameBuffer.ellipse. Nrf/drivers/ticker: reset slow ticker callback count on soft reboot. py/objfloat: workaround non-constant NAN definition on Windows MSVC.
1.25.0-preview28 Nov 2024 04:05 minor feature: All: Bump version to 1.25.0-preview. Signed-off-by: Damien George lt;damien@micropython.org gt;.
1.24.028 Nov 2024 00:45 minor feature: RP2350 and ESP32-C6 support, RISC-V native emitter, common TinyUSB code 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, 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 t
1.24.0-preview01 Jun 2024 21:45 minor feature: All: Bump version to 1.24.0-preview. Signed-off-by: Damien George lt;damien@micropython.org gt;.
1.22.221 Feb 2024 21:45 minor feature: Patch release for rp2 DMA, UART and BLE, esp32 BLE, renesas-ra I2C This is a patch release containing the following commits: py/compile: potential Py-stack overflow in try-finally with return. Extmod/asyncio: support gather of tasks that finish early. Extmod/modssl_mbedtls: 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: deepsleep wakeup pin ifdef. Renesas-ra/ra: SysTick clock source. Renesas-ra/boards/ARDUINO_PORTENTA_C33: the RTC clock source. Renesas-ra/ra/ra_i2c: byte and 2 bytes read. Rp2/rp2_dma: fetching 'write' buffers for writing not reading. Rp2/machine_uart: event wait in uart.flush() and uart.read(). Rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ handlers.
1.23.0-preview04 Jan 2024 04:45 minor feature: All: Bump version to 1.23.0-preview. Signed-off-by: Damien George lt;damien@micropython.org gt;.
1.22.028 Dec 2023 03:25 minor feature: SSL support in asyncio, sorted qstr pools, common machine module bind ings. This release of MicroPython introduces SSL/TLS support to asyncio, for both. The client and server sides. The interface matches CPython: `asyncio.open_connection()` and `asyncio.start_serve()` now both accept an. `ssl` argument to supply an `SSLContext` object. As part of this, new. Methods were added to `SSLContext` to load certificates, and certificate. Date/time validation was enabled on all ports that use mbedTLS. Qstr pools are now sorted, which provides a significant performance boost. For `qstr_find_strn()`, which is called a lot during parsing and loading of. .mpy files, as well as interning of string objects, which happens in most. String methods that return new strings. The static pool (part of the.mpy. ABI) isn't currently sorted, but could be in the future. There have been many internal changes to the `machine` module (and on some. Ports the `os` module) to factor the Python bindings to a common location. Reduce code duplication and make the API more consistent across all the. Ports. And a new `boardgen.py` script has been added to factor pin. Generation and enable a more consistent `machine.Pin` across ports. For. Consistency, the following user-facing changes have been made: Cc3200 port: The `machine` module gains `soft_reset()`, `mem8`, `mem16`. `mem32` and `Signal`; it loses `POWER_ON`. `disable_irq()` now returns an (opaque) integer rather than a bool, and. `enable_irq(state)` must be passed an argument which is the return value. of `disable_irq()`, rather than a bool. In the `os` module, `dupterm()`. Has been converted to use the common implementation and has semantics the. Same as other ports, and `uname()` is removed to save space (sys.version. And sys.implementation can be used instead). Esp32 port: In the `machine` module, `lightsleep()` and `deepsleep()` no. Longer take the `sleep` keyword argument, instead it'
1.22.0-preview10 Oct 2023 07:05 minor feature: all: Switch to new preview build versioning scheme. See #12127 for details. Previously at the point when a release is made, we update mpconfig.h. and set a git tag. i.e. the version increments at the release. Now the version increments immediately after the release. The workflow is: 1. Final commit in the cycle updates mpconfig.h to set (X, Y, 0, 0) (i.e. clear the pre-release state). 2. This commit is tagged "vX.Y.0". 3. First commit for the new cycle updates mpconfig.h to set (X, Y+1, 0, 1). (i.e. increment the minor version, set the pre-release state). 4. This commit is tagged "vX.Y+1.0-preview". The idea is that a nightly build is actually a "preview" of the _next_. release. i.e. any documentation describing the current release may not. actually match the nightly build. So we use "preview" as our semver. pre-release identifier. Changes in this commit: - Add MICROPY_VERSION_PRERELEASE to mpconfig.h to allow indicating that. this is not a release version. - Remove unused MICROPY_VERSION integer. - Append "-preview" to MICROPY_VERSION_STRING when the pre-release state. is set. - Update py/makeversionhdr.py to no longer generate MICROPY_GIT_HASH. - Remove the one place MICROPY_GIT_HASH was used (it can use. MICROPY_GIT_TAG instead). - Update py/makeversionhdr.py to also understand. MICROPY_VERSION_PRERELEASE in mpconfig.h. - Update py/makeversionhdr.py to convert the git-describe output into. semver-compatible "X.Y.Z-preview.N.gHASH". - Update autobuild.sh to generate filenames using the new scheme. - Update remove_old_firmware.py to match new scheme. - Update mpremote's pyproject.toml to handle the "-preview" sufin the. tag. setuptools_scm maps to this "rc0" to match PEP440. - docs heading where it incorrectly said "vvX.Y.Z" for release docs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared lt;jim.mussared@gmail.com gt;.
1.21.006 Oct 2023 07:45 minor feature: U-module renaming, deflate module, IDF 5, board variants and Pico-W BLE This release of MicroPython sees the renaming of built-in modules to remove. The u-pre, a new deflate module with optional compression support, the. Introduction of board variants, switching of the esp32 port to use IDF 5. Together with improved heap management, support for BLE on RPi Pico W. Boards, and STM32H5xx support. The project is also now using codespell and. Ruff to improve code quality. New boards added in this release are: ARDUINO_NANO_ESP32 and UM_NANOS3 (esp32 port), ADAFRUIT_METRO_M7 (mimxrt. Port), ARDUINO_PORTENTA_C33 and VK_RA6M5 (renesas-ra port). ADAFRUIT_METRO_M4_EXPRESS (samd port), NUCLEO_L4A6ZG and STM32H573I_DK. (stm32 port). The renaming of built-in modules to remove the u-pre-- for example. Utime becomes time, uasyncio becomes asyncio -- is done to improve. Compatibility with CPython and eliminate confusion about whether to import. The u-version or the non-u-version of the name. Now, one should just. Always import the non-u-version and no longer think about u-naming. The. Only remaining module with a u-preis uctypes because it is not. Compatible with the CPython ctypes modules. The following modules are. Still available via their u-names for backwards compatibility: array. Asyncio, binascii, bluetooth, collections, cryptolib, errno, hashlib. Heapq, io, json, machine, os, platform, random, re, select, socket, ssl. Struct, time, websocket. These modules (except for asyncio) are also. Extensible and can be overridden by a file with the same name, eg time.py. To force the import of a built-in, one must first clear (and subsequently. Restore) sys.path; the ability to write to the sys.path attribute has also. Been implemented in this release. For further information see the. Discussion at #9018. Furthermore, importing itself has been tweaked and optimised, and importing. of built-ins no longer touch the filesystem,
1.20.006 Jul 2023 12:27 minor feature:
14 Mar 2021 22:45 minor feature: