Skip to content

Dynamic USB devices, revamped webassembly port, openamp, tls, vfs modules

Latest
Compare
Choose a tag to compare
@dpgeorge dpgeorge released this 31 May 05:03
· 11 commits to master since this release

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 decf8e6 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 (existing constants at the network module level have been retained for backwards compatibility, but the new ones should be preferred from now on).

The esp32 port has seen some important bug fixes in the BLE component, to deinitialise without crashing, and increase the BLE task stack size. This port also uses the new I2S IDF driver, and supports IDF 5.0.5 and 5.2. There is support to enter the bootloader via machine.bootloader() and a new esp32.mcu_temperature(), for ESP32-C3/S2/S3 devices.

The rp2 port has added the new machine.USBDevice dynamic USB driver, and has had firmware performance optimisations applied to critical parts of the runtime and VM, giving about a 10% performance boost. There is now direct memory access to PIO and SPI FIFOs via proxy arrays, and bugs have been fixed with threads, lightsleep and UART IRQ latency.

The stm32 port has integrated support for the new openamp module, which is enabled on all Arduino boards. And firmware for Arduino boards now freeze in additional Arduino-specific library code. There have been fixes for internal flash writes on STM32H5 and STM32H7 MCUs (bank selection and flashing of the last word in a buffer), an important fix to a SPI DMA caching bug, an I2C clock enable fix for I2C4 on STM32F7 MCUs, and a fix for the FDCAN source clock frequency on STM32G4 MCUs. Mboot has added support for a new raw filesystem, to allow simpler and more robust firmware updates.

The webassembly port has seen a significant overhaul in its structure, and is now built as a JavaScript .mjs module that exports a user-friendly JavaScript-level API which is inspired by the API provided by Pyodide (which is a version of CPython that runs in the browser). This change is motivated by the need to use MicroPython as an engine within Pyscript, which is a platform for Python in the browser. New features in the webassembly port include proxying of objects between Python and JavaScript, a js module to interface with the JavaScript namespace, a jsffi module for miscellaneous proxy helpers, top-level async code, JavaScript driven asyncio support, automatic growing of the Python heap, integration of JavaScript and Python finalisation for global memory management, more time module functions, and support for build variants (following the unix port).

The change in code size since the previous release for various ports is (absolute and percentage change in the text section):

   bare-arm:   -220  -0.383%
minimal x86:   -341  -0.184%
   unix x64: +20168  +2.527%
      stm32:  -1692  -0.430%
     cc3200:   +256  +0.139%
    esp8266:  -8880  -1.260%
      esp32:  -3328  -0.194%
     mimxrt:   -408  -0.112%
 renesas-ra:   -464  -0.074%
        nrf:   -640  -0.341%
        rp2:  +5380  +1.626%
       samd:  +3224  +1.229%

The leading causes of these changes in code size are:

  • bare-arm, minimal: disabling qstr hashing
  • unix: updating mbedtls to version 3.5.1
  • stm32: optimising size of frozen modules
  • cc3200: addition of new vfs module, and bug fixes in the VM and array type
  • esp8266: disabling unused MICROPY_DEBUG_PRINTERS and optimising frozen modules
  • esp32, mimxrt, renesas-ra, nrf: optimising frozen modules
  • rp2: addition of machine.USBDevice, enabling -O2 optimisations
  • samd: addition of machine.USBDevice

Performance is effectively unchanged since the previous release on all ports, except the rp2 port which sees a performance improvement of roughly 10%.

Thanks to everyone who contributed to this release: Amirreza Hamzavi, Andrew Leech, Angus Gratton, Brian Pugh, Carlosgg, Christian Walther, Damien George, Daniël van de Giessen, darc, Dash Peters, David Lechner, Felix Dörre, iabdalkader, IhorNehrutsa, Iksas, J. Neuschäfer, Jared Hancock, Jim Lipsey, Jim Mussared, Jochen Sprickerhof, Joey232, Jos Verlinde, Kwabena W. Agyeman, Maarten van der Schrieck, Matt Trentini, Matthias Urlichs, Michiel W. Beijen, MikeTeachman, Nicko van Someren, Olivier Lenoir, Phil Howard, Rick Sorensen, robert-hh, Sebastian Romero, Simon Wood, Stanislav Ponomarev, stijn, Takeo Takahashi, Trent Piepho, Trent Warlaven, Vonasmic, YAMAMOTO Takashi, Yoctopuce.

MicroPython is a global Open Source project, and contributions were made from the following timezones: -0800, -0700, -0600, -0500, -0300, +0000, +0100, +0200, +0330, +0400, +0900, +1000, +1100.

The work done in this release was funded in part through GitHub Sponsors, and in part by George Robotics, Espressif, Anaconda, Arduino, LEGO Education, OpenMV and Planet Innovation.

What follows is a detailed list of all changes, generated from the git commit history, and organised into sections.

Main components

all:

  • fix "reuse" and "overridden" spelling mistakes
  • update bindings, ports and tests for mbedtls v3.5.1
  • use mp_obj_malloc_with_finaliser everywhere it's applicable
  • remove the "STATIC" macro and just use "static" instead
  • prune trailing whitespace
  • update extmod, ports, examples to build with new berkeley-db lib
  • add pre-commit hook for codespell
  • update copyright year range to include 2024
  • ISSUE_TEMPLATE: convert issue templates to forms

py core:

  • py.mk: remove extra build dir created for frozen_content
  • qstr: add support for MICROPY_QSTR_BYTES_IN_HASH=0
  • mpconfig: disable qstr hashing at minimum feature level
  • builtinimport: simplify calls to stat_path()
  • compile: fix potential Py-stack overflow in try-finally with return
  • emitglue: reorder and resize members of mp_raw_code_t
  • emitglue: provide a truncated mp_raw_code_t for non-asm code
  • emitglue: simplify mp_raw_code_t's kind and scope_flags members
  • emitglue: introduce mp_proto_fun_t as a more general mp_raw_code_t
  • emitglue: include fun_data_len in mp_raw_code_t only when saving
  • makeversionhdr.py: reinstate MICROPY_GIT_HASH in mpversion.h
  • obj: change sizeof to offsetof in mp_obj_malloc_var macro
  • obj: introduce mp_obj_malloc_with_finaliser to allocate and set type
  • misc: remove m_new_obj[_var]_with_finaliser macros
  • objfun: make mp_obj_new_fun_native/mp_obj_new_fun_asm static-inline
  • objfun: split viper fun type out to separate mp_type_fun_viper type
  • emitnative: simplify layout and loading of native function prelude
  • objfun: support name on native functions and generators
  • objfun: inline mp_obj_code_get_name() into mp_obj_fun_get_name()
  • emitglue: remove n_pos_args from DEBUG_printf
  • builtinevex: fix setting globals for native functions in compile()
  • compile: remove TODO about name mangling
  • emitglue: make mp_emit_glue_assign_native's fun_data arg a const ptr
  • mpconfig: change the default enable level for the vfs module
  • emitbc: remove call to adjust Python stack by 0 entries
  • mpstate: don't declare mp_thread_get_state()
  • modthread: move thread state initialisation to shared function
  • emitglue: add explicit cast of proto_fun to uint8_t pointer
  • objstr: add a macro to define a bytes object at compile time
  • stream: add mp_stream_seek() helper function
  • stream: factor stream implementations
  • objdeque: expand implementation to be doubly-ended and support iter
  • asm: add ASM_NOT_REG and ASM_NEG_REG macros for unary ops
  • asmxtensa: optimise asm_xtensa_mov_reg_i32_optimised() for tiny ints
  • emitnative: implement viper unary ops positive, negative and invert
  • binary: support half-float 'e' format in struct pack/unpack
  • parse: zero out dangling parse tree pointer to fix potential GC leak
  • compile: add option to allow compiling top-level await
  • nlr: add "memory" to asm clobbers list in nlr_jump
  • makeqstrdata.py: ensure that scope names get low qstr values
  • dynruntime: add mp_binary_get_size/get_val_array/set_val_array
  • persistentcode: bump .mpy sub-version to 6.3
  • objfun: fix C++ compatibility with casting in inline functions
  • obj: fix initialiser order in MP_DEFINE_CONST_OBJ_TYPE_NARGS_ macros
  • objarray: fix use-after-free if extending a bytearray from itself
  • nlrthumb: make non-Thumb2 long-jump workaround opt-in
  • dynruntime: add mp_obj_exception_init function to create C exception
  • dynruntime: export mp_load_method_maybe and mp_arg_parse_all* funcs

extmod:

  • extmod.mk: disable uninitialized warnings in kf_rem_pio2.c
  • asyncio: support gather of tasks that finish early
  • modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers
  • modssl_axtls: add SSLContext.load_cert_chain()
  • modtls: move the native ssl module to tls
  • modtls_mbedtls: implement cert verification callback for mbedtls
  • modvfs: add new "vfs" module with mount/umount and Vfs classes
  • btstack: reset pending_value_handle before calling write-done cb
  • btstack: reset pending_value_handle before calling read-done cb
  • modrandom: add integer type casts where appropriate
  • modlwip: support IPv6
  • network_wiznet5k: adjust IP types for IPv6
  • vfs_posix_file: ensure file object has safe default fd
  • modmachine: remove MICROPY_PY_MACHINE guard from header
  • modwebsocket: fix websocket to send correct close frame
  • modlwip: add back support for empty IP addresses
  • asyncio: make current_task raise exception when there is no task
  • nimble: override configuration options set in nimble_port_init
  • nimble: enable key distribution to support bonding
  • network_ninaw10: activate the NIC on demand
  • network_ninaw10: set the proper security mode if none provided
  • network_ninaw10: fix error messages
  • modmachine: add MICROPY_PY_MACHINE_SIGNAL configuration option
  • modmachine: add MICROPY_PY_MACHINE_MEMX configuration option
  • modmachine: add MICROPY_PY_MACHINE_RESET configuration option
  • nimble: check for active before setting address mode
  • machine_usb_device: add support for Python USB devices
  • libmetal: add MicroPython platform for libmetal
  • modopenamp: add new OpenAMP module
  • modopenamp_remoteproc: add new OpenAMP RemoteProc class
  • os_dupterm: handle exception properly when it occurs in parallel
  • modnetwork: implement IPv6 API to set and get NIC configuration
  • network_wiznet5k: properly enable interrupt signal on w5100s
  • add interface and security constants at WLAN class level
  • modtls_axtls: add verify_mode and CERT_NONE constant
  • modopenamp: set a default log handler for ports
  • modopenamp: use metal logging functions exclusively
  • modasyncio: make mp_asyncio_context variable public
  • network_wiznet5k: properly enable socket buffers for W5100(S)
  • modlwip: use Nagle algorithm and add support for TCP_NODELAY
  • modos: only sync FAT filesystems using disk_ioctl

shared:

  • timeutils: remove useless void-return
  • tinyusb: don't disconnect on soft reset unless USB was active
  • tinyusb: update some code comments for runtime USB
  • tinyusb: increase default string descr max length to 40 chars
  • tinyusb: fix dynamic USB control callbacks for wLength==0
  • tinyusb: stall the CDC IN endpoint while disconnecting

drivers:

  • dht: only build DHT driver if MICROPY_PY_MACHINE_PULSE enabled
  • memory: add IS25LPWP064D chip to list of external flash devices

mpy-cross: no changes specific to this component/port

lib:

  • cmsis: update to CMSIS 5.9.0
  • mbedtls: update to mbedtls v3.5.1
  • mbedtls_errors: update error list for latest mbedtls
  • micropython-lib: update submodule to latest
  • cyw43-driver: update driver to latest version v1.0.3
  • open-amp: add OpenAMP submodule
  • libmetal: add libmetal submodule
  • berkeley-db-1.xx: update submodule URL and version
  • arduino-lib: add Arduino's external library

Support components

docs:

  • samd/pinout: update pinout docs with fixed pin assignment
  • develop/porting: fix argument type of mp_lexer_new_from_file()
  • add note about position-only arguments in CPython vs MicroPython
  • library/ssl: change wrap_socket args keyfile/certfile to key/cert
  • library: move vfs functions and classes from os to vfs module docs
  • reference/micropython2_migration.rst: add info about os and vfs
  • use vfs module instead of os
  • library/sys.rst: document implementation.version.releaselevel
  • library/bluetooth: add note that ESP32 supports pairing/bonding
  • library/openamp: document the new openamp module
  • library/collections: update deque docs to describe new features
  • library/rp2.DMA: add documentation for rp2 DMA support
  • library/machine.RTC: add docs for RTC.memory() method
  • reference/mpyfiles: document change in .mpy sub-version
  • develop/optimizations: fix typo identified in issue 14391
  • esp32/quickref: add note about different ESP32 varieties
  • library/machine.USBDevice: update note about packages in mp-lib
  • reference: document how to mip install packages from GitLab
  • library/asyncio: document that ThreadSafeFlag now works on unix
  • update copyright year range to include 2024

examples:

  • embedding: add -fno-common to the sample compiler flags
  • natmod/framebuf: enable FrameBuffer.poly method
  • usb: add a very simple USBDevice example with host
  • usb: add a USBDevice example implementing the DFU protocol
  • network: rename SSL examples to start with https
  • network: add example of HTTPS client using non-blocking socket
  • usb: add README that points out the alternative usb modules
  • natmod/features4: create custom FactorialError as exc example
  • natmod/btree: make btree.open use mp_arg_parse_all for kwargs

tests:

  • run-tests.py: remove machine_mem.py test from skip list
  • thread: adjust thread tests so most are able to run on rp2 port
  • thread: add a test for accuracy of sleep within a thread
  • run-multitests.py: change to dir of test script when running it
  • multi_net: generate smaller certs with 2048-bit RSA
  • run-tests.py: add an option for running only the failed tests
  • run-tests.py: remove unneeded argument from run_feature_check()
  • run-tests.py: make repl test detection more correct
  • run-tests.py: fix path-based special test detection
  • extmod/machine_uart_tx.py: add a test for timing of UART.flush()
  • move port-specific test directories into tests/ports/ directory
  • ports/rp2: add rp2-specific tests with a test for rp2.DMA
  • extmod/machine_i2s_rate.py: test multiple I2S instances
  • extmod/asyncio_wait_task.py: add test for raise and delayed wait
  • extmod: remove asyncio .exp files that match CPython output
  • extmod/framebuf_polygon.py: replace sys.stdout.write with print
  • ports/rp2/rp2_dma.py: tweak test to be more reliable
  • use vfs module instead of os
  • multi_bluetooth/ble_irq_calls.py: enhance test to test recursion
  • ports/unix: add coverage test for frozen functions and generators
  • cpydiff: add new CPy diff test for class name mangling
  • multi_bluetooth: move ble_deepsleep to stress_deepsleep_reconnect
  • basics: split MicroPython-specific deque tests to separate file
  • float/float_struct_e.py: add specific test for struct 'e' type
  • run-tests.py: support running webassembly tests via node
  • ports/webassembly: add webassembly JS tests
  • net_inet: add simpler tls sites test, and skip existing on axtls
  • cpydiff: add a note about risk of resizing memoryview targets
  • micropython/import_mpy_invalid.py: skip if target cant import mpy
  • run-natmodtests.py: fix search for supported native tests
  • extmod: fix regex strings to be of r"" type
  • extmod: add .exp test files for asyncio.get_event_loop tests
  • basics: split out generator.throw tests that pass multiple args
  • net_hosted/ssl_verify_callback.py: make exp match actual output
  • net_inet/tls_text_errors.py: tweak test for newer CPython version
  • float: use "not" instead of ~ to invert bool value
  • basics: add .exp file for slice_op test
  • basics: move str/bytes tests that give SyntaxWarning to sep file

tools:

  • gen-changelog.sh: exclude "-preview" tags from generated log
  • mpremote: reduce dependency on importlib_metadata
  • manifestfile.py: change library search to use a list of paths
  • mpy-tool.py: fix static qstrs when freezing without qstr header
  • mpy-tool.py: skip generating frozen mp_raw_code_t when possible
  • manifestfile.py: add --unix-ffi option
  • ci.sh: add Arduino GIGA to stm32 CI build
  • mpy-tool.py: fix merging of more than 128 mpy files
  • ci.sh: update webassembly CI tests
  • manifestfile.py: fix freeze() when script is an empty iterable
  • mpremote: add support to mip install from GitLab
  • ci.sh: simplify selection of natmod tests to run

CI:

  • workflows: bump actions/cache from 3 to 4
  • workflows: run mimxrt and rp2 CI with space in repository path
  • workflows: move Windows CI from AppVeyor to GitHub Actions
  • workflows: bump setup-msbuild, setup-python, checkout versions
  • workflows: initialise micropython-lib submodule for windows CI
  • workflows: move codespell to a GitHub workflow, version it
  • workflows: add comments where tool versions need to be in sync
  • workflows: standardise formatting of ruff.yml
  • workflows: add Biome workflow for JavaScript formatting/linting
  • workflows: update coverage workflow to codecov-action@v4
  • workflows: run code size workflow on shared or port code changes

The ports

all ports:

  • move MICROPY_PY_LWIP_ENTER/REENTER/EXIT defns to mphalport.h
  • move MICROPY_INTERNAL_WFE definition to mphalport.h
  • fix handling of paths containing spaces in Makefiles
  • add LED pin aliases for all Arduino boards
  • use vfs module instead of os
  • on cold boot, enable USB after boot.py completes
  • don't include mpthread.h in mpthreadport.h

bare-arm port: no changes specific to this component/port

cc3200 port: no changes specific to this component/port

embed port:

  • fix alloca include for FreeBSD and NetBSD
  • improve stack top estimation

esp8266 port:

  • boards/ESP8266_GENERIC: disable MICROPY_DEBUG_PRINTERS
  • Makefile: add support for C++ user C modules
  • network_wlan: add interface and security WLAN constants

esp32 port:

  • modsocket: use all supplied arguments to socket.getaddrinfo()
  • boards/UM_FEATHERS3: use read_uv() for accurate battery voltage
  • network_ppp: make PPP support optional
  • mpnimbleport: release the GIL while doing NimBLE port deinit
  • increase NimBLE task stack size and overflow detection headroom
  • machine_i2c: fix build warnings when I2C is disabled
  • machine_hw_spi: combine argument parsing for constructor and init
  • boards: add missing named digital pins for Arduino Nano ESP32
  • machine_i2s: integrate new I2S IDF driver
  • add support for IDF version v5.0.5
  • add support for IDF version v5.2
  • add IDF-version-specific sdkconfig
  • mpconfigport: don't hang when machine.bootloader isn't supported
  • modmachine: support bootloader on ESP32-S2/S3/C2/C3
  • network_lan: add a separate argument to set PHY power pin
  • machine_uart: always configure timeout_char setting in init()
  • boards/ESP32_GENERIC_S3: add 4MiB partitioning board variant
  • workaround IDF issue placing ISR ringbuf functions in IRAM
  • main: check if main GC heap allocation failed
  • network_wlan: add interface and security WLAN constants
  • modesp32: add mcu_temperature() function for C3/S2/S3 devices
  • panichandler: print support information on panic
  • add support for TCP_NODELAY

mimxrt port:

  • mphalport: remove redundant NVIC/IRQ defines
  • mpbthciport: add missing extmod/modmachine.h header
  • boards: fix __VECTOR_TABLE link issue with CMSIS 5.9.0
  • modmachine: fix deepsleep wakeup pin ifdef
  • fix header include guard names
  • mpconfigport: enable cryptolib and hashlib md5
  • define the MICROPY_HW_ENABLE_USBDEV macro
  • set the security mode for the default WiFi AP
  • add support for OpenAMP

minimal port:

  • allow compiling on macOS
  • use printf instead of echo -e

nrf port:

  • modules/os/microbitfs: sweep the filesystem if any free chunk found
  • fix _start() build issue with CMSIS 5.9.0
  • boards: add named pins for Arduino Nano 33 BLE
  • boards: enable MICROPY_HW_ENABLE_USBDEV on boards with USB CDC
  • Makefile: allow external board definitions
  • modules/machine: enable code formatting
  • fix non-running LFCLK
  • modules/machine: catch exceptions from pin interrupts
  • modules/machine/pwm: tag a PWM device as used in the constructor
  • main: fix build of microbit when SD is enabled
  • Makefile: clean up dangling LIBS declaration
  • mpconfigport: enable MICROPY_NLR_THUMB_USE_LONG_JUMP on nRF51xx

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

qemu-arm port:

  • mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES

renesas-ra port:

  • ra: fix SysTick clock source
  • ra: remove unnecessary min_delay() declaration
  • boards/ARDUINO_PORTENTA_C33: fix the RTC clock source
  • ra/ra_i2c: fix 1 byte and 2 bytes read issue
  • fix spelling mistakes found by codespell
  • boards: add named pins for Arduino Portenta C33
  • boards/ARDUINO_PORTENTA_C33: add Arduino's external library

rp2 port:

  • rp2_flash: lockout second core only when doing flash erase/write
  • mutex_extra: implement additional mutex functions
  • mpthreadport: fix race with IRQ when entering atomic section
  • rp2_dma: fix fetching 'write' buffers for writing not reading
  • provide direct memory access to PIO and SPI FIFOs via proxy arrays
  • machine_uart: fix event wait in uart.flush() and uart.read()
  • mpconfigport: allow MICROPY_PY_THREAD to be disabled by a board
  • mpthreadport: make result of thread.get_ident() a non-zero integer
  • machine_uart: fix potential race condition in interrupt handling
  • boards/ARDUINO_NANO_RP2040_CONNECT: increase flash storage space
  • change machine.I2S and rp2.DMA to use shared DMA IRQ handlers
  • boards: add named digital pins for Arduino Nano RP2040 Connect
  • enable support for Python USB devices
  • CMakeLists: apply O2 optimisation to map, mpz and vm source code
  • modmachine: prevent lock-up when lightsleep() called within thread
  • README: fix typo, improve sentence about building with other boards
  • boards/W5500_EVB_PICO: update incorrect url in board.json

samd port:

  • remove the MICROPY_PY_MACHINE_RTC config option
  • mcu/samd21: reorganize and enable more firmware features
  • mcu: fix wrong EIC table entries in pin-af-table.csv
  • mpconfigport: simplify and consolidate config options
  • mcu/samd21: enable MICROPY_STACK_CHECK on SAMD21
  • enable support for Python USB devices
  • README: fix incorrect port directory name
  • boards: enable MICROPY_HW_DFLL_USB_SYNC on appropriate boards
  • mcu: update clock config after changes to USB
  • samd_spiflash: allow configuring the flash SPI baudrate
  • samd_qspiflash: avoid reading status byte 2 when not available
  • mcu: guard static function with appropriate #if

stm32 port:

  • mboot: improve detection of invalid flash erase/write
  • mboot: improve mass erase to erase all non-protected pages
  • flash: remove commented-out flash functions
  • flash: simplify sector calculation for homogeneous flash layout
  • flash: change flash_erase to only erase a single sector at a time
  • flashbdev: don't rely on flash sector id
  • flash: factor and simplify erase code
  • flash: fix sector and bank calculation for H5 and H7 MCUs
  • mboot/Makefile: revert change to BOARD_DIR that removed abspath
  • disable qstr hashing on small boards
  • boards/ARDUINO_PORTENTA_H7: add pin configuration for SPI1
  • modos: allow disabling MICROPY_PY_MACHINE_UART
  • spi: allow disabling MICROPY_PY_MACHINE_SPI
  • main: allow disabling MICROPY_PY_MACHINE
  • Makefile: ignore uninitialised variable warning in H5 HAL SD code
  • mboot: generate FLASH_LAYOUT_STR at runtime on H5 MCUs
  • mpbthciport: allow building with MICROPY_PY_MACHINE_UART disabled
  • sdram: support remapping FMC memory banks
  • network_lan: allow defining phy_addr in the LAN constructor
  • eth: remove redundant ETH clock enable code
  • network_lan: add the phy_type=x keyword option to network.LAN()
  • simplify D-cache clean and invalidate macros
  • mpu: rename MPU_CONFIG_DISABLE to MPU_CONFIG_NOACCESS
  • dma: add D-cache protection for DMA RX operations, including SPI
  • add support for dual-analog-pad "_C" pins on H7 MCUs
  • boards: add named digital and analog pins for Arduino boardrs
  • sdram: fix MPU config to use MPU_CONFIG_NOACCESS
  • mpu: add MPU config for shared, uncached memory region
  • implement port backend for libmetal
  • implement port backend for OpenAMP's remoteproc
  • boards/ARDUINO_GIGA: enable OpenAMP
  • boards/ARDUINO_NICLA_VISION: enable OpenAMP
  • boards/ARDUINO_PORTENTA_H7: enable OpenAMP
  • mboot: add support for a raw filesystem
  • boards/LEGO_HUB_NO6: move robust logic to mboot
  • boards/LEGO_HUB_NO6: use a raw filesystem for mboot to update fw
  • stm32.mk: enable _Float16 support on MCUs with hardware floats
  • boards/ARDUINO_GIGA: add Arduino's external library
  • boards/ARDUINO_NICLA_VISION: add Arduino's external library
  • boards/ARDUINO_PORTENTA_H7: add Arduino's external library
  • README: update list of supported STM32 series
  • set the security mode for the default WiFi AP
  • mpremoteprocport: use metal logging functions
  • boards/LEGO_HUB_NO6: write key after writing elements
  • boards/LEGO_HUB_NO7: add robust update logic to mboot
  • flash: fix writing final words to flash on H5 and H7 MCUs
  • mboot: buffer the correct amount of bytes for a flash write
  • i2c: fix clock enable for I2C4 on STM32F7 MCUs
  • pyb_can: fix STM32G4 FDCAN source clock frequency

unix port:

  • variants: prefer unix-ffi packages when loading the manifest
  • input: flush the prompt after writing it to stdout
  • don't include system headers when features are disabled
  • variants: don't use native _Float16 type

webassembly port:

  • Makefile: remove --memory-init-file from linker options
  • include lib in sys.path
  • move MP_JS_EPOCH init to library postset
  • implement MICROPY_PY_RANDOM_SEED_INIT_FUNC
  • enable time localtime, gmtime, time, time_ns
  • use POSIX write for output and add stderr
  • add support for enabling MICROPY_GC_SPLIT_HEAP_AUTO
  • clean up Makefile and add variant support
  • add JavaScript proxying, and js and jsffi modules
  • implement runPythonAsync() for top-level async code
  • implement runCLI() for a Node-based CLI
  • implement replInit() and replProcessChar()
  • variants/pyscript: add pyscript variant
  • update README.md to describe latest changes
  • library: fix formatting and style for Biome
  • proxy_c: ensure return value of async fun is passed to JS
  • proxy_js: promote Python thenable to a Promise
  • proxy_js: allow a Python proxy of a function to be undone
  • api: fix waiting for Emscripten module to be loaded
  • api: allocate code data on C heap when running Python code
  • objjsproxy: fix handling of thrown value into JS generator
  • proxy_c: fix proxy then reject handling
  • proxy_c: fix then-continue to convert reason to throw value
  • modjsffi: add jsffi.async_timeout_ms
  • add JavaScript-based asyncio support
  • api: inject asyncio.run if needed by the script
  • api: fix importing micropython.mjs module from node REPL
  • proxy_c: reject promises with a PythonError instance
  • proxy_c: only proxy across resolve/reject funs when needed
  • objjsproxy: fix proxying in arguments to JS new function
  • objpyproxy: implement JS iterator protocol for Py iterables
  • api: resolve thenables returned from runPythonAsync
  • proxy_c: support more than 4 args when JS calls Py func
  • asyncio: fix case where a Promise is resolved with no arg
  • proxy_c: ensure objs thrown into generators are exceptions
  • proxy_js: convert JS undefined and JS null to Py None
  • mpconfigport: enable importing of .mpy files
  • proxy_js: revert back to converting Py None to JS null
  • proxy_js: create a special "undefined" type for Python
  • proxy_c: return undefined if dict lookup failed on JS side
  • objjsproxy: make jsproxy_it keep ref to jsproxy
  • proxy_c: don't return value of a void function
  • track the current depth of calls to external C functions
  • set GC threshold and do top-level GC collect when possible
  • add C-level finaliser to JsProxy object
  • register PyProxy objects for JS-side finalisation
  • modjsffi: add mem_info function to get detailed stats

windows port:

  • windows_mphal: fix mp_hal_delay_ms() so it runs events
  • Makefile: fix float exact int formatting on 32-bit mingw

zephyr port: no changes specific to this component/port