# micropython v1.23.0 — Dynamic USB devices, revamped webassembly port, openamp, tls, vfs modules - Product: micropython (https://whatsnew.fyi/product/micropython) - Vendor: micropython - 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 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'. --- - **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]_