tag:github.com,2008:https://github.com/esp-arduino-libs/esp_brookesia_micropython/releasesTags from esp_brookesia_micropython2024-05-31T06:35:27Ztag:github.com,2008:Repository/878361717/v1.24.0-preview2024-05-31T06:35:27Zv1.24.0-preview: all: Bump version to 1.24.0-preview.<p>all: Bump version to 1.24.0-preview.</p>
<p>Signed-off-by: Damien George <damien@micropython.org></p>dpgeorgetag:github.com,2008:Repository/878361717/v1.23.02024-05-31T04:20:11Zv1.23.0<p>Dynamic USB devices, revamped webassembly port, openamp, tls, vfs mod…</p>
<p>…ules</p>
<p>This release of MicroPython adds support for dynamic USB devices defined in
<br />Python, adds new `openamp`, `tls` and `vfs` modules, completely revamps the
<br />webassembly port to add proxying between JavaScript and Python, and
<br />implements significant code size optimisations for frozen modules. There
<br />are also many other enhancements and bug fixes. Keep reading for a more
<br />detailed summary of the main changes.</p>
<p>After a lot of design, development and testing, MicroPython now has full
<br />support for user-defined USB devices. The interface is via a new
<br />`machine.USBDevice` class, and this allows the user to specify the USB
<br />descriptors and implement Python callbacks for USB endpoint transfers.
<br />With this, any USB device can be implemented in pure Python. While the
<br />`machine.USBDevice` interface is low-level and complete, there is a
<br />higher-level USB library in `micropython-lib` that allows easier
<br />implementation of devices, with examples for keyboard, mouse, MIDI and
<br />serial CDC. This feature is currently available on rp2 and samd ports, and
<br />other ports will follow in the future.</p>
<p>Support for the OpenAMP (asymmetric multiprocessing) protocol has been
<br />added through the new `openamp` module. This allows MicroPython to control
<br />other CPU cores in the system, to load and start processes and communicate
<br />with them through endpoints. This feature is currently available on the
<br />mimxrt and stm32 ports.</p>
<p>Two other new modules have been added: `vfs` and `tls`. The `vfs` module
<br />contains all VFS (virtual filesystem) related functions and classes, such
<br />as `mount`, `umount` and `VfsFat`. These were originally in the `os`
<br />module but having them there is not compatible with CPython, so they have
<br />been moved to their own dedicated module. They still exist in the `os`
<br />module for now but will eventually be removed from there, so it's
<br />recommended to start using the `vfs` module from now on. Similarly the new
<br />`tls` module is an evolution of the `ssl` module, whereby all the existing
<br />functionality in `ssl` has been moved to the `tls` module. This is done
<br />because MicroPython's SSL interface is becoming increasingly different to
<br />CPython's and moving this SSL/TLS functionality to a new `tls` module gives
<br />it room to grow and obtain new features that are useful for embedded
<br />applications. And compatibility with normal Python is still retained via a
<br />pure Python implementation of the `ssl` module. One new feature in the new
<br />`tls` module is the ability to register a certificate verification
<br />callback.</p>
<p>Other additions include more methods on the `deque` object so it is
<br />doubly-ended and supports iteration, and support for half-float 'e' format
<br />in `struct.pack`/`struct.unpack`. Dynamic native modules have had some
<br />additional runtime methods exposed, and the .mpy sub-version has been
<br />increased from v6.2 to v6.3 (native code in .mpy files will need to be
<br />recompiled, but bytecode does not and is still compatible).</p>
<p>There has also been significant code size optimisations for frozen modules.
<br />A new internal `mp_proto_fun_t` type has been defined which allows the
<br />common case of bytecode functions (as opposed to native code) to be stored
<br />in frozen code without any additional overhead of the `mp_raw_code_t`
<br />descriptor structure. All firmware builds using frozen modules will see a
<br />significant decrease in size. Code size has also improved further for very
<br />small targets by adding an option to remove the qstr hash bytes.</p>
<p>Internally in the source code the "STATIC" macro definition has been
<br />removed. Code should now just use "static" instead. If you have C/C++
<br />code that uses "STATIC" then either replace it with "static", or provide
<br />your own #define to define "STATIC" as "static". See commit
<br /><a class="commit-link" href="https://github.com/esp-arduino-libs/esp_brookesia_micropython/commit/decf8e6a8bb940d5829ca3296790631fcece7b21"><tt>decf8e6</tt></a> for details.</p>
<p>Mbedtls has been updated to version 3.5.1. And network interface
<br />constants, such as `IF_STA` and `SEC_WPA2`, have now been consolidated
<br />across ports so they all live at the `WLAN` class level, for example
<br />`network.WLAN.SEC_WPA2` (existing constants at the `network` module level
<br />have been retained for backwards compatibility, but the new ones should be
<br />preferred from now on).</p>
<p>The esp32 port has seen some important bug fixes in the BLE component, to
<br />deinitialise without crashing, and increase the BLE task stack size. This
<br />port also uses the new I2S IDF driver, and supports IDF 5.0.5 and 5.2.
<br />There is support to enter the bootloader via `machine.bootloader()` and a
<br />new `esp32.mcu_temperature()`, for ESP32-C3/S2/S3 devices.</p>
<p>The rp2 port has added the new `machine.USBDevice` dynamic USB driver, and
<br />has had firmware performance optimisations applied to critical parts of the
<br />runtime and VM, giving about a 10% performance boost. There is now direct
<br />memory access to PIO and SPI FIFOs via proxy arrays, and bugs have been
<br />fixed with threads, lightsleep and UART IRQ latency.</p>
<p>The stm32 port has integrated support for the new `openamp` module, which
<br />is enabled on all Arduino boards. And firmware for Arduino boards now
<br />freeze in additional Arduino-specific library code. There have been fixes
<br />for internal flash writes on STM32H5 and STM32H7 MCUs (bank selection and
<br />flashing of the last word in a buffer), an important fix to a SPI DMA
<br />caching bug, an I2C clock enable fix for I2C4 on STM32F7 MCUs, and a fix
<br />for the FDCAN source clock frequency on STM32G4 MCUs. Mboot has added
<br />support for a new raw filesystem, to allow simpler and more robust firmware
<br />updates.</p>
<p>The webassembly port has seen a significant overhaul in its structure, and
<br />is now built as a JavaScript .mjs module that exports a user-friendly
<br />JavaScript-level API which is inspired by the API provided by Pyodide
<br />(which is a version of CPython that runs in the browser). This change is
<br />motivated by the need to use MicroPython as an engine within Pyscript,
<br />which is a platform for Python in the browser. New features in the
<br />webassembly port include proxying of objects between Python and JavaScript,
<br />a `js` module to interface with the JavaScript namespace, a `jsffi` module
<br />for miscellaneous proxy helpers, top-level async code, JavaScript driven
<br />asyncio support, automatic growing of the Python heap, integration of
<br />JavaScript and Python finalisation for global memory management, more
<br />`time` module functions, and support for build variants (following the unix
<br />port).</p>
<p>The change in code size since the previous release for various ports is
<br />(absolute and percentage change in the text section):</p>
<p> bare-arm: -220 -0.383%
<br /> minimal x86: -341 -0.184%
<br /> unix x64: +20168 +2.527%
<br /> stm32: -1692 -0.430%
<br /> cc3200: +256 +0.139%
<br /> esp8266: -8880 -1.260%
<br /> esp32: -3328 -0.194%
<br /> mimxrt: -408 -0.112%
<br /> renesas-ra: -464 -0.074%
<br /> nrf: -640 -0.341%
<br /> rp2: +5380 +1.626%
<br /> samd: +3224 +1.229%</p>
<p>The leading causes of these changes in code size are:
<br />- bare-arm, minimal: disabling qstr hashing
<br />- unix: updating mbedtls to version 3.5.1
<br />- stm32: optimising size of frozen modules
<br />- cc3200: addition of new `vfs` module, and bug fixes in the VM and array
<br /> type
<br />- esp8266: disabling unused `MICROPY_DEBUG_PRINTERS` and optimising frozen
<br /> modules
<br />- esp32, mimxrt, renesas-ra, nrf: optimising frozen modules
<br />- rp2: addition of `machine.USBDevice`, enabling -O2 optimisations
<br />- samd: addition of `machine.USBDevice`</p>
<p>Performance is effectively unchanged since the previous release on all
<br />ports, except the rp2 port which sees a performance improvement of roughly
<br />10%.</p>
<p>Thanks to everyone who contributed to this release: Amirreza Hamzavi,
<br />Andrew Leech, Angus Gratton, Brian Pugh, Carlosgg, Christian Walther,
<br />Damien George, Daniël van de Giessen, darc, Dash Peters, David Lechner,
<br />Felix Dörre, iabdalkader, IhorNehrutsa, Iksas, J. Neuschäfer, Jared
<br />Hancock, Jim Lipsey, Jim Mussared, Jochen Sprickerhof, Joey232, Jos
<br />Verlinde, Kwabena W. Agyeman, Maarten van der Schrieck, Matt Trentini,
<br />Matthias Urlichs, Michiel W. Beijen, MikeTeachman, Nicko van Someren,
<br />Olivier Lenoir, Phil Howard, Rick Sorensen, robert-hh, Sebastian Romero,
<br />Simon Wood, Stanislav Ponomarev, stijn, Takeo Takahashi, Trent Piepho,
<br />Trent Warlaven, Vonasmic, YAMAMOTO Takashi, Yoctopuce.</p>
<p>MicroPython is a global Open Source project, and contributions were made
<br />from the following timezones: -0800, -0700, -0600, -0500, -0300, +0000,
<br />+0100, +0200, +0330, +0400, +0900, +1000, +1100.</p>
<p>The work done in this release was funded in part through GitHub Sponsors,
<br />and in part by George Robotics, Espressif, Anaconda, Arduino, LEGO
<br />Education, OpenMV and Planet Innovation.</p>
<p>What follows is a detailed list of all changes, generated from the git
<br />commit history, and organised into sections.</p>
<p>Main components
<br />===============</p>
<p>all:
<br />- fix "reuse" and "overridden" spelling mistakes
<br />- update bindings, ports and tests for mbedtls v3.5.1
<br />- use mp_obj_malloc_with_finaliser everywhere it's applicable
<br />- remove the "STATIC" macro and just use "static" instead
<br />- prune trailing whitespace
<br />- update extmod, ports, examples to build with new berkeley-db lib
<br />- add pre-commit hook for codespell
<br />- update copyright year range to include 2024
<br />- ISSUE_TEMPLATE: convert issue templates to forms</p>
<p>py core:
<br />- py.mk: remove extra build dir created for frozen_content
<br />- qstr: add support for MICROPY_QSTR_BYTES_IN_HASH=0
<br />- mpconfig: disable qstr hashing at minimum feature level
<br />- builtinimport: simplify calls to stat_path()
<br />- compile: fix potential Py-stack overflow in try-finally with return
<br />- emitglue: reorder and resize members of mp_raw_code_t
<br />- emitglue: provide a truncated mp_raw_code_t for non-asm code
<br />- emitglue: simplify mp_raw_code_t's kind and scope_flags members
<br />- emitglue: introduce mp_proto_fun_t as a more general mp_raw_code_t
<br />- emitglue: include fun_data_len in mp_raw_code_t only when saving
<br />- makeversionhdr.py: reinstate MICROPY_GIT_HASH in mpversion.h
<br />- obj: change sizeof to offsetof in mp_obj_malloc_var macro
<br />- obj: introduce mp_obj_malloc_with_finaliser to allocate and set type
<br />- misc: remove m_new_obj[_var]_with_finaliser macros
<br />- objfun: make mp_obj_new_fun_native/mp_obj_new_fun_asm static-inline
<br />- objfun: split viper fun type out to separate mp_type_fun_viper type
<br />- emitnative: simplify layout and loading of native function prelude
<br />- objfun: support __name__ on native functions and generators
<br />- objfun: inline mp_obj_code_get_name() into mp_obj_fun_get_name()
<br />- emitglue: remove n_pos_args from DEBUG_printf
<br />- builtinevex: fix setting globals for native functions in compile()
<br />- compile: remove TODO about name mangling
<br />- emitglue: make mp_emit_glue_assign_native's fun_data arg a const ptr
<br />- mpconfig: change the default enable level for the vfs module
<br />- emitbc: remove call to adjust Python stack by 0 entries
<br />- mpstate: don't declare mp_thread_get_state()
<br />- modthread: move thread state initialisation to shared function
<br />- emitglue: add explicit cast of proto_fun to uint8_t pointer
<br />- objstr: add a macro to define a bytes object at compile time
<br />- stream: add mp_stream_seek() helper function
<br />- stream: factor stream implementations
<br />- objdeque: expand implementation to be doubly-ended and support iter
<br />- asm: add ASM_NOT_REG and ASM_NEG_REG macros for unary ops
<br />- asmxtensa: optimise asm_xtensa_mov_reg_i32_optimised() for tiny ints
<br />- emitnative: implement viper unary ops positive, negative and invert
<br />- binary: support half-float 'e' format in struct pack/unpack
<br />- parse: zero out dangling parse tree pointer to fix potential GC leak
<br />- compile: add option to allow compiling top-level await
<br />- nlr: add "memory" to asm clobbers list in nlr_jump
<br />- makeqstrdata.py: ensure that scope names get low qstr values
<br />- dynruntime: add mp_binary_get_size/get_val_array/set_val_array
<br />- persistentcode: bump .mpy sub-version to 6.3
<br />- objfun: fix C++ compatibility with casting in inline functions
<br />- obj: fix initialiser order in MP_DEFINE_CONST_OBJ_TYPE_NARGS_ macros
<br />- objarray: fix use-after-free if extending a bytearray from itself
<br />- nlrthumb: make non-Thumb2 long-jump workaround opt-in
<br />- dynruntime: add mp_obj_exception_init function to create C exception
<br />- dynruntime: export mp_load_method_maybe and mp_arg_parse_all* funcs</p>
<p>extmod:
<br />- extmod.mk: disable uninitialized warnings in kf_rem_pio2.c
<br />- asyncio: support gather of tasks that finish early
<br />- modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers
<br />- modssl_axtls: add SSLContext.load_cert_chain()
<br />- modtls: move the native ssl module to tls
<br />- modtls_mbedtls: implement cert verification callback for mbedtls
<br />- modvfs: add new "vfs" module with mount/umount and Vfs classes
<br />- btstack: reset pending_value_handle before calling write-done cb
<br />- btstack: reset pending_value_handle before calling read-done cb
<br />- modrandom: add integer type casts where appropriate
<br />- modlwip: support IPv6
<br />- network_wiznet5k: adjust IP types for IPv6
<br />- vfs_posix_file: ensure file object has safe default fd
<br />- modmachine: remove MICROPY_PY_MACHINE guard from header
<br />- modwebsocket: fix websocket to send correct close frame
<br />- modlwip: add back support for empty IP addresses
<br />- asyncio: make current_task raise exception when there is no task
<br />- nimble: override configuration options set in nimble_port_init
<br />- nimble: enable key distribution to support bonding
<br />- network_ninaw10: activate the NIC on demand
<br />- network_ninaw10: set the proper security mode if none provided
<br />- network_ninaw10: fix error messages
<br />- modmachine: add MICROPY_PY_MACHINE_SIGNAL configuration option
<br />- modmachine: add MICROPY_PY_MACHINE_MEMX configuration option
<br />- modmachine: add MICROPY_PY_MACHINE_RESET configuration option
<br />- nimble: check for active before setting address mode
<br />- machine_usb_device: add support for Python USB devices
<br />- libmetal: add MicroPython platform for libmetal
<br />- modopenamp: add new OpenAMP module
<br />- modopenamp_remoteproc: add new OpenAMP RemoteProc class
<br />- os_dupterm: handle exception properly when it occurs in parallel
<br />- modnetwork: implement IPv6 API to set and get NIC configuration
<br />- network_wiznet5k: properly enable interrupt signal on w5100s
<br />- add interface and security constants at WLAN class level
<br />- modtls_axtls: add verify_mode and CERT_NONE constant
<br />- modopenamp: set a default log handler for ports
<br />- modopenamp: use metal logging functions exclusively
<br />- modasyncio: make mp_asyncio_context variable public
<br />- network_wiznet5k: properly enable socket buffers for W5100(S)
<br />- modlwip: use Nagle algorithm and add support for TCP_NODELAY
<br />- modos: only sync FAT filesystems using disk_ioctl</p>
<p>shared:
<br />- timeutils: remove useless void-return
<br />- tinyusb: don't disconnect on soft reset unless USB was active
<br />- tinyusb: update some code comments for runtime USB
<br />- tinyusb: increase default string descr max length to 40 chars
<br />- tinyusb: fix dynamic USB control callbacks for wLength==0
<br />- tinyusb: stall the CDC IN endpoint while disconnecting</p>
<p>drivers:
<br />- dht: only build DHT driver if MICROPY_PY_MACHINE_PULSE enabled
<br />- memory: add IS25LPWP064D chip to list of external flash devices</p>
<p>mpy-cross: no changes specific to this component/port</p>
<p>lib:
<br />- cmsis: update to CMSIS 5.9.0
<br />- mbedtls: update to mbedtls v3.5.1
<br />- mbedtls_errors: update error list for latest mbedtls
<br />- micropython-lib: update submodule to latest
<br />- cyw43-driver: update driver to latest version v1.0.3
<br />- open-amp: add OpenAMP submodule
<br />- libmetal: add libmetal submodule
<br />- berkeley-db-1.xx: update submodule URL and version
<br />- arduino-lib: add Arduino's external library</p>
<p>Support components
<br />==================</p>
<p>docs:
<br />- samd/pinout: update pinout docs with fixed pin assignment
<br />- develop/porting: fix argument type of mp_lexer_new_from_file()
<br />- add note about position-only arguments in CPython vs MicroPython
<br />- library/ssl: change wrap_socket args keyfile/certfile to key/cert
<br />- library: move vfs functions and classes from os to vfs module docs
<br />- reference/micropython2_migration.rst: add info about os and vfs
<br />- use vfs module instead of os
<br />- library/sys.rst: document implementation.version.releaselevel
<br />- library/bluetooth: add note that ESP32 supports pairing/bonding
<br />- library/openamp: document the new openamp module
<br />- library/collections: update deque docs to describe new features
<br />- library/rp2.DMA: add documentation for rp2 DMA support
<br />- library/machine.RTC: add docs for RTC.memory() method
<br />- reference/mpyfiles: document change in .mpy sub-version
<br />- develop/optimizations: fix typo identified in issue 14391
<br />- esp32/quickref: add note about different ESP32 varieties
<br />- library/machine.USBDevice: update note about packages in mp-lib
<br />- reference: document how to mip install packages from GitLab
<br />- library/asyncio: document that ThreadSafeFlag now works on unix
<br />- update copyright year range to include 2024</p>
<p>examples:
<br />- embedding: add -fno-common to the sample compiler flags
<br />- natmod/framebuf: enable FrameBuffer.poly method
<br />- usb: add a very simple USBDevice example with host
<br />- usb: add a USBDevice example implementing the DFU protocol
<br />- network: rename SSL examples to start with https
<br />- network: add example of HTTPS client using non-blocking socket
<br />- usb: add README that points out the alternative usb modules
<br />- natmod/features4: create custom FactorialError as exc example
<br />- natmod/btree: make btree.open use mp_arg_parse_all for kwargs</p>
<p>tests:
<br />- run-tests.py: remove machine_mem.py test from skip list
<br />- thread: adjust thread tests so most are able to run on rp2 port
<br />- thread: add a test for accuracy of sleep within a thread
<br />- run-multitests.py: change to dir of test script when running it
<br />- multi_net: generate smaller certs with 2048-bit RSA
<br />- run-tests.py: add an option for running only the failed tests
<br />- run-tests.py: remove unneeded argument from run_feature_check()
<br />- run-tests.py: make repl test detection more correct
<br />- run-tests.py: fix path-based special test detection
<br />- extmod/machine_uart_tx.py: add a test for timing of UART.flush()
<br />- move port-specific test directories into tests/ports/ directory
<br />- ports/rp2: add rp2-specific tests with a test for rp2.DMA
<br />- extmod/machine_i2s_rate.py: test multiple I2S instances
<br />- extmod/asyncio_wait_task.py: add test for raise and delayed wait
<br />- extmod: remove asyncio .exp files that match CPython output
<br />- extmod/framebuf_polygon.py: replace sys.stdout.write with print
<br />- ports/rp2/rp2_dma.py: tweak test to be more reliable
<br />- use vfs module instead of os
<br />- multi_bluetooth/ble_irq_calls.py: enhance test to test recursion
<br />- ports/unix: add coverage test for frozen functions and generators
<br />- cpydiff: add new CPy diff test for class name mangling
<br />- multi_bluetooth: move ble_deepsleep to stress_deepsleep_reconnect
<br />- basics: split MicroPython-specific deque tests to separate file
<br />- float/float_struct_e.py: add specific test for struct 'e' type
<br />- run-tests.py: support running webassembly tests via node
<br />- ports/webassembly: add webassembly JS tests
<br />- net_inet: add simpler tls sites test, and skip existing on axtls
<br />- cpydiff: add a note about risk of resizing memoryview targets
<br />- micropython/import_mpy_invalid.py: skip if target cant import mpy
<br />- run-natmodtests.py: fix search for supported native tests
<br />- extmod: fix regex strings to be of r"" type
<br />- extmod: add .exp test files for asyncio.get_event_loop tests
<br />- basics: split out generator.throw tests that pass multiple args
<br />- net_hosted/ssl_verify_callback.py: make exp match actual output
<br />- net_inet/tls_text_errors.py: tweak test for newer CPython version
<br />- float: use "not" instead of ~ to invert bool value
<br />- basics: add .exp file for slice_op test
<br />- basics: move str/bytes tests that give SyntaxWarning to sep file</p>
<p>tools:
<br />- gen-changelog.sh: exclude "-preview" tags from generated log
<br />- mpremote: reduce dependency on importlib_metadata
<br />- manifestfile.py: change library search to use a list of paths
<br />- mpy-tool.py: fix static qstrs when freezing without qstr header
<br />- mpy-tool.py: skip generating frozen mp_raw_code_t when possible
<br />- manifestfile.py: add --unix-ffi option
<br />- ci.sh: add Arduino GIGA to stm32 CI build
<br />- mpy-tool.py: fix merging of more than 128 mpy files
<br />- ci.sh: update webassembly CI tests
<br />- manifestfile.py: fix freeze() when script is an empty iterable
<br />- mpremote: add support to mip install from GitLab
<br />- ci.sh: simplify selection of natmod tests to run</p>
<p>CI:
<br />- workflows: bump actions/cache from 3 to 4
<br />- workflows: run mimxrt and rp2 CI with space in repository path
<br />- workflows: move Windows CI from AppVeyor to GitHub Actions
<br />- workflows: bump setup-msbuild, setup-python, checkout versions
<br />- workflows: initialise micropython-lib submodule for windows CI
<br />- workflows: move codespell to a GitHub workflow, version it
<br />- workflows: add comments where tool versions need to be in sync
<br />- workflows: standardise formatting of ruff.yml
<br />- workflows: add Biome workflow for JavaScript formatting/linting
<br />- workflows: update coverage workflow to codecov-action@v4
<br />- workflows: run code size workflow on shared or port code changes</p>
<p>The ports
<br />=========</p>
<p>all ports:
<br />- move MICROPY_PY_LWIP_ENTER/REENTER/EXIT defns to mphalport.h
<br />- move MICROPY_INTERNAL_WFE definition to mphalport.h
<br />- fix handling of paths containing spaces in Makefiles
<br />- add LED pin aliases for all Arduino boards
<br />- use vfs module instead of os
<br />- on cold boot, enable USB after boot.py completes
<br />- don't include mpthread.h in mpthreadport.h</p>
<p>bare-arm port: no changes specific to this component/port</p>
<p>cc3200 port: no changes specific to this component/port</p>
<p>embed port:
<br />- fix alloca include for FreeBSD and NetBSD
<br />- improve stack top estimation</p>
<p>esp8266 port:
<br />- boards/ESP8266_GENERIC: disable MICROPY_DEBUG_PRINTERS
<br />- Makefile: add support for C++ user C modules
<br />- network_wlan: add interface and security WLAN constants</p>
<p>esp32 port:
<br />- modsocket: use all supplied arguments to socket.getaddrinfo()
<br />- boards/UM_FEATHERS3: use read_uv() for accurate battery voltage
<br />- network_ppp: make PPP support optional
<br />- mpnimbleport: release the GIL while doing NimBLE port deinit
<br />- increase NimBLE task stack size and overflow detection headroom
<br />- machine_i2c: fix build warnings when I2C is disabled
<br />- machine_hw_spi: combine argument parsing for constructor and init
<br />- boards: add missing named digital pins for Arduino Nano ESP32
<br />- machine_i2s: integrate new I2S IDF driver
<br />- add support for IDF version v5.0.5
<br />- add support for IDF version v5.2
<br />- add IDF-version-specific sdkconfig
<br />- mpconfigport: don't hang when machine.bootloader isn't supported
<br />- modmachine: support bootloader on ESP32-S2/S3/C2/C3
<br />- network_lan: add a separate argument to set PHY power pin
<br />- machine_uart: always configure timeout_char setting in init()
<br />- boards/ESP32_GENERIC_S3: add 4MiB partitioning board variant
<br />- workaround IDF issue placing ISR ringbuf functions in IRAM
<br />- main: check if main GC heap allocation failed
<br />- network_wlan: add interface and security WLAN constants
<br />- modesp32: add mcu_temperature() function for C3/S2/S3 devices
<br />- panichandler: print support information on panic
<br />- add support for TCP_NODELAY</p>
<p>mimxrt port:
<br />- mphalport: remove redundant NVIC/IRQ defines
<br />- mpbthciport: add missing extmod/modmachine.h header
<br />- boards: fix __VECTOR_TABLE link issue with CMSIS 5.9.0
<br />- modmachine: fix deepsleep wakeup pin ifdef
<br />- fix header include guard names
<br />- mpconfigport: enable cryptolib and hashlib md5
<br />- define the MICROPY_HW_ENABLE_USBDEV macro
<br />- set the security mode for the default WiFi AP
<br />- add support for OpenAMP</p>
<p>minimal port:
<br />- allow compiling on macOS
<br />- use printf instead of echo -e</p>
<p>nrf port:
<br />- modules/os/microbitfs: sweep the filesystem if any free chunk found
<br />- fix _start() build issue with CMSIS 5.9.0
<br />- boards: add named pins for Arduino Nano 33 BLE
<br />- boards: enable MICROPY_HW_ENABLE_USBDEV on boards with USB CDC
<br />- Makefile: allow external board definitions
<br />- modules/machine: enable code formatting
<br />- fix non-running LFCLK
<br />- modules/machine: catch exceptions from pin interrupts
<br />- modules/machine/pwm: tag a PWM device as used in the constructor
<br />- main: fix build of microbit when SD is enabled
<br />- Makefile: clean up dangling LIBS declaration
<br />- mpconfigport: enable MICROPY_NLR_THUMB_USE_LONG_JUMP on nRF51xx</p>
<p>pic16bit port: no changes specific to this component/port</p>
<p>powerpc port: no changes specific to this component/port</p>
<p>qemu-arm port:
<br />- mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES</p>
<p>renesas-ra port:
<br />- ra: fix SysTick clock source
<br />- ra: remove unnecessary min_delay() declaration
<br />- boards/ARDUINO_PORTENTA_C33: fix the RTC clock source
<br />- ra/ra_i2c: fix 1 byte and 2 bytes read issue
<br />- fix spelling mistakes found by codespell
<br />- boards: add named pins for Arduino Portenta C33
<br />- boards/ARDUINO_PORTENTA_C33: add Arduino's external library</p>
<p>rp2 port:
<br />- rp2_flash: lockout second core only when doing flash erase/write
<br />- mutex_extra: implement additional mutex functions
<br />- mpthreadport: fix race with IRQ when entering atomic section
<br />- rp2_dma: fix fetching 'write' buffers for writing not reading
<br />- provide direct memory access to PIO and SPI FIFOs via proxy arrays
<br />- machine_uart: fix event wait in uart.flush() and uart.read()
<br />- mpconfigport: allow MICROPY_PY_THREAD to be disabled by a board
<br />- mpthreadport: make result of thread.get_ident() a non-zero integer
<br />- machine_uart: fix potential race condition in interrupt handling
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: increase flash storage space
<br />- change machine.I2S and rp2.DMA to use shared DMA IRQ handlers
<br />- boards: add named digital pins for Arduino Nano RP2040 Connect
<br />- enable support for Python USB devices
<br />- CMakeLists: apply O2 optimisation to map, mpz and vm source code
<br />- modmachine: prevent lock-up when lightsleep() called within thread
<br />- README: fix typo, improve sentence about building with other boards
<br />- boards/W5500_EVB_PICO: update incorrect url in board.json</p>
<p>samd port:
<br />- remove the MICROPY_PY_MACHINE_RTC config option
<br />- mcu/samd21: reorganize and enable more firmware features
<br />- mcu: fix wrong EIC table entries in pin-af-table.csv
<br />- mpconfigport: simplify and consolidate config options
<br />- mcu/samd21: enable MICROPY_STACK_CHECK on SAMD21
<br />- enable support for Python USB devices
<br />- README: fix incorrect port directory name
<br />- boards: enable MICROPY_HW_DFLL_USB_SYNC on appropriate boards
<br />- mcu: update clock config after changes to USB
<br />- samd_spiflash: allow configuring the flash SPI baudrate
<br />- samd_qspiflash: avoid reading status byte 2 when not available
<br />- mcu: guard static function with appropriate #if</p>
<p>stm32 port:
<br />- mboot: improve detection of invalid flash erase/write
<br />- mboot: improve mass erase to erase all non-protected pages
<br />- flash: remove commented-out flash functions
<br />- flash: simplify sector calculation for homogeneous flash layout
<br />- flash: change flash_erase to only erase a single sector at a time
<br />- flashbdev: don't rely on flash sector id
<br />- flash: factor and simplify erase code
<br />- flash: fix sector and bank calculation for H5 and H7 MCUs
<br />- mboot/Makefile: revert change to BOARD_DIR that removed abspath
<br />- disable qstr hashing on small boards
<br />- boards/ARDUINO_PORTENTA_H7: add pin configuration for SPI1
<br />- modos: allow disabling MICROPY_PY_MACHINE_UART
<br />- spi: allow disabling MICROPY_PY_MACHINE_SPI
<br />- main: allow disabling MICROPY_PY_MACHINE
<br />- Makefile: ignore uninitialised variable warning in H5 HAL SD code
<br />- mboot: generate FLASH_LAYOUT_STR at runtime on H5 MCUs
<br />- mpbthciport: allow building with MICROPY_PY_MACHINE_UART disabled
<br />- sdram: support remapping FMC memory banks
<br />- network_lan: allow defining phy_addr in the LAN constructor
<br />- eth: remove redundant ETH clock enable code
<br />- network_lan: add the phy_type=x keyword option to network.LAN()
<br />- simplify D-cache clean and invalidate macros
<br />- mpu: rename MPU_CONFIG_DISABLE to MPU_CONFIG_NOACCESS
<br />- dma: add D-cache protection for DMA RX operations, including SPI
<br />- add support for dual-analog-pad "_C" pins on H7 MCUs
<br />- boards: add named digital and analog pins for Arduino boardrs
<br />- sdram: fix MPU config to use MPU_CONFIG_NOACCESS
<br />- mpu: add MPU config for shared, uncached memory region
<br />- implement port backend for libmetal
<br />- implement port backend for OpenAMP's remoteproc
<br />- boards/ARDUINO_GIGA: enable OpenAMP
<br />- boards/ARDUINO_NICLA_VISION: enable OpenAMP
<br />- boards/ARDUINO_PORTENTA_H7: enable OpenAMP
<br />- mboot: add support for a raw filesystem
<br />- boards/LEGO_HUB_NO6: move robust logic to mboot
<br />- boards/LEGO_HUB_NO6: use a raw filesystem for mboot to update fw
<br />- stm32.mk: enable _Float16 support on MCUs with hardware floats
<br />- boards/ARDUINO_GIGA: add Arduino's external library
<br />- boards/ARDUINO_NICLA_VISION: add Arduino's external library
<br />- boards/ARDUINO_PORTENTA_H7: add Arduino's external library
<br />- README: update list of supported STM32 series
<br />- set the security mode for the default WiFi AP
<br />- mpremoteprocport: use metal logging functions
<br />- boards/LEGO_HUB_NO6: write key after writing elements
<br />- boards/LEGO_HUB_NO7: add robust update logic to mboot
<br />- flash: fix writing final words to flash on H5 and H7 MCUs
<br />- mboot: buffer the correct amount of bytes for a flash write
<br />- i2c: fix clock enable for I2C4 on STM32F7 MCUs
<br />- pyb_can: fix STM32G4 FDCAN source clock frequency</p>
<p>unix port:
<br />- variants: prefer unix-ffi packages when loading the manifest
<br />- input: flush the prompt after writing it to stdout
<br />- don't include system headers when features are disabled
<br />- variants: don't use native _Float16 type</p>
<p>webassembly port:
<br />- Makefile: remove --memory-init-file from linker options
<br />- include lib in sys.path
<br />- move MP_JS_EPOCH init to library postset
<br />- implement MICROPY_PY_RANDOM_SEED_INIT_FUNC
<br />- enable time localtime, gmtime, time, time_ns
<br />- use POSIX write for output and add stderr
<br />- add support for enabling MICROPY_GC_SPLIT_HEAP_AUTO
<br />- clean up Makefile and add variant support
<br />- add JavaScript proxying, and js and jsffi modules
<br />- implement runPythonAsync() for top-level async code
<br />- implement runCLI() for a Node-based CLI
<br />- implement replInit() and replProcessChar()
<br />- variants/pyscript: add pyscript variant
<br />- update README.md to describe latest changes
<br />- library: fix formatting and style for Biome
<br />- proxy_c: ensure return value of async fun is passed to JS
<br />- proxy_js: promote Python thenable to a Promise
<br />- proxy_js: allow a Python proxy of a function to be undone
<br />- api: fix waiting for Emscripten module to be loaded
<br />- api: allocate code data on C heap when running Python code
<br />- objjsproxy: fix handling of thrown value into JS generator
<br />- proxy_c: fix proxy then reject handling
<br />- proxy_c: fix then-continue to convert reason to throw value
<br />- modjsffi: add jsffi.async_timeout_ms
<br />- add JavaScript-based asyncio support
<br />- api: inject asyncio.run if needed by the script
<br />- api: fix importing micropython.mjs module from node REPL
<br />- proxy_c: reject promises with a PythonError instance
<br />- proxy_c: only proxy across resolve/reject funs when needed
<br />- objjsproxy: fix proxying in arguments to JS new function
<br />- objpyproxy: implement JS iterator protocol for Py iterables
<br />- api: resolve thenables returned from runPythonAsync
<br />- proxy_c: support more than 4 args when JS calls Py func
<br />- asyncio: fix case where a Promise is resolved with no arg
<br />- proxy_c: ensure objs thrown into generators are exceptions
<br />- proxy_js: convert JS undefined and JS null to Py None
<br />- mpconfigport: enable importing of .mpy files
<br />- proxy_js: revert back to converting Py None to JS null
<br />- proxy_js: create a special "undefined" type for Python
<br />- proxy_c: return undefined if dict lookup failed on JS side
<br />- objjsproxy: make jsproxy_it keep ref to jsproxy
<br />- proxy_c: don't return value of a void function
<br />- track the current depth of calls to external C functions
<br />- set GC threshold and do top-level GC collect when possible
<br />- add C-level finaliser to JsProxy object
<br />- register PyProxy objects for JS-side finalisation
<br />- modjsffi: add mem_info function to get detailed stats</p>
<p>windows port:
<br />- windows_mphal: fix mp_hal_delay_ms() so it runs events
<br />- Makefile: fix float exact int formatting on 32-bit mingw</p>
<p>zephyr port: no changes specific to this component/port</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.22.22024-02-20T12:20:36Zv1.22.2: Patch release for rp2 DMA, UART and BLE, esp32 BLE, renesas-ra I2C<p>Patch release for rp2 DMA, UART and BLE, esp32 BLE, renesas-ra I2C</p>
<p>This is a patch release containing the following commits:
<br />- py/compile: fix potential Py-stack overflow in try-finally with return
<br />- extmod/asyncio: support gather of tasks that finish early
<br />- extmod/modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers
<br />- extmod/btstack: reset pending_value_handle before calling write-done cb
<br />- extmod/btstack: reset pending_value_handle before calling read-done cb
<br />- esp32/mpnimbleport: release the GIL while doing NimBLE port deinit
<br />- esp32: increase NimBLE task stack size and overflow detection headroom
<br />- mimxrt/modmachine: fix deepsleep wakeup pin ifdef
<br />- renesas-ra/ra: fix SysTick clock source
<br />- renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock source
<br />- renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue
<br />- rp2/rp2_dma: fix fetching 'write' buffers for writing not reading
<br />- rp2/machine_uart: fix event wait in uart.flush() and uart.read()
<br />- rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ handlers</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.22.12024-01-05T02:13:56Zv1.22.1: Patch release for rp2 atomic mutex<p>Patch release for rp2 atomic mutex</p>
<p>This is a patch release to fix a race condition and potential deadlock in
<br />the rp2 port's mp_thread_begin_atomic_section() function, when the second
<br />core is in use.</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.23.0-preview2024-01-02T07:11:41Zv1.23.0-preview: all: Bump version to 1.23.0-preview.<p>all: Bump version to 1.23.0-preview.</p>
<p>Signed-off-by: Damien George <damien@micropython.org></p>dpgeorgetag:github.com,2008:Repository/878361717/v1.22.02023-12-27T06:00:39Zv1.22.0<p>SSL support in asyncio, sorted qstr pools, common machine module bind…</p>
<p>…ings</p>
<p>This release of MicroPython introduces SSL/TLS support to asyncio, for both
<br />the client and server sides. The interface matches CPython:
<br />`asyncio.open_connection()` and `asyncio.start_serve()` now both accept an
<br />`ssl` argument to supply an `SSLContext` object. As part of this, new
<br />methods were added to `SSLContext` to load certificates, and certificate
<br />date/time validation was enabled on all ports that use mbedTLS.</p>
<p>Qstr pools are now sorted, which provides a significant performance boost
<br />for `qstr_find_strn()`, which is called a lot during parsing and loading of
<br />.mpy files, as well as interning of string objects, which happens in most
<br />string methods that return new strings. The static pool (part of the .mpy
<br />ABI) isn't currently sorted, but could be in the future.</p>
<p>There have been many internal changes to the `machine` module (and on some
<br />ports the `os` module) to factor the Python bindings to a common location,
<br />reduce code duplication and make the API more consistent across all the
<br />ports. And a new `boardgen.py` script has been added to factor pin
<br />generation and enable a more consistent `machine.Pin` across ports. For
<br />consistency, the following user-facing changes have been made:</p>
<p>- cc3200 port: The `machine` module gains `soft_reset()`, `mem8`, `mem16`,
<br /> `mem32` and `Signal`; it loses `POWER_ON` (replaced by `PWRON_RESET`).
<br /> `disable_irq()` now returns an (opaque) integer rather than a bool, and
<br /> `enable_irq(state)` must be passed an argument which is the return value
<br /> of `disable_irq()`, rather than a bool. In the `os` module, `dupterm()`
<br /> has been converted to use the common implementation and has semantics the
<br /> same as other ports, and `uname()` is removed to save space (sys.version
<br /> and sys.implementation can be used instead).</p>
<p>- esp32 port: In the `machine` module, `lightsleep()` and `deepsleep()` no
<br /> longer take the `sleep` keyword argument, instead it's positional to
<br /> match other ports. Also, passing 0 here will now do a 0ms sleep instead
<br /> of acting like nothing was passed. And `reset_cause()` no longer accepts
<br /> any arguments (before it would just ignore them).</p>
<p>- esp8266 port: `machine.idle()` now returns None instead of the time
<br /> elapsed. The `machine.WDT()` constructor now takes keyword arguments,
<br /> and accepts the `timeout` argument but raises an exception if it's not
<br /> the default value (this port doesn't support changing the timeout).</p>
<p>- mimxrt port: `machine.freq()` now accepts an argument but raises
<br /> `NotImplementedError`, and `machine.lightsleep()` has been added but also
<br /> just raises `NotImplementedError` (this is to make these functions use an
<br /> implementation common to the other ports).</p>
<p>- nrf port: The `machine` module gains `unique_id()` (returns an empty
<br /> bytes object), `freq()` (raises `NotImplementedError`) and `Signal`.
<br /> `UART.sendbreak()` is removed, but this method previously did nothing.
<br /> The `os.dupterm()` function has changed to match the semantics used by
<br /> all other ports (except it's restricted to accept only `machine.UART`
<br /> objects).</p>
<p>- qemu-arm port: The `machine` module gains `soft_reset()` and `idle()`.</p>
<p>- samd port: The `machine.deepsleep()` function now resets after sleeping.</p>
<p>- unix port: Gains `machine.soft_reset()`.</p>
<p>- zephyr port: The `machine` module gains `soft_reset()`, `mem8`, `mem16`,
<br /> and `mem32`. The `UART` class gains the following methods: `init()`
<br /> which supports setting `timeout` and `timeout_char`, `deinit()` which
<br /> does nothing, `flush()` which raises `OSError(EINVAL)` because it's not
<br /> implemented, and `any()` and `txdone()` which both raise
<br /> `NotImplementedError`.</p>
<p>The teensy port has been removed in this release. This port was largely
<br />unmaintained, had limited features (the only hardware support was for GPIO
<br />and timer, and no `machine` module), and only supported a small number of
<br />Teensy boards.</p>
<p>A new preview versioning scheme has been introduced, whereby non-release
<br />builds are a preview of the next, upcoming release. This scheme is
<br />compatible with semver and should help to eliminate confusion matching
<br />documentation and firmware version numbers, among other things.</p>
<p>Black has been replaced with ruff format as the Python code formatter.
<br />This required a few small changes to Python code, and now allows linting
<br />and formatting with ruff.</p>
<p>Bound method instances now support comparison and hashing, matching CPython
<br />semantics. The .mpy sub-version has been updated from 6.1 to 6.2 due to a
<br />change in the native .mpy ABI. A new option `MICROPY_PREVIEW_VERSION_2`
<br />has been added which provides a way to enable features and changes slated
<br />for MicroPython 2.x, by running `make MICROPY_PREVIEW_VERSION_2=1`. This
<br />is an alternative to having a 2.x development branch, and any feature or
<br />change that needs to be "hidden" until 2.x will use this flag.</p>
<p>LittleFS has been updated to v2.8.1. The associated MicroPython VfsLfs2
<br />driver can read existing LFS2 filesystems, but any writes will update the
<br />filesystem to a newer LFS2 version that cannot be read by older drivers, so
<br />take this into account when updating, for example update mboot first.</p>
<p>The VFS sub-system has a new file ioctl to set the read-buffer size, which
<br />is used by mpremote to significantly increase performance of the
<br />"mpremote mount" feature. Manifest files now allow registering an external
<br />library path via `add_library(name, path)`. `sys.stdout.buffer.write()`
<br />now returns the actual number of bytes written (although this is
<br />complicated when output goes to multiple destinations).</p>
<p>The esp32 port has been updated to use IDF version 5.0.4, and the initial
<br />GC heap size tuned so that, after doubling the heap size, WiFi can still be
<br />started and an SSL connection made. `RMT.source_freq()` is now a class
<br />method, socket connect timeout has been implemented, RTC user memory is now
<br />preserved over most reset causes, and `hashlib.md5` enabled.</p>
<p>The mimxrt port has RTC alarm/wakeup functionality added, along with
<br />support for `machine.deepsleep()`.</p>
<p>The rp2 port sees the introduction of a new `rp2.DMA` class for control
<br />over DMA transfers. It has switched to use the same math library as other
<br />ports to get more accurate floating point behaviour, and enabled
<br />`os.dupterm_notify()` for WebREPL use. The TinyUSB stack is now scheduled
<br />to run from the IRQ handler (instead of polled in the VM) which slightly
<br />improves performance of the VM and USB. The port also makes better use of
<br />event scheduling and WFE to be more efficient. It also has added support
<br />for external ADC channels (for example when using the ninaw10 driver).</p>
<p>The stm32 port has improved support for STM32H5xx MCUs, including Ethernet
<br />support, frequency scaling with HSI, sleep mode and SD card support. The
<br />NUCLEO_WL55 board now freezes in the LoRa driver, the I2S driver has
<br />improved accuracy of the clock frequency, and mboot now supports Microsoft
<br />WCID to set the USB driver.</p>
<p>New boards added in this release are: UM_TINYWATCHS3 (esp32 port),
<br />POLOLU_3PI_2040_ROBOT, POLOLU_ZUMO_2040_ROBOT and SIL_RP2040_SHIM (rp2
<br />port), NUCLEO_H563ZI (stm32 port).</p>
<p>The change in code size since the previous release for various ports is
<br />(absolute and percentage change in the text section):</p>
<p> bare-arm: +216 +0.381%
<br /> minimal x86: +624 +0.340%
<br /> unix x64: +8283 +1.050%
<br /> stm32: +1368 +0.350%
<br /> cc3200: +1184 +0.649%
<br /> esp8266: +800 +0.114%
<br /> esp32: +35348 +2.100%
<br /> mimxrt: +2172 +0.602%
<br /> renesas-ra: +96 +0.015%
<br /> nrf: +1460 +0.785%
<br /> rp2: +6100 +1.880%
<br /> samd: +1476 +0.568%</p>
<p>The changes that dominate these numbers are:
<br />- bare-arm, minimal: comparing and hashing bound methods, sorted qstr pools
<br />- unix: updating LittleFS to 2.8.1, enabling certificate date/time
<br /> validation, adding SSLContext certificate methods, asyncio SSL support
<br />- stm32: sorted qstrs, updating LittleFS to 2.8.1, I2S clock frequency
<br /> improvements, asyncio SSL support
<br />- cc3200: sorted qstrs, more machine module functions, use of the common
<br /> `os.dupterm` implementation
<br />- esp32: switching ESP-IDF from 5.0.2 to 5.0.4
<br />- esp8266: updating LittleFS to 2.8.1
<br />- mimxrt: adding RTC alarm/wakeup functionality, updating LittleFS to
<br /> 2.8.1, asyncio SSL support
<br />- nrf: updating LittleFS to 2.8.1, enabling `machine.Signal`, asyncio SSL
<br /> support
<br />- rp2: using locally-provided math library, adding new `rp2.DMA` class
<br />- samd: sorted qstrs, updating LittleFS to 2.8.1, asyncio SSL support</p>
<p>With the new sorted qstr pools, performance is significantly improved for
<br />qstr-heavy operations, between +50% and +200% improvement. Other areas
<br />have their performance unchanged since the last release.</p>
<p>Thanks to everyone who contributed to this release: Alessandro Gatti,
<br />Andrew Leech, Angus Gratton, Carlosgg, Christian Walther, Damien George,
<br />Daniël van de Giessen, Elias Wimmer, Glenn Moloney, iabdalkader, Ihor
<br />Nehrutsa, Jeff Epler, Jim Mussared, Kwabena W. Agyeman, Maarten van der
<br />Schrieck, Mark Blakeney, Mathieu Serandour, Matthias Urlichs, MikeTeachman,
<br />Ned Konz, Nicko van Someren, Pascal Brunot, Patrick Van Oosterwijck, Paul
<br />Grayson, Peter Züger, Rene Straub, robert-hh, Scott Zhao, Sebastian Romero,
<br />Seon Rozenblum, stijn, Thomas Ackermann, Thomas Wenrich, ThomHPL, Trent
<br />Piepho.</p>
<p>Contributions were made from the following timezones: -0800, -0700, -0600,
<br />-0500, +0000, +0100, +0200, +1000, +1100.</p>
<p>The work done in this release was funded in part through GitHub Sponsors,
<br />and in part by George Robotics, Planet Innovation, Espressif, Arduino, LEGO
<br />Education and OpenMV.</p>
<p>What follows is a detailed list of changes, generated from the git commit
<br />history, and organised into sections.</p>
<p>Main components
<br />===============</p>
<p>all:
<br />- switch to new preview build versioning scheme
<br />- replace "black" with "ruff format"
<br />- update Python formatting to ruff-format</p>
<p>py core:
<br />- vm: don't emit warning when using "raise ... from None"
<br />- builtinevex: handle invalid filenames for execfile
<br />- objboundmeth: support comparing and hashing bound methods
<br />- objboundmeth: optimise check for types in binary_op
<br />- obj: generalise mp_get_buffer so it can raise if a flag is set
<br />- dynruntime: add mp_get_buffer
<br />- persistentcode: bump .mpy sub-version
<br />- modthread: initialise nlr_jump_callback_top on threads
<br />- makeqstrdefs.py: print a nicer error when preprocessing stage fails
<br />- mkrules.mk: add MICROPY_PREVIEW_VERSION_2
<br />- asm: remove unused asm helper macros
<br />- qstr: add support for sorted qstr pools
<br />- mkrules.mk: add rule for compiling auto-generated source files
<br />- runtime: remove declaration of function from inside function
<br />- lexer: change token position for new lines
<br />- misc: change sizeof to offsetof for variable-length alloc
<br />- qstr: special case qstr_find_strn for empty string
<br />- obj: fix mp_obj_is_type compilation with C++
<br />- objslice: validate that the argument to indices() is an integer
<br />- mkrules: add support for custom manifest variables
<br />- modbuiltins: share vstr_add_char's implementation of utf8 encoding
<br />- mphal: move configuration of ATOMIC_SECTION macros to mphal.h
<br />- add port-agnostic inline functions for event handling
<br />- modsys: implement optional sys.intern
<br />- mkrules.mk: list hash files as byproducts
<br />- makeqstrdefs.py: don't skip output for stale hash file
<br />- makeqstrdefs.py: stop generating temporary intermediate file
<br />- gc: improve calculation of new heap size in split-heap-auto mode
<br />- mkrules.mk: fix dependency file generation for compiler wrappers</p>
<p>extmod:
<br />- moductypes: validate that uctypes.struct addr argument is an int
<br />- asyncio: emit errors to stderr, not stdout
<br />- modframebuf: validate FrameBuffer bounds against input buffer
<br />- modframebuf: fix FrameBuffer get-buffer implementation
<br />- modframebuf: remove FrameBuffer1 from natmod build
<br />- vfs_posix: fix relative root path
<br />- vfs_posix: fix accidentally passing tests
<br />- vfs_posix: fix relative paths on non-root VFS
<br />- vfs_posix: fix getcwd() on non-root VFS
<br />- vfs_posix: additional tests for coverage of error cases
<br />- network_ninaw10: raise an error if nina_ioctl fails
<br />- machine_wdt: factor ports' WDT Python bindings to common code
<br />- machine_pwm: remove header file and move decls to .c file
<br />- machine_i2s: factor ports' I2S Python bindings to common code
<br />- machine_i2s: factor stream and ring-buf code
<br />- machine_i2s: factor I2S.shift method
<br />- machine_i2s: factor I2S.irq method
<br />- machine_i2s: factor print function
<br />- machine_i2s: factor init_helper argument parsing
<br />- machine_i2s: factor comments, some enums and macros
<br />- machine_adc: factor ports' ADC Python bindings to common code
<br />- machine_uart: factor ports' UART Python bindings to common code
<br />- modmachine: clean up decls of machine types to use common ones
<br />- modmachine: consolidate simple machine headers into modmachine.h
<br />- modmachine: consolidate mem, i2c and spi headers to modmachine.h
<br />- network_ninaw10: fix select flags handling in socket poll
<br />- remove empty utime_mphal.h file
<br />- machine_adc_block: factor esp32 ADCBlock bindings to common code
<br />- machine_i2c: do a fast poll during I2C.scan()
<br />- vfs_reader: add file ioctl to set read buffer size
<br />- modbluetooth: initialise nlr_jump_callback_top for IRQ handlers
<br />- vfs_posix_file: make standard file objects non-const
<br />- extmod.mk: allow enabling lwip loopback support
<br />- modmachine: make I2C/SPI defns available when soft impl enabled
<br />- modmachine: factor ports' machine module dict to common code
<br />- modmachine: provide common Python bindings for machine.idle()
<br />- modmachine: add MICROPY_PY_MACHINE_PIN_BASE option
<br />- modmachine: provide common Python bindings for bootloader()
<br />- modmachine: provide common bindings for 6 bare-metal functions
<br />- modmachine: provide common implementation of disable/enable_irq
<br />- mbedtls: enable certificate time/date validation by default
<br />- modnetwork: add deinit function to NIC protocol
<br />- network_ninaw10: switch to using soft-timer for polling
<br />- switch to use new event functions
<br />- add lists of libm/libm_dbl source files for ports to use
<br />- modssl_mbedtls: add SSLContext certificate methods
<br />- modssl_mbedtls: make SSLSocket.getpeercert() optional
<br />- modssl_mbedtls: fix parsing of ciphers in set_ciphers method
<br />- asyncio: add ssl support with SSLContext
<br />- modonewire: adopt Maxim recommended read timings
<br />- modonewire: improve write timings for better reliability
<br />- modos: factor os.dupterm_notify() function to common extmod code
<br />- os_dupterm: prevent recursive execution of mp_os_dupterm_rx_chr
<br />- asyncio: remove non-working Stream __aenter__/__aexit__ methods
<br />- modselect: handle growing the pollfds allocation correctly
<br />- modhashlib: support MD5 with mbedtls 3.x
<br />- os_dupterm: let mp_os_dupterm_tx_strn() return num bytes written
<br />- vfs_lfs: fix lfs cache_size calculation
<br />- nimble: do not set GAP device name after sync</p>
<p>shared:
<br />- libc/string0: don't deref args for n==0 case
<br />- tinyusb: schedule TinyUSB task function from dcd_event_handler
<br />- tinyusb: expose mp_usbd_task as a public function
<br />- tinyusb: add a helper for hex string conversion
<br />- runtime/softtimer: generalise soft_timer to work without SysTick</p>
<p>drivers:
<br />- ninaw10: add ioctl for reading analog pins
<br />- ninaw10: add support for external ADC channels</p>
<p>mpy-cross: no changes specific to this component/port</p>
<p>lib:
<br />- littlefs: update LittleFS to v2.8.1
<br />- uzlib: for matches of the same length, take the closest one
<br />- mbedtls_errors: update error list for latest esp32 mbedtls
<br />- micropython-lib: update submodule to latest</p>
<p>Support components
<br />==================</p>
<p>docs:
<br />- reference/mpyfiles: document change in .mpy sub-version
<br />- library/io: remove io.FileIO and io.TextIOWrapper
<br />- reference/micropython2_migration: add migration guide
<br />- mimxrt: change the examples which denote a Pin with a number
<br />- samd: fix the pinout for SAMD21 Itsy Bitsy Express M0
<br />- library/esp: correct the description of esp.osdebug()
<br />- esp32/quickref: add DAC example
<br />- library: document SSLContext cert methods and asyncio support</p>
<p>examples:
<br />- pins.py: remove this pins printing example</p>
<p>tests:
<br />- basics/boundmeth1.py: add tests for bound method equality/hash
<br />- perf_bench: add string/qstr/map tests
<br />- extmod/asyncio_as_uasyncio.py: fix qstr order dependency
<br />- net_hosted/asyncio_loopback.py: add loopback test
<br />- extmod/deflate_compress.py: add a test for optimal compression
<br />- float/inf_nan_arith.py: include -inf in argument combos
<br />- run-tests.py: skip Thumb2 tests if target doesn't support them
<br />- update SSL network tests to use SSLContext, and work on CPython</p>
<p>tools:
<br />- ci.sh: ensure enough commits are fetched for a common ancestor
<br />- boardgen.py: add initial implementation of a common make-pins.py
<br />- tinytest-codegen.py: externalise tests list
<br />- mpremote: add ioctl to specify large read buffer size
<br />- ci.sh: build ESP32_GENERIC-SPIRAM as part of esp32 CI
<br />- ci.sh: set `ulimit -n` for unix CI
<br />- manifestfile.py: add support for external libraries</p>
<p>CI:
<br />- workflows: pin ruff to 0.1.0 and change flags for new version
<br />- workflows: cache ESP-IDF checkout and installation
<br />- workflows: use build matrix for esp32 port
<br />- workflows: enable build matrix for stm32 port
<br />- workflows: enable ccache for esp32 build
<br />- workflows: bump actions/github-script from 6 to 7
<br />- workflows: bump actions/setup-python from 4 to 5
<br />- workflows: bump actions/upload-artifact from 3 to 4</p>
<p>The ports
<br />=========</p>
<p>all ports:
<br />- make all ports skip execution of main.py if boot.py fails
<br />- remove SRC_QSTR_AUTO_DEPS from all ports' Makefiles
<br />- standardise arguments and output for make-pins.py script
<br />- fix incorrect identifiers on Arduino boards
<br />- move definitions of ATOMIC_SECTION macros to mphalport.h
<br />- switch build to use common lib/libm list of source files
<br />- fix sys.stdout.buffer.write() return value</p>
<p>bare-arm port:
<br />- lib: add minimal strncmp implementation</p>
<p>cc3200 port:
<br />- boards/make-pins.py: don't generate qstrs
<br />- boards/make-pins.py: add a note about tools/boardgen.py
<br />- mods/modmachine: use common implementation of disable/enable_irq
<br />- convert dupterm to use common extmod implementation
<br />- convert os module to use extmod version
<br />- eliminate dependency on stm32's irq.h
<br />- application.mk: don't add stm32 to build include path</p>
<p>embed port: no changes specific to this component/port</p>
<p>esp8266 port:
<br />- rename MICROPY_ESPNOW to MICROPY_PY_ESPNOW
<br />- machine_spi: rename machine_hspi to machine_spi
<br />- esp_mphal: make atomic section more atomic
<br />- modmachine: use common implementation of disable/enable_irq
<br />- avoid including ep_mphal.h directly
<br />- update port to use new event functions</p>
<p>esp32 port:
<br />- rename MICROPY_ESPNOW to MICROPY_PY_ESPNOW
<br />- boards: update UM board image names for consistency
<br />- boards/UM_TINYWATCHS3: add new UM TinyWATCH S3 board
<br />- boards: update UM board settings to use custom PID/VID
<br />- network_ppp: allow building with IPv6 disabled
<br />- poll serial/JTAG for unread data to prevent blocking
<br />- mpconfigport: remove port-specific GAP name
<br />- machine_uart: add error checking for IDF API's
<br />- network_ppp: reduce PPP thread CPU usage
<br />- boards: disable ALPN support
<br />- network_lan: fix and simplify the code for ETH-SPI devices
<br />- network_lan: fix LAN.isconnected()
<br />- network_lan: register the hostname setting for Ethernet
<br />- modmachine: fix deepsleep() when previous sleep delay was set
<br />- boards: reduce size of D2WD and OTA firmware
<br />- use better build settings for ESP32-C3
<br />- mphalport: add function to wake main from separate FreeRTOS task
<br />- usb: wake main thread when USB receives data
<br />- machine_pin: make irq object a sub-field of pin object
<br />- esp32_rmt: change RMT.source_freq() to class method
<br />- esp32_rmt: add RMT.PULSE_MAX constant
<br />- modsocket: implement socket connect timeout
<br />- modsocket: try garbage collection if the socket limit is reached
<br />- boards/sdkconfig.base: fix increasing log level via esp.osdebug()
<br />- boards/ESP32_GENERIC: reduce size of D2WD variant to fit in flash
<br />- uart: preserve console UART clock, fix UART console with DFS
<br />- uart: make compatible with sclk type change in ESP-IDF 5.3
<br />- network_wlan: reduce RAM usage if SPIRAM fails to initialise
<br />- network_wlan: fix network.WLAN.status() to return better info
<br />- esp32_rmt: fix RMT looping
<br />- enable mbedtls cert time validation
<br />- boards: enable further IRAM saving opts to fit ESP32-SPIRAM fw
<br />- machine_rtc: preserve RTC user memory over most reset causes
<br />- boards/UM_TINYPICO: fix typo in baudrate instructions
<br />- boards/sdkconfig.base: disable unused mbedtls options
<br />- machine_i2c: use APB_CLK_FREQ instead of I2C_APB_CLK_FREQ
<br />- modnetwork: add WiFi AUTH_WPA3_ENT_192 authenticate mode
<br />- machine_dac: support one-shot mode of driver
<br />- modmachine: fix deprecated esp_pm_config_XXX_t
<br />- machine_i2s: fix deprecated fields and constants
<br />- mpconfigport: keep some funcs out of IRAM for ESP32-SPIRAM builds
<br />- boards/ESP32_GENERIC: disable network.LAN and VM-opt on D2WD
<br />- change minimum supported IDF version to v5.0.4
<br />- re-enable custom mbedtls error string tables
<br />- add MICROPY_GC_INITIAL_HEAP_SIZE option and tune it
<br />- mpconfigport: enable MICROPY_PY_HASHLIB_MD5</p>
<p>mimxrt port:
<br />- led: fix LED init call from main, and simplify led_init
<br />- boards: define missing SNVS pins for all processors
<br />- machine_rtc: add RTC alarm/wakeup functionality
<br />- modmachine: add support for machine.deepsleep
<br />- boards/make-pins.py: update to use tools/boardgen.py
<br />- modmachine: fix settings for the MIMXRT1170 board
<br />- boards/OLIMEX_RT1010: adjust the UART pin assignment</p>
<p>minimal port: no changes specific to this component/port</p>
<p>nrf port:
<br />- boards: automatically configure MICROPY_PY_MACHINE_PWM
<br />- modules/machine: use SPI Python bindings provided by extmod
<br />- boards/make-pins.py: don't generate qstrs
<br />- boards/make-pins.py: add a note about tools/boardgen.py
<br />- use MICROPY_PY_MACHINE_SPI instead of MICROPY_PY_MACHINE_HW_SPI
<br />- use dupterm_objs[0] instead of board_stdio_uart
<br />- convert os module to use extmod version
<br />- mpconfigport: enable MICROPY_PY_MACHINE_BOOTLOADER
<br />- boards/ARDUINO_NANO_33_BLE_SENSE: don't enable MICROPY_MBFS
<br />- main: add /flash and /flash/lib to sys.path</p>
<p>pic16bit port: no changes specific to this component/port</p>
<p>powerpc port: no changes specific to this component/port</p>
<p>qemu-arm port: no changes specific to this component/port</p>
<p>renesas-ra port:
<br />- boards/make-pins.py: don't generate qstrs
<br />- boards/make-pins.py: update to use tools/boardgen.py
<br />- boards/ARDUINO_PORTENTA_C33: fix incorrect I2C pins
<br />- consolidate MICROPY_PY_MACHINE_I2C option</p>
<p>rp2 port:
<br />- cyw43_configport: use m_tracked_calloc and m_tracked_free
<br />- machine_adc: add support for external ADC channels
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: add external analog pins
<br />- boards/make-pins.py: don't generate qstrs
<br />- machine_uart: fix handling of serial break condition
<br />- machine_adc: refactor channel/pin validation code
<br />- remove 1ms timeout to make idle waiting tickless
<br />- change to use TinyUSB dcd_event_handler hook
<br />- mphalport: run TinyUSB stack while waiting for CDC input/output
<br />- integrate soft_timer using the alarm pool
<br />- mpbthciport: rework HCI polling timer to use soft_timer
<br />- mpnetworkport: rework lwIP polling to use soft_timer
<br />- mphalport: optimise exit of mp_hal_delay_ms loop
<br />- cyw43_configport: implement cyw43_delay_ms as mp_hal_delay_ms
<br />- switch to locally provided math library
<br />- switch rp2 and drivers to use new event functions
<br />- main: enable SEVONPEND CPU interrupt bit
<br />- mpconfigport: enable MICROPY_PY_OS_DUPTERM_NOTIFY
<br />- add new NO_DEFAULT_PINS config options for i2c, spi, and uart
<br />- boards: add support for Pololu 3pi+ and Zumo robots
<br />- boards: add SIL_RP2040_SHIM board by Silicognition LLC
<br />- rp2_dma: introduce a new rp2.DMA class for control over DMA xfers</p>
<p>samd port:
<br />- boards/make-pins.py: update to use tools/boardgen.py
<br />- mpconfigport: set MICROPY_USE_INTERNAL_ERRNO to 1
<br />- machine_uart: add machine_uart_set_baudrate() function
<br />- pin_af: fix a typo in a conditional compile
<br />- switch TinyUSB to run via a scheduled task
<br />- mphalport: run TinyUSB stack while waiting for CDC input/output
<br />- switch to shared TinyUSB implementation
<br />- use unique id for USB serial number</p>
<p>stm32 port:
<br />- boards/ARDUINO_GIGA: add QSPI fix/workaround to early init
<br />- boards/ARDUINO_GIGA: fix name of pins in board init
<br />- eth: add Ethernet support for H5 MCUs
<br />- boards/STM32H573I_DK: enable ETH and DAC peripherals
<br />- powerctrl: add support for frequency scaling with HSI on H5 MCUs
<br />- boards/make-pins.py: don't generate qstrs
<br />- boards: fix errors in pins.csv and af.csv
<br />- boards: format stm32 alternate function csv files
<br />- rename pin_obj_t to machine_pin_obj_t
<br />- boards/make-pins.py: update to use tools/boardgen.py
<br />- boards/make-pins.py: add initial support for H7 dual-pad pins
<br />- add configuration options for analog switches
<br />- add STM32H5 support for sleep mode
<br />- boards/make-pins.py: fix H7 ADC generation
<br />- boards/stm32f4x9_af.csv: fix DCMI_VSYNC
<br />- boards/stm32g474_af.csv: fix final row ADC column
<br />- boards/make-pins.py: only support ADC1-3
<br />- boards/NUCLEO_WL55: freeze LoRa driver
<br />- mpu: enable STM32WB mpu use to support qspi flash
<br />- add optional lwip loopback support
<br />- boards/NUCLEO_F446RE: add UARTs 1, 3 and 4
<br />- boards/NUCLEO_H563ZI: add new NUCLEO-H563ZI board definition
<br />- sdcard: add SD card support for H5 MCUs
<br />- boards/STM32H573I_DK: enable the SD card
<br />- add missing header include for debug builds
<br />- modmachine: only enable machine.I2C if hardware I2C is enabled
<br />- usbd_cdc_interface: include header to get machine_bootloader decl
<br />- machine_i2s: improve accuracy of SCK frequency
<br />- usbdev: optionally pass through vendor requests to Setup function
<br />- mboot: guard use of tx_pending with USE_USB_POLLING option
<br />- mboot: expand device descriptor to make it easier to understand
<br />- mboot: add support for Microsoft WCID</p>
<p>teensy port:
<br />- remove the teensy port</p>
<p>unix port:
<br />- mbedtls: enable mbedtls cert time validation
<br />- update port to use the new event functions</p>
<p>webassembly port: no changes specific to this component/port</p>
<p>windows port:
<br />- use the MicroPython logo as application icon
<br />- implement MICROPY_INTERNAL_WFE() macro</p>
<p>zephyr port: no changes specific to this component/port</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.22.0-preview2023-10-06T01:10:14Zv1.22.0-preview: all: Switch to new preview build versioning scheme.<p>all: Switch to new preview build versioning scheme.</p>
<p>See <a class="issue-link js-issue-link" href="https://github.com/micropython/micropython/issues/12127">micropython#12127</a> for details.</p>
<p>Previously at the point when a release is made, we update mpconfig.h
<br />and set a git tag. i.e. the version increments at the release.</p>
<p>Now the version increments immediately after the release. The workflow is:
<br />1. Final commit in the cycle updates mpconfig.h to set (X, Y, 0, 0) (i.e.
<br /> clear the pre-release state).
<br />2. This commit is tagged "vX.Y.0".
<br />3. First commit for the new cycle updates mpconfig.h to set (X, Y+1, 0, 1)
<br /> (i.e. increment the minor version, set the pre-release state).
<br />4. This commit is tagged "vX.Y+1.0-preview".</p>
<p>The idea is that a nightly build is actually a "preview" of the _next_
<br />release. i.e. any documentation describing the current release may not
<br />actually match the nightly build. So we use "preview" as our semver
<br />pre-release identifier.</p>
<p>Changes in this commit:
<br /> - Add MICROPY_VERSION_PRERELEASE to mpconfig.h to allow indicating that
<br /> this is not a release version.
<br /> - Remove unused MICROPY_VERSION integer.
<br /> - Append "-preview" to MICROPY_VERSION_STRING when the pre-release state
<br /> is set.
<br /> - Update py/makeversionhdr.py to no longer generate MICROPY_GIT_HASH.
<br /> - Remove the one place MICROPY_GIT_HASH was used (it can use
<br /> MICROPY_GIT_TAG instead).
<br /> - Update py/makeversionhdr.py to also understand
<br /> MICROPY_VERSION_PRERELEASE in mpconfig.h.
<br /> - Update py/makeversionhdr.py to convert the git-describe output into
<br /> semver-compatible "X.Y.Z-preview.N.gHASH".
<br /> - Update autobuild.sh to generate filenames using the new scheme.
<br /> - Update remove_old_firmware.py to match new scheme.
<br /> - Update mpremote's pyproject.toml to handle the "-preview" suffix in the
<br /> tag. setuptools_scm maps to this "rc0" to match PEP440.
<br /> - Fix docs heading where it incorrectly said "vvX.Y.Z" for release docs.</p>
<p>This work was funded through GitHub Sponsors.</p>
<p>Signed-off-by: Jim Mussared <jim.mussared@gmail.com></p>jimmotag:github.com,2008:Repository/878361717/v1.21.02023-10-05T23:33:14Zv1.21.0: U-module renaming, deflate module, IDF 5, board variants and Pico-W BLE<p>U-module renaming, deflate module, IDF 5, board variants and Pico-W BLE</p>
<p>This release of MicroPython sees the renaming of built-in modules to remove
<br />the u-prefix, a new deflate module with optional compression support, the
<br />introduction of board variants, switching of the esp32 port to use IDF 5
<br />together with improved heap management, support for BLE on RPi Pico W
<br />boards, and STM32H5xx support. The project is also now using codespell and
<br />ruff to improve code quality. New boards added in this release are:
<br />ARDUINO_NANO_ESP32 and UM_NANOS3 (esp32 port), ADAFRUIT_METRO_M7 (mimxrt
<br />port), ARDUINO_PORTENTA_C33 and VK_RA6M5 (renesas-ra port),
<br />ADAFRUIT_METRO_M4_EXPRESS (samd port), NUCLEO_L4A6ZG and STM32H573I_DK
<br />(stm32 port).</p>
<p>The renaming of built-in modules to remove the u-prefix -- for example
<br />utime becomes time, uasyncio becomes asyncio -- is done to improve
<br />compatibility with CPython and eliminate confusion about whether to import
<br />the u-version or the non-u-version of the name. Now, one should just
<br />always import the non-u-version and no longer think about u-naming. The
<br />only remaining module with a u-prefix is uctypes because it is not
<br />compatible with the CPython ctypes modules. The following modules are
<br />still available via their u-names for backwards compatibility: array,
<br />asyncio, binascii, bluetooth, collections, cryptolib, errno, hashlib,
<br />heapq, io, json, machine, os, platform, random, re, select, socket, ssl,
<br />struct, time, websocket. These modules (except for asyncio) are also
<br />extensible and can be overridden by a file with the same name, eg time.py.
<br />To force the import of a built-in, one must first clear (and subsequently
<br />restore) sys.path; the ability to write to the sys.path attribute has also
<br />been implemented in this release. For further information see the
<br />discussion at <a class="issue-link js-issue-link" href="https://github.com/micropython/micropython/issues/9018">micropython#9018</a>.</p>
<p>Furthermore, importing itself has been tweaked and optimised, and importing
<br />of built-ins no longer touch the filesystem, which makes a typical built-in
<br />import take ~0.15ms rather than 3-5ms. For modules that fail to import,
<br />they are now removed from sys.modules, allowing the import to be attempted
<br />again. This required adding "NLR jump callbacks" to efficiently run some
<br />code if an exception is raised.</p>
<p>Additional improvements to the core runtime include support for conversion
<br />specifiers in f-strings (e.g. !r), speeding up of incremental GC cycles by
<br />tracking the last used block, addition of a new MICROPY_GC_SPLIT_HEAP_AUTO
<br />"auto grow heap" mode and support for pad bytes in struct format. The
<br />documentation, examples and test have also seen general improvements and
<br />additions.</p>
<p>For the extended modules, the zlib C module has been removed and replaced
<br />with a new MicroPython-specific deflate module and DeflateIO class that is
<br />optimised to provide efficient streaming compression and decompression.
<br />The zlib (and gzip) modules are now implemented in pure Python on top of
<br />the deflate module. The timeq module has been removed, it existed only for
<br />a previous version of (u)asyncio and is no longer used. In the ssl
<br />module, SSLContext has been added to be more compatible with CPython. The
<br />select module now supports using system/POSIX poll when possible and the
<br />unix port now uses this implementation instead of its own one. That means
<br />the unix port can now select/poll on custom Python objects that implement
<br />the appropriate ioctl. The socket module now supports SO_BROADCAST, and
<br />sys.std*.buffer objects now exist on unix. There is also a new esp-hosted
<br />network driver for external ESP32-based network coprocessors.</p>
<p>mpy-cross now allows reading source files from stdin and writing compiled
<br />code to stdout.</p>
<p>The esp8266 and esp32 ports add support for the Espressif ESP-NOW protocol,
<br />and the ability to set/get the power saving mode of the WLAN hardware. The
<br />esp8266 port adds board-variant support, combining all boards into a single
<br />ESP8266_GENERIC with FLASH_512K, FLASH_1M and OTA variants.</p>
<p>The esp32 port has now switched exclusively to ESP-IDF 5, and all existing
<br />components have been updated to work with this new IDF (except
<br />esp32.hall_sensor() which has been removed). The FSM ULP has been enabled
<br />for S2 and S3 chips, sockets now support SO_BINDTODEVICE, and board-named
<br />pins and the Pin.board dict have been implemented. The MicroPython heap
<br />has been reworked on this port to support the large variety of memory
<br />configurations: it now starts at 64kbytes and automatically grows as
<br />needed, with new segments allocated from the IDF heap. This means that
<br />boards with SPIRAM have much faster GC collection times if only a small
<br />amount of RAM is used, all available RAM can be used if needed, and the IDF
<br />has access to enough RAM for things like SSL sockets. For more information
<br />see <a class="issue-link js-issue-link" href="https://github.com/micropython/micropython/pull/12141">micropython#12141</a>. The esp32 port
<br />has also had its generic boards consolidated and renamed to ESP32_GENERIC,
<br />ESP32_GENERIC_C3, ESP32_GENERIC_S2 and ESP32_GENERIC_S3, and some now have
<br />variants such as SPIRAM.</p>
<p>The mimxrt port has fixes and improvements to PWM and Pin.irq, as well as
<br />support for UART hardware flow control and UART.deinit. It has also seen
<br />integration of WiFi via the CYW43 driver, and Bluetooth via NimBLE. The
<br />mbedTLS bindings have enabled time validation of certificates.</p>
<p>The renesas-ra port has changed board names to match the product name,
<br />updated to use FSP v4.4.0, added support for: RA6M5 MCUs, machine PWM, DAC,
<br />RNG and SDCard classes, TinyUSB, Bluetooth via NimBLE, networking via lwIP,
<br />and mbedTLS.</p>
<p>Bluetooth support has also been added to the rp2 port for the Pico W board.
<br />And the RPi boards have been renamed from PICO to RPI_PICO, and PICO_W to
<br />RPI_PICO_W. Lightsleep has been fixed on this port so it works while WiFi
<br />is powered off, and time.time_ns() now has microsecond resolution.</p>
<p>The samd port sees the addition of SPI and QSPI flash drivers to support
<br />filesystems on external flash.</p>
<p>The stm32 port add support for STM32H5xx MCUs, basic support for the
<br />OCTOSPI peripheral, and USB support for STM32L1xx MCUs. New functions have
<br />been added to the stm module to support the sub-GHz radio on STM32WL55.</p>
<p>In micropython-lib, an extensive LoRa module has been added along with
<br />drivers for SX126x and SX127x chipsets, and the STM32WL55. This module
<br />supports both synchronous and asynchronous (asyncio) mode. Also, as part
<br />of the u-module renaming, urequests has been renamed to requests (but for
<br />backwards compatibility "import urequests" still works for now).</p>
<p>The change in code size since the previous release for various ports is
<br />(absolute and percentage change in the text section):</p>
<p> bare-arm: +192 +0.340%
<br /> minimal x86: +310 +0.169%
<br /> unix x64: +4784 +0.610%
<br /> stm32: -524 -0.134%
<br /> cc3200: +280 +0.154%
<br /> esp8266: +8016 +1.151%
<br /> esp32: +112133 +7.293%
<br /> mimxrt: +3624 +1.015%
<br /> renesas-ra: -2184 -0.348%
<br /> nrf: +616 +0.332%
<br /> rp2: +1920 +0.595%
<br /> samd: -7904 -2.953%</p>
<p>The changes that dominate these numbers are:
<br />- bare-arm, minimal, cc3200, nrf: NLR jump callbacks and support for
<br /> extensible modules
<br />- unix: update of mbedTLS to v2.28.1, support for polling Python objects in
<br /> select module
<br />- stm32: removal of the timeq module
<br />- esp8266: addition of the espnow module
<br />- esp32: switching to ESP-IDF 5
<br />- mimxrt: UART features, time validation of SSL certificates
<br />- renesas-ra: move to FSP v4.4.0, remove timeq module
<br />- rp2: machine.PWM enhancements
<br />- samd: drop support for VfsLfs1</p>
<p>Performance is effectively unchanged since the previous release.</p>
<p>Note that this is the last release to use the current versioning scheme for
<br />nightly/unstable builds, whereby a build between releases is versioned as
<br />v1.20.0-<num>-g<hash> (following the release of v1.20.0). Moving forward,
<br />nightly builds will now be called preview builds and be versioned with the
<br />next release number. For example, if the last release was v1.21.0 then
<br />preview releases will be of the form v1.22.0-preview.<num>.g<hash>. For
<br />discussion see <a class="issue-link js-issue-link" href="https://github.com/micropython/micropython/issues/12127">micropython#12127</a>.</p>
<p>Thanks to everyone who contributed to this release:
<br />Adam Green, Alexander Wilde, algonell, Andrew Leech, Andy Piper, Angus
<br />Gratton, Armin Brauns, brave ulysses, Brett Cannon, Brian 'redbeard'
<br />Harrington, Carlosgg, Chris Wilson, Christian Clauss, Damien George, Damien
<br />Tournoud, Daniël van de Giessen, David Grayson, David Lechner, David Yang,
<br />dotnfc, Duncan Lowther, Elecia White, elibdev, Elvis Pfutzenreuter, Felix
<br />Dörre, Francis Dela Cruz, Glenn Moloney, glenn20, iabdalkader, Ihor
<br />Nehrutsa, Jared Hancock, Jim Lipsey, Jim Mussared, Jon Nordby, Jonas
<br />Scharpf, Jos Verlinde, Kwabena W. Agyeman, Luca Burelli, marble, Mark
<br />Grosen, mbedNoobNinja, mcskatkat, Mingjie Shen, Mirko Vogt, Nicholas H.
<br />Tollervey, Oliver Joos, Ondrej Wisniewski, patrick, Peter Harper, Phil
<br />Howard, Philipp Ebensberger, Rene Straub, robert-hh, Sebastian Romero, Seon
<br />Rozenblum, stephanelsmith, stijn, Takeo Takahashi, Thomas, Tobias
<br />Thyrrestrup, UnexpectedMaker, Victor Rajewski, vsfos, Wang Xuancong, Wanlin
<br />Wang, Wilko Nienhaus, Wind-stormger, Yaroslav Halchenko, Yilin Sun, Yuuki
<br />NAGAO.</p>
<p>The work done in this release was funded in part through GitHub Sponsors,
<br />and in part by George Robotics, Planet Innovation, Espressif, Arduino, LEGO
<br />Education and OpenMV.</p>
<p>What follows is a detailed list of changes, generated from the git commit
<br />history, and organised into sections.</p>
<p>Main components
<br />===============</p>
<p>all:
<br />- fix spelling mistakes based on codespell check
<br />- fix strings with backslash by using raw string literals
<br />- fix various Python coding inconsistencies found by ruff
<br />- fix cases of Python variable assigned but never used
<br />- rename MP_QSTR_umodule to MP_QSTR_module everywhere
<br />- rename mp_umodule*, mp_module_umodule* to remove the "u" prefix
<br />- rename mod_umodule*, ^umodule* to remove the "u" prefix
<br />- rename UMODULE to MODULE in preprocessor/Makefile vars
<br />- rename *umodule*.h to remove the "u" prefix
<br />- rename *umodule*.c to remove the "u" prefix
<br />- use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins
<br />- replace all uses of umodule in Python code
<br />- remove the zlib module
<br />- remove query-variants make target
<br />- add missing imports for micropython.const
<br />- add Black configuration section to pyproject.toml
<br />- add ruff to pre-commit
<br />- CODECONVENTIONS: require that commits be signed-off by the author</p>
<p>py core:
<br />- ringbuf: implement put_bytes/get_bytes functions
<br />- parse: fix build when COMP_CONST_FOLDING=0 and COMP_MODULE_CONST=1
<br />- compile: remove over-eager optimisation of tuples as if condition
<br />- stackctrl: add gcc pragmas to ignore dangling-pointer warning
<br />- gc: make improvements to MICROPY_GC_HOOK_LOOP
<br />- obj: remove mp_generic_unary_op()
<br />- objslice: ensure slice is not hashable
<br />- objdict: fix __hash__ for dict_view types
<br />- objarray: disallow memoryview addition
<br />- objstr: return unsupported binop instead of raising TypeError
<br />- runtime: if inplace binop fails then try corresponding normal binop
<br />- change MP_UNARY_OP_INT to MP_UNARY_OP_INT_MAYBE
<br />- obj: accept user types in mp_obj_get_int_maybe
<br />- objint: allow int() to parse anything with the buffer protocol
<br />- builtinimport: handle empty sys.path correctly
<br />- builtinimport: optimise sub-package loading
<br />- builtinimport: allow builtin modules to be packages
<br />- objmodule: don't use sys.modules to track a builtin __init__
<br />- nlrsetjmp: use MP_NLR_JUMP_HEAD macro to simplify code
<br />- nlr: remove commented-out debugging code
<br />- nlr: implement jump callbacks
<br />- use nlr jump callbacks to optimise compile/execute functions
<br />- builtinimport: remove partially-loaded modules from sys.modules
<br />- builtinimport: remove weak links
<br />- makemoduledefs.py: add a way to register extensible built-in modules
<br />- objmodule: add a table of built-in modules with delegation
<br />- objmodule: workaround for MSVC with no module delegation
<br />- mpconfig: enable module delegation if sys needs it
<br />- modsys: allow sys.path to be assigned to
<br />- mkrules.mk: automatically configure frozen options when manifest set
<br />- parsenum: fix typo in #endif comment
<br />- nlraarch64: fix dangerous use of input register
<br />- makemoduledefs.py: fix declaring multiple module delegations
<br />- makemoduledefs.py: automatically declare delegation attr functions
<br />- lexer: allow conversion specifiers in f-strings (e.g. !r)
<br />- mkrules.mk: allow $(AFLAGS) to set flags to $(AS)
<br />- compile: fix async for's stack handling of iterator expression
<br />- builtinimport: fix built-in imports when external import is disabled
<br />- stream: add mp_stream___exit___obj that calls mp_stream_close
<br />- runtime: always initialise sched_state in mp_init
<br />- mpconfig: add MICROPY_PY_PLATFORM, enabled at extra features level
<br />- gc: speed up incremental GC cycles by tracking the last used block
<br />- gc: apply some code formatting cleanup
<br />- gc: add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode
<br />- profile: remove the requirement to disable MICROPY_COMP_CONST
<br />- mpconfig: enable SSL finalizers if finalizers are enabled
<br />- objstr: fix `str % {}` edge case
<br />- modstruct: support pad bytes in struct format
<br />- dynruntime.h: implement MP_OBJ_NEW_QSTR
<br />- modthread: return thread id from start_new_thread()
<br />- malloc: fix DEBUG_print() args in m_realloc_maybe
<br />- runtime: add helpers to call a general function on nlr jump callback
<br />- parse: always free lexer even if an exception is raised
<br />- persistentcode: always close reader even if an exception is raised
<br />- gc: add "max new split" value in result of gc.mem_free()
<br />- nlrx64: mark nlr_push() as naked function when possible
<br />- mkrules.mk: don't strip binary if STRIP variable is unset
<br />- change ifdef DEBUG_PRINT to if DEBUG_PRINT
<br />- lexer: add missing initialisation for fstring_args_idx</p>
<p>extmod:
<br />- utime_mphal: provide a general mktime function
<br />- modutime: provide a generic time module
<br />- machine_pwm: remove PWM_INIT and PWM_DUTY_U16_NS config options
<br />- network_cyw43: add power management constants
<br />- vfs_lfsx: fix offset used before range check
<br />- extmod.mk: suppress deprecated-non-prototype warning
<br />- moduos: move os.sync() into extmod/moduos.c
<br />- modtimeq: remove timeq module
<br />- btstack: add cmake support for BTstack
<br />- btstack: fix marking of static addresses in set_random_address
<br />- asyncio: rename uasyncio to asyncio
<br />- asyncio/uasyncio.py: add backwards-compatible uasyncio alias
<br />- modbinascii: fix buffer length error
<br />- update to support mbedtls 3.x
<br />- modplatform: set MICROPY_PLATFORM_ARCH on riscv platforms
<br />- modbtree: undefine queue macros before including berkeley-db
<br />- modssl: add SSLContext class
<br />- moddeflate: add deflate module providing the DeflateIO class
<br />- modssl_mbedtls: reference SSLContext from SSLSocket
<br />- vfs_posix_file: add poll support for missing ERR,HUP,NVAL values
<br />- modselect: abstract out a poll_set_t struct and functions
<br />- modselect: factor low-level polling code into common function
<br />- modselect: add optimisation to use system poll when possible
<br />- modselect: remove undocumented support for flags arg to poll
<br />- modssl_mbedtls: reject ioctls that are not supported
<br />- modssl_mbedtls: fix ioctl of a socket in closed/error state
<br />- modselect: properly track number of poll objects that are fd's
<br />- modssl_mbedtls: clear sock member if error creating SSLSocket
<br />- moddeflate: change default window size
<br />- vfs_posix_file: fix flush handling on macOS
<br />- vfs_posix_file: implement sys.std*.buffer objects
<br />- modlwip: add support for SO_BROADCAST socket option
<br />- modsocket: add support for SO_BROADCAST socket option
<br />- modssl_mbedtls: call func psa_crypto_init if PSA is used
<br />- modssl_mbedtls: ignore err ERR_SSL_RECEIVED_NEW_SESSION_TICKET
<br />- modlwip: fix setting of IP option SOF_BROADCAST
<br />- network_esp_hosted: add ESP-Hosted networking interface
<br />- modssl_axtls: only close underlying socket once if it was used
<br />- asyncio/event.py: fix ThreadSafeFlag.ioctl return
<br />- btstack/btstack_hci_uart: trigger a poll after UART data is sent
<br />- asyncio/stream.py: fix cancellation handling of start_server
<br />- modnetwork: increase max hostname length to 32
<br />- modnetwork: forward if.config(hostname) to network.hostname
<br />- vfs_posix_file: fix flush handling in msvc builds</p>
<p>shared:
<br />- upytesthelper: fix spelling of "default"
<br />- libc/printf: fix stdout destination for putchar and puts
<br />- tinyusb: avoid symbol clash on targets with external TinyUSB
<br />- tinyusb: support HS endpoint sizes
<br />- netutils/dhcpserver: reply on correct netif</p>
<p>drivers:
<br />- cyw43: make the CYW43 Bluetooth HCI driver more portable
<br />- esp-hosted: add host driver for ESP-Hosted firmware
<br />- ninaw10/nina_bt_hci: make some minor fixes to HCI driver
<br />- esp-hosted: fix pin IRQ
<br />- esp-hosted: fix MTU size
<br />- esp-hosted: add support for WiFI LED activity indicator</p>
<p>mpy-cross:
<br />- allow specifying source files starting with -
<br />- allow reading from stdin and writing to stdout
<br />- when reading from stdin, write output to stdout
<br />- allow specifying stdin as input without --
<br />- fix source file name in file-not-found error</p>
<p>lib:
<br />- mbedtls_errors: update error list for current version of mbedtls
<br />- mbedtls: update to mbedtls v2.28.1
<br />- mbedtls_errors: add esp32-specific mbedtls error file
<br />- mbedtls_errors: update patch and error list for new mbedtls
<br />- mbedtls: update to mbedtls v2.28.3
<br />- fsp: update FSP for renesas-ra to the latest version v4.4.0
<br />- cyw43-driver: update driver to latest version v1.0.1
<br />- btstack: update to v1.5.6.2
<br />- pico-sdk: update to version 1.5.1
<br />- stm32lib: update library for H5 v1.0.0
<br />- oofatfs: fix speculative read in create_name
<br />- uzlib: add memory-efficient, streaming LZ77 compression support
<br />- uzlib/lz77: always use separate history buffer
<br />- uzlib/defl_static: implement some code size improvements
<br />- uzlib: clean up tinf -> uzlib rename
<br />- uzlib: combine zlib/gzip header parsing to allow auto-detect
<br />- uzlib/tinflate: implement more compact lookup tables
<br />- uzlib/defl_static: optimize zlib_start/finish_block
<br />- uzlib: add a source_read_data var to pass to source_read_cb
<br />- tinyusb: update to the most recent master
<br />- protobuf-c: add protobuf-c library
<br />- cyw43-driver: update driver to latest version v1.0.2
<br />- micropython-lib: update submodule to latest</p>
<p>Support components
<br />==================</p>
<p>docs:
<br />- reference: remove double 'are' in glossary
<br />- update the PWM examples based on recent API improvements
<br />- samd: make use of pin names more consistent in examples
<br />- reference/mpyfiles: add release info on v6.1
<br />- library/espnow: update espnow docs for WLAN.config(pm=x) options
<br />- develop/porting: add missing code to example main.c and Makefile
<br />- reference/speed_python: remove 4-arg limit for viper
<br />- mimxrt: add the pin-out for the Adafruit Metro M7 board
<br />- samd: add the pin-out for the Adafruit Metro M4 Airlift board
<br />- library/index: update built-in extension docs
<br />- reference/packages: add GitHub repo to package example dependency
<br />- reference/mpremote.rst: extend the mpremote guide
<br />- library/index: update docs after umodule rename
<br />- rename uasyncio to asyncio
<br />- esp32: update esp32 docs based on IDF v5 changes
<br />- library/ssl: add documentation for SSLContext
<br />- esp32/quickref: add LAN example for WT32-ETH01 version 1.4
<br />- library/deflate: add docs for deflate.DeflateIO
<br />- develop/gettingstarted: clarify submodule initialization
<br />- develop/gettingstarted: update ARM package list
<br />- library/neopixel: change link to a micropython-lib reference
<br />- library/platform: add docs for the platform library
<br />- library/network: clarify network.hostname() behaviour
<br />- esp32/tutorial: add example for pin access via registers
<br />- library/esp32: update ESP32 idf_heap_info docs to match behaviour
<br />- library/gc: clarify mem_alloc and mem_free only for Python heap
<br />- conf.py: add sphinxcontrib.jquery to extensions
<br />- add requirements.txt file with dependencies for Sphinx
<br />- change remaining "urequests" references to "requests"</p>
<p>examples:
<br />- usercmodule: add a sub-package example
<br />- natmod: rename umodule to module
<br />- hwapi: rename uasyncio to asyncio
<br />- natmod/deflate: add deflate as a dynamic native module
<br />- mark asm, pio, etc. as noqa: F821 (undefined-name)
<br />- hwapi: add missing import for 96Boards Carbon example
<br />- bluetooth: raise ValueError when advertising data is too large
<br />- bluetooth: link to aioble in BLE examples
<br />- natmod: add features4 as a class definition example
<br />- unix/machine_bios.py: fix typo</p>
<p>tests:
<br />- run-tests.py: ensure correct cwd for mpy tests
<br />- basics: add more tests for hashing of various types
<br />- basics: remove __index__ and __inv__ from special methods tests
<br />- import/builtin_ext.py: add test for built-in module override
<br />- import/import_pkg9.py: add test for subpackage attribute
<br />- replace umodule with module everywhere
<br />- run-multitests.py: don't allow imports from the cwd
<br />- run-perfbench.py: don't allow imports from the cwd
<br />- run-natmodtests.py: don't allow imports from the cwd
<br />- float: test domain errors for more combos of args to math funcs
<br />- rename uasyncio to asyncio
<br />- extmod/uctypes_array_assign_le: fix buffer
<br />- extmod/framebuf: fix buffer size issues
<br />- extmod: add tests for ssl.SSLContext
<br />- extmod: add test for passing cadata into ssl.wrap_socket()
<br />- extmod: add deflate.DeflateIO tests
<br />- extmod: add coverage tests for select module
<br />- extmod: skip select/socket tests if they can't create UDP socket
<br />- extmod/select_poll_eintr.py: improve robustness of test
<br />- misc/sys_settrace_features.py: fix to run on newer CPython
<br />- unix/mod_os: make os.system() test work on windows
<br />- run-tests.py: capture output of stderr when running on CPython
<br />- multi_net: increase asyncio tests timeouts
<br />- stress/bytecode_limit.py: reverse order of cases
<br />- float/float_format_ints.py: put power-of-10 test in separate file
<br />- extmod/deflate_decompress.py: skip test when not enough memory
<br />- extmod/ssl_cadata.py: skip test on axtls
<br />- float/math_domain.py: tweak test to also pass with obj-repr-C
<br />- extmod/vfs_fat_finaliser.py: tweak test so files are collected
<br />- README: document ./run-internalbench.py
<br />- run-internalbench.py: remove old CPython reference
<br />- multi_net/ssl_cert_rsa.py: update test certificate
<br />- extmod/asyncio_threadsafeflag.py: update for unix select</p>
<p>tools:
<br />- pyboard.py: rename ProcessPtyToTerminal member "ser" to "serial"
<br />- mpremote: remove unused import of serial
<br />- pyboard.py: import serial.tools.list_ports
<br />- pyboard.py: import errno to fix undefined name in PyboardError
<br />- manifestfile.py: fix license capturing
<br />- mpremote: add repl option to escape non-printable characters
<br />- pydfu.py: use getattr to retrieve getargspec function
<br />- mpremote: add `sleep` command
<br />- mpremote: allow terminator for shortcut commands
<br />- mpremote: add `rtc` commands to get and set the RTC
<br />- mpremote: handle `cp` without destination
<br />- mpremote: detach mpremote from pyboard.py
<br />- mpremote: fix use of stdout_write_bytes function
<br />- mpremote: fix exec_ -> exec in commands.py
<br />- autobuild: update auto-build code to build esp32 port with IDF v5
<br />- autobuild: add support for application .bin files for esp32
<br />- mpy-tool.py: use isinstance() for type checking
<br />- codeformat.py: skip formatting ESP-IDF managed components
<br />- codeformat.py: use pyproject.toml for black config
<br />- mpremote: make soft-reset count as an action
<br />- autobuild: automatically build all variants for each board
<br />- mpy_ld.py: pre-declare some local variables to appease linter
<br />- mpy-tool.py: ignore linter failure in Python 2 compatibility code
<br />- mpy_ld.py: support more complex rodata sections
<br />- metrics.py: fix nrf and rp2 board names after renaming
<br />- autobuild: include .bin firmware in renesas-ra build output
<br />- autobuild/build-downloads.py: verify standard features
<br />- mpremote: add support for rfc2217, serial over TCP
<br />- metrics.py: fix esp32 and esp8266 board names after renaming
<br />- change remaining "urequests" references to "requests"</p>
<p>CI:
<br />- ci.sh: build both SAMD21 and SAMD51 boards as part of samd CI
<br />- ci.sh: add functions to check code spelling using codespell
<br />- ci.sh: add mimxrt and samd ports to code size build
<br />- ci.sh: build PICO_W board as part of rp2 CI
<br />- ci.sh: add a H5 board to stm32 CI build
<br />- ci.sh: add ARDUINO_PORTENTA_C33 to RA CI build
<br />- workflows: fetch full history for mpremote workflow
<br />- workflows: add spell check to code formatting workflow
<br />- workflows: add GitHub Action to lint Python code with ruff
<br />- workflows: force use of Ubuntu-20.04 for unix 32-bit builds
<br />- workflows: update esp32 CI to use IDF v5.0
<br />- workflows: bump actions/checkout from 3 to 4</p>
<p>The ports
<br />=========</p>
<p>all ports:
<br />- use extmod version of mktime instead of port-specific one
<br />- remove os.sync() implementation from stm32 and renesas-ra
<br />- enable os.sync() for esp32, esp8266, rp2, mimxrt, samd51
<br />- standardise docs link in help text
<br />- in machine_i2s.c, rename uasyncio to asyncio
<br />- simplify board feature tags in board.json
<br />- */boards/*/board.json: remove "id" field
<br />- restrict board.json to standard features
<br />- rename Arduino board LED pins to be consistent</p>
<p>bare-arm port: no changes specific to this component/port</p>
<p>cc3200 port:
<br />- mods/modutime: use extmod version of time module
<br />- tools: fix exception raised on process failure
<br />- Makefile: build firmware.zip</p>
<p>embed port: no changes specific to this component/port</p>
<p>esp8266 port:
<br />- modutime: use extmod version of time module
<br />- add support for the Espressif ESP-NOW protocol
<br />- machine_pwm: implement duty_u16() and duty_ns() for consistency
<br />- add support to set/get power saving mode of WLAN
<br />- change network.WLAN from a function to a type
<br />- allow Ctrl-C to interrupt the corrupt-fs while loop
<br />- machine_pin: accept an integer argument to mp_obj_get_pin_obj
<br />- add board variant support
<br />- boards/ESP8266_GENERIC: add image filename
<br />- boards: make sure modespnow.o is placed in irom0
<br />- boards/ESP8266_GENERIC: remove urllib from the 2MiB manifest</p>
<p>esp32 port:
<br />- modutime: use extmod version of time module
<br />- add support for the Espressif ESP-NOW protocol
<br />- add support to set/get power saving mode of WLAN
<br />- change network.WLAN from a function to a type
<br />- boards: add some missing board configs for two UM boards
<br />- esp32_ulp: enable FSM ULP for S2 and S3 chips
<br />- uart: use xtal as UART clock source on S3 and C3
<br />- modespnow: change name of buffer size config option to "rxbuf"
<br />- CMake: change PROJECT_DIR to CMAKE_CURRENT_LIST_DIR
<br />- esp32_ulp: fix ULP (FSM) support for S2 and S3
<br />- allow Ctrl-C to interrupt the corrupt-fs while loop
<br />- switch from UART driver to UART HAL
<br />- ppp_set_auth: add pppapi_set_auth from ESP-IDF
<br />- modesp32: remove esp32.hall_sensor function
<br />- update port to support IDF v5.0.2
<br />- in recv_cb, get espnow rssi from recv_info->rx_ctrl
<br />- network_wlan: wait for WIFI_EVENT_STA_START after activating
<br />- Makefile: provide more IDF shortcuts
<br />- boards: change SDK config parameters from deprecated to new ones
<br />- modules/inisetup.py: format partition as FAT if its label is ffat
<br />- machine_uart: always select a source_clk value in UART config
<br />- re-enable mDNS after move to IDF v5.0.2
<br />- boards/GENERIC_OTA: enable silent checks to reduce firmware size
<br />- network_wlan: wait for STA/AP START/STOP event in wlan.active
<br />- machine_timer: switch from legacy driver to timer HAL
<br />- machine_pin: add a pin-find func and use it in machine_pin_get_id
<br />- use always machine_pin_get_id for getting a Pin id
<br />- add support for board-named pins and the Pin.board dict
<br />- collect properties from IDF-managed components as well
<br />- modmachine: add generic machine.bootloader()
<br />- usb: add custom TinyUSB callback support
<br />- boards/ARDUINO_NANO_ESP32: add support for Arduino Nano ESP32
<br />- CMakeLists: enable multiple extra component directories in build
<br />- boards/ARDUINO_NANO_ESP32: fix deploy instructions
<br />- main: remove unused mbedtls debug function
<br />- machine_wdt: allow feeding WDT from threads
<br />- machine_hw_spi: fix access of SPI(2)
<br />- machine_hw_spi: remove unnecessary duplicate SPI pin defaults
<br />- machine_hw_spi: remove SPI host renaming for C3 and S3 variants
<br />- machine_hw_spi: check for valid SPI id in constructor, not init
<br />- boards: remove references to the IDF version in board.md files
<br />- README: specify that only IDF v5.0.2 is supported
<br />- allow malloc() to allocate from SPIRAM
<br />- enable automatic Python heap growth
<br />- gccollect: make level arg volatile to force recursive function
<br />- Makefile: implement `make submodules` to match other ports
<br />- boards/GENERIC: merge with GENERIC_{SPIRAM,OTA,D2WD,UNICORE}
<br />- boards/GENERIC_C3: merge with GENERIC_C3_USB
<br />- boards/GENERIC_S2: merge with ESP32_S2_WROVER
<br />- boards/GENERIC_S3: merge with GENERIC_S3_{SPIRAM,SPIRAM_OCT}
<br />- partitions.csv: rename to partitions-4MiB.csv
<br />- use uppercase variant names
<br />- Makefile: append board variant to BUILD
<br />- rename GENERIC* boards to ESP32_GENERIC*
<br />- boards/ESP32_GENERIC_C3: enable UART REPL
<br />- modsocket: add support for SO_BROADCAST socket option
<br />- modnetwork: add support for SO_BINDTODEVICE socket option
<br />- support JTAG console, free up UART
<br />- machine_uart: release GIL for blocking reads
<br />- boards: add pins.csv to UM boards and other minor changes
<br />- boards/UM_NANOS3: add new UM NanoS3 board
<br />- network_ppp: block after deleting task
<br />- boards/ARDUINO_NANO_ESP32: clarify recovery instructions
<br />- boards/UM_FEATHERS3: fix I2C pins in pins.csv
<br />- skip validation of image on boot from deepsleep
<br />- machine_pin: fix null pointer access in machine_pin_find
<br />- mphalport: add function/line/file info to check_esp_err exception
<br />- fix Partition.writeblocks() partial write corruption
<br />- boards: fix VBAT voltage calculation for UM S3 boards
<br />- boards: add bootloader rollback support for all builds
<br />- main: allow a board to override the MicroPython task stack size
<br />- boards/ARDUINO_NANO_ESP32: use Arduino USB IDs
<br />- boards/manifest.py: freeze aioespnow into firmware by default</p>
<p>mimxrt port:
<br />- modutime: use extmod version of time module
<br />- machine_pwm: start PWM only if freq and duty are set
<br />- flash: separate low level driver code from flash object
<br />- mpconfigport: add back lost uos.urandom()
<br />- add missing UART defintion and remove obsolete config
<br />- machine_spi: ignore transfers with len=0
<br />- machine_pin: perform full configuration in machine_pin_set_mode
<br />- sdcard: fix GCC 13 build error with sdcard_cmd_set_bus_width
<br />- led: add support for up to four LEDs
<br />- boards/ADAFRUIT_METRO_M7: add Adafruit Metro M7 board definition
<br />- machine_pwm: fix freq change, PWM print, and error checks
<br />- Makefile: use a specific fsl_flexspi_nor_boot.c for mimxrt1062
<br />- machine_pin: fix bug when Pin.irq is called without a handler
<br />- hal/pwm_backport: fix 0 and 65536 edge cases of PWM's duty_u16
<br />- machine_uart: add uart.deinit method and machine_uart_deinit_all
<br />- machine_uart: add support for UART hardware flow control
<br />- boards: add support for GPIO control of SNVS pins
<br />- hal: make flash clock frequency configurable
<br />- fix UART RTS/CTS assignments for the OLIMEX and Adafruit boards
<br />- machine_pin: extend pin configuration functions
<br />- sdio: add SDIO driver
<br />- integrate support for WiFi via the CYW43 driver
<br />- integrate Bluetooth support with NimBLE bindings
<br />- irq: move all IRQ related definitions to dedicated header
<br />- machine_uart: fix and complete UART.deinit and uart_deinit_all
<br />- boards: fix use of MICROPY_HW_SDRAM_AVAIL in MIMXRT1176.ld
<br />- machine_uart: support slow baud rates for UART
<br />- machine_uart: add a helper function to change the baudrate
<br />- sdio: move config guard so headers are only included if used
<br />- Makefile: update to work with latest TinyUSB
<br />- mpconfigport: don't override parse chunk alloc
<br />- sdio: add support for the 117x series
<br />- mimxrt_sdram: allow boards to override the default SDRAM config
<br />- Makefile: enable the FSL USDHC for supported MCU series
<br />- remove SDCARD Makefile config option
<br />- mpbthciport: enable flow control for BT HCI UART
<br />- mbedtls: enable certificate validity time validation
<br />- machine_uart: set the UART clock to a fixed 40MHz value
<br />- boards/MIMXRT1176_clock_config: fix comments about UART clocks
<br />- boards: fix naming of SD-card config option
<br />- mpbthciport: allow disabling UART flow control for BLE
<br />- machine_rtc: improve the RTC init at boot</p>
<p>minimal port: no changes specific to this component/port</p>
<p>nrf port:
<br />- modules/utime: use extmod version of time module
<br />- boards: rename all nRF boards to use uppercase</p>
<p>pic16bit port: no changes specific to this component/port</p>
<p>powerpc port:
<br />- mpconfigport: don't override parse chunk alloc</p>
<p>qemu-arm port: no changes specific to this component/port</p>
<p>renesas-ra port:
<br />- change MICROPY_HW_BOARD_NAME definition to product name
<br />- modutime: use extmod version of time module
<br />- update boards and ra directory files to support FSP v4.4.0
<br />- add a macro definition to avoid compile error of FSP v4.4.0
<br />- irq: fix typo in comment about IRQ priorities
<br />- consolidate hal_entry.c code and remove hal_entry() func
<br />- boards/make-pins.py: fix PA/PB pins support
<br />- consolidate all fsp_cfg header files to one location
<br />- support changing baudrate for UART
<br />- add support for RA6M5, and add machine PWM, DAC, SDCard
<br />- boards/VK_RA6M5: add new board definition
<br />- remove duplicate machine module from constants list
<br />- machine_spi: consistently use machine_pin_find to get pin
<br />- boards: remove unreachable code in make-pins.py
<br />- Makefile: generate binary firmware output
<br />- add TinyUSB support
<br />- add Bluetooth support using NimBLE
<br />- add RNG driver
<br />- add networking support using lwIP
<br />- add mbedTLS support
<br />- fsp_cfg: add common FSP config files
<br />- boards/ARDUINO_PORTENTA_C33: add support for Portenta C33
<br />- boards/ARDUINO_PORTENTA_C33: update WiFi config
<br />- tune lwip buffers and timing to improve network performance</p>
<p>rp2 port:
<br />- modutime: use extmod version of time module
<br />- machine_pwm: enable keyword args in constructor and add init method
<br />- machine_pwm: add support for inverting a PWM channel output
<br />- machine_pwm: add duty_x() checks and return 0 if PWM is not started
<br />- make rp2_state_machine_exec accept integers
<br />- CMakeLists: allow relative MICROPY_BOARD_DIR when invoking cmake
<br />- mphalport: only use CYW43 MAC for WLAN0 interface
<br />- CMake: normalize MICROPY_PORT_DIR
<br />- add Bluetooth support via cyw43
<br />- mpbthciport: cancel existing alarms
<br />- boards/PICO_W: enable Bluetooth Low Energy support
<br />- machine_pin: factor out pin-find code from machine_pin_make_new
<br />- use uppercase variant names
<br />- Makefile: append board variant to BUILD
<br />- rename PICO, PICO_W to RPI_PICO, RPI_PICO_W
<br />- machine_timer: fix printing of timer period
<br />- mpbthciport: switch to static scheduler nodes
<br />- mpbthciport: fix HCI UART config
<br />- mpconfigport: disable BLE locking when MICROPY_PY_BLUETOOTH enabled
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: use standard HCI UART baudrate
<br />- modmachine: fix lightsleep while wifi is powered off
<br />- msc_disk: allow configuring the USB MSC inquiry response
<br />- README: fix name of RPI_PICO_W board
<br />- CMakeLists: enable debug symbols in all builds
<br />- implement time.time_ns with time_us_64 so it has us resolution</p>
<p>samd port:
<br />- modutime: use extmod version of time module
<br />- machine_pwm: add init() method to PWM and simplify the PWM code
<br />- mpconfigport: drop support for SoftSPI max speed
<br />- boards/MINISAM_M4: update pins.csv for the Mini SAM M4 board
<br />- rearrange the MCU-specific loader files
<br />- mcu/samd51: enable MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF
<br />- boards: add default deploy instructions
<br />- main: fix sercom deinit ordering in soft-reset
<br />- modmachine: add machine.deepsleep as alias of machine.lightsleep
<br />- modmachine: make some machine classes configurable by #defines
<br />- boards/SEEED_WIO_TERMINAL: rename two pins starting with a digit
<br />- mcu: reduce the startup time after hard reset
<br />- machine_uart: add support for UART hardware flow control
<br />- boards/ADAFRUIT_METRO_M4_EXPRESS: add Metro M4 Express Airlift
<br />- boards: rename flash pins consistently for QSPI and SPI
<br />- samd_spiflash: add SPI flash driver and configure it accordingly
<br />- samd_qspiflash: add QSPI flash driver and configure it accordingly
<br />- adapt existing samd.Flash and integrate with (Q)SPI flash in boot
<br />- boards: extend the code size limit for boards with external flash
<br />- set the LFS type in mpconfigmcu.mk instead of mpconfigboard.mk
<br />- Makefile: move the math lib files from mpconfigmcu.mk to Makefile
<br />- Makefile: print memory region usage instead of totals
<br />- mpconfigport: enable DHT and onewire drivers on all MCUs/boards
<br />- mpconfigport: provide the platform module
<br />- modules/_boot.py: add /lib to sys.path
<br />- mpconfigport: don't override parse chunk alloc</p>
<p>stm32 port:
<br />- modutime: use extmod version of time module
<br />- boards/ARDUINO_PORTENTA_H7: enable FDCAN
<br />- boards/stm32h723_af.csv: fix ADC AF definitions
<br />- mboot: fix alignment of packed final buffer
<br />- irq: fix typo in comment about priorities
<br />- usb: fix USB support on STM32G4
<br />- boards/NUCLEO_G474RE: make it easier to enable USB
<br />- adc: add support for STM32L4A6 MCUs
<br />- boards/NUCLEO_L4A6ZG: add new board definition
<br />- help: don't include unavailable features in help()
<br />- help: exclude legacy entries from help, and adjust constant names
<br />- mpconfigboard_common: provide default spidev config
<br />- boards: use default spibdev config where appropriate
<br />- Makefile: pass relevant CPU flags to assembler
<br />- make-stmconst.py: support structs with names ending in _t
<br />- main: start UART REPL as early as possible
<br />- usbd_conf: treat G0 USB periph as MICROPY_HW_USB_IS_MULTI_OTG=0
<br />- machine_adc: handle ADC resolution less than 8 bits on all MCUs
<br />- add initial support for H5 MCUs
<br />- boards: add ld, af.csv and hal_conf_base.h files for H5 MCUs
<br />- octospi: add preliminary support for OCTOSPI peripheral
<br />- boards/STM32H573I_DK: add H5 board definition files
<br />- add USB support for STM32L1 MCUs
<br />- modify RCC->APB2ENR directly instead of HAL API
<br />- modmachine: remove duplicate machine_timer_type declaration
<br />- modmachine: make machine_reset_cause_obj public
<br />- dac: fix dac.write_timed on G4 MCUs to use 32-bit DMA access
<br />- adc: fix ADC clock prescaler for G4 MCUs
<br />- adc: fix pyb.ADCAll.read_core_temp for G4 MCUs
<br />- adc: fix reading internal ADC channels on G4 MCUs
<br />- machine_adc: fix machine.ADC to work on G4 MCUs
<br />- adc: add workaround for ADC errata with G4 MCUs
<br />- adc: fix pyb.ADCAll.read_core_bat on G4 and L4 MCUs
<br />- qspi: allow qspi_write_cmd_data to write cmd with 1 data byte
<br />- mpconfigport: always define MICROPY_SOFT_TIMER_TICKS_MS
<br />- remove duplicate machine module from constants list
<br />- boards/B_L072Z_LRWAN1: add pin definitions for internal SX1262
<br />- boards/B_L072Z_LRWAN1: lower default ROM level to "Core"
<br />- spi: add STM32WL5 SUBGHZ SPI peripheral
<br />- powerctrlboot: support STM32WL system clock from HSE+PLL
<br />- dma: fix DMA completion on WL55 boards
<br />- subghz: add STM32WL55 subghz radio interface to stm module
<br />- modstm: add MICROPY_PY_STM_CONST flag, clear it for STM32WL5
<br />- use uppercase variant names
<br />- Makefile: append board variant to BUILD
<br />- mboot: fix fwupdate by replacing zlib with new deflate module
<br />- uart: fix UART timeout issue with low baudrate on G4 MCUs
<br />- timer: fix deadtime config on Advanced Timer peripherals
<br />- dma: add support for SPI1 DMA on H5 MCU's
<br />- octospi: add support for dual-line SPI interface
<br />- powerctrlboot: allow using PLL3 for USB clock on H5 MCU's
<br />- timer: fix use of TIM8 on H5 MCU's
<br />- uart: add support for UART10 when it's a USART
<br />- powerctrlboot: allow PLL1 Q and R outputs to be enabled on H5
<br />- adc: fix STM32H5 support
<br />- adc: add support for STM32H5 ADC2 inputs
<br />- adc: optimize sampling time for G4, H5, L4 and WB MCUs
<br />- machine_adc: fix and improve STM32H5 support
<br />- dac: add STM32H5 DAC support, with dma_nohal implementation
<br />- boards: move includes to after defines in all hal_conf.h files
<br />- uart: generalise UART source clock calculation for H5 and H7 MCUs
<br />- dma: remove unbalanced )
<br />- usbd_msc_interface: allow configuring the MSC inquiry response
<br />- boards/ARDUINO_GIGA: update board config
<br />- i2c: add support for I2C4 on H7 MCUs</p>
<p>teensy port: no changes specific to this component/port</p>
<p>unix port:
<br />- modutime: use extmod version of time module
<br />- Makefile: allow variants to add QSTR_DEFS
<br />- main: add NLR scope for checking module __path__
<br />- README: fix Markdown link markup
<br />- modsocket: add poll support for missing ERR,HUP,NVAL poll values
<br />- modselect: remove unix-specific implementation of select module
<br />- modjni: fix build errors with type definitions and error strings
<br />- main: fix memory leakage if MICROPY_USE_READLINE is disabled</p>
<p>webassembly port:
<br />- modutime: use extmod version of time module
<br />- make mp_js_do_str asynchronous
<br />- make mp_js_process_char asynchronous
<br />- replace typeof window check with ENVIRONMENT_IS_NODE flag</p>
<p>windows port:
<br />- Makefile: allow variants to add QSTR_DEFS</p>
<p>zephyr port:
<br />- modutime: use extmod version of time module</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.20.02023-04-26T05:43:11Zv1.20.0: New mip package manager, compressed type structs and Pico W support<p>New mip package manager, compressed type structs and Pico W support</p>
<p>This release of MicroPython introduces a new lightweight package manager
<br />called mip, which uses a custom protocol to query and install packages that
<br />is optimised for embedded systems. It is intended to take over the role of
<br />upip and supports installing packages from micropython-lib as well as any
<br />URL. Mip can be run directly on a device (with network connectivity) or
<br />via mpremote. As part of this, all pure-Python drivers have been moved
<br />from the micropython repository to the micropython-lib repository, making
<br />it easier to install the packages needed for a given project.</p>
<p>In the MicroPython runtime, core/built-in types have been compressed by
<br />only including in the C-level type struct as many slots for C function
<br />pointers as is needed for a given type (instead of storing NULL pointers
<br />for unused slots). This resulted in a reduction of code size of many
<br />kilobytes for all ports (eg around 1200 for bare-arm) with a very minimal
<br />loss in performance. Any third-party C extensions will need to be updated
<br />to work with this change. See commits
<br />662b9761b37b054f08fe2f7c00d0fce3a418d0b0 and
<br />3ac8b5851e5f4dade465d52b91ed2ccc17851263 for details.</p>
<p>The MicroPython VM/runtime has also seen many improvements and bug fixes,
<br />including: addition of hex/fromhex methods to bytes/memoryview/bytearray,
<br />dictionary union (PEP 584), support for __float__ and __complex__
<br />functions, support for __dict__ on module objects and UTF-8 validation of
<br />all strings. Whole number floats are now formatted exactly, and there have
<br />been other accuracy improvements to parsing and formatting of floats.
<br />A sub-version has been introduced for .mpy files which is used only when a
<br />.mpy file includes native code, allowing the native ABI to change while
<br />retaining backwards compatibility with pure bytecode .mpy files.
<br />There is now an option to have the GC heap split across more than one pool
<br />of memory, although this is not yet in use by the ports. And root pointer
<br />registration has been simplified with the new MP_REGISTER_ROOT_POINTER
<br />macro.</p>
<p>In the network module, the keyword arguments to scan(), connect() and
<br />config() have been renamed to be more consistent across ports and drivers.
<br />The changed argument names are: "essid" changed to "ssid", "auth" or
<br />"authmode" changed to "security", and "password" changed to "key". The old
<br />keyword arguments are still supported so this change is backwards
<br />compatible. The functions network.hostname() and network.country() have
<br />also been added and provide a standard interface across ports to set the
<br />global networking configuration for all interfaces and interface types. In
<br />particular, setting the hostname is now supported for all CYW43xx-based
<br />boards (pyboard-D, Arduino Portenta, Pico W, and others).</p>
<p>The mbedtls (SSL library) settings have also been unified across ports that
<br />use this library and enable elliptic curve DH and DSA cryptography enabled
<br />so that devices can connect to more websites. The cert_reqs and cadata
<br />arguments have also been implemented. Sockets now support leaving
<br />multicast groups. WebREPL will now run the page from the device, allowing
<br />WebREPL resources to load from a HTTPS site.</p>
<p>The bluetooth module has a minor breaking change for
<br />IRQ_GATTC_CHARACTERISTIC_RESULT: def_handle has been replaced with
<br />end_handle. This is not expected to affect most programs as def_handle is
<br />unlikely to be used. See commit cacc96d98c2a70dc7e5194331ea70746c39746ec.</p>
<p>The uasyncio module now supports stream read(-1), handles gather with no
<br />awaitables, and adds a clear() method to ThreadSafeFlag. The framebuf
<br />module adds ellipse and polygon drawing methods, and a fill argument to
<br />rect() for consistency with those new methods.</p>
<p>A new port has been added, the "embed" port, which is a port of MicroPython
<br />that targets the C language and outputs a set of self-contained .c and .h
<br />files for embedding into a wider project. An example is provided to show
<br />how this works.</p>
<p>The esp8266 port has reverse-special-methods enabled on the GENERIC board,
<br />uart.flush() and uart.txdone() added, real open drain output enabled on
<br />pins driven by PWM, and adds the ability to set TX power for the WLAN
<br />interface.</p>
<p>The esp32 port now uses synchronous BLE events which allows support for BLE
<br />pairing and bonding. The LAN driver adds support for LAN8710, KSZ8081,
<br />configuration of ETH ref_clk pin, and support for SPI-based Ethernet chips.
<br />UART now supports setting timeout_char and implements uart.flush() and
<br />uart.txdone(). New boards include ESP32S3 with octal SPIRAM, Olimex PoE
<br />boards and a generic board for unicore chips. There have also been many
<br />bug fixes, in particular for newer MCU versions such as S2, S3 and C3.</p>
<p>The mimxrt port has seen a lot of clean up of the code, support for
<br />MIMXRT1176 MCUs and the MIMXRT1170_EVK board, a soft-timer implementation
<br />of machine.Timer, addition of machine.bootloader(), as well as uart.flush()
<br />and uart.txdone().</p>
<p>On the nrf port, machine.UART and machine.PWM have been improved to match
<br />other ports (the PWM change is a breaking change), and machine.I2C now
<br />supports the freq argument. New boards include the Arduino Nano 33 BLE
<br />sense board and the Seeed XIAO NRF52840 Sense.</p>
<p>The rp2 port sees the integration of the CYW43xx WiFi driver which is used
<br />in the new Pico W board, a board similar to the Pico but with WiFi support.
<br />Other new boards include W5500_EVB_PICO, WEACTSTUDIO and the nullbits Bit-C
<br />PRO board. Support has been added for named pins, including Pin.board and
<br />Pin.cpu attributes, consistent with other ports that support this feature.
<br />The machine.lightsleep() function has been implemented, along with SSL
<br />certificate time validation, and more accurate formulas are used to
<br />determine PWM frequency and duty. The GC heap available to MicroPython
<br />programs has been increased to use the maximum available free RAM, adding
<br />about 20k to the user heap. There have also been important bug fixes to
<br />threading and concurrency when using both cores.</p>
<p>The samd port has been significantly extended to include: named pins with
<br />a pins.csv file, and Pin.board and Pin.cpu attributes; ADC, PWM, DAC,
<br />SoftSPI, SoftI2C, SPI, I2C and RTC classes added to the machine module;
<br />pin.irq() method and OPEN_DRAIN mode for pins; freq, disable_irq,
<br />enable_irq, idle, lightsleep and time_pulse_us functions added to the
<br />machine module. Floating point support has been added for SAMD21 devices,
<br />and the math module enabled for SAMD51. A board definition for Sparkfun
<br />Think Plus has been added.</p>
<p>The stm32 port sees support added for STM32L1xx MCUs, STM32H723, USB on
<br />STM32G0xx and mboot support for STM32G0xx. The existing CYW43xx WiFi
<br />driver has been replaced with the open-source version of cyw43-driver and
<br />this has been integrated with all existing boards with CYW43xx chips.
<br />Support for the CC3000 WiFi driver has been removed, and the Wiznet driver
<br />integration has been reworked to use the generic one shared with other
<br />ports (and also uses lib/wiznet5k instead of the old drivers/wiznet5k).
<br />Hardware I2C implementation has been added for STM32L1xx and STM32L4xx,
<br />support added for Arduino 1200bps touch to enter the bootloader (only on
<br />Arduino boards), mbedtls (SSL) certificate time validation added, and
<br />link-time-optimisation (LTO) enabled by default on boards with small flash
<br />size. New board definitions include: LEGO Hub No. 7, NUCLEO-L152RE,
<br />NUCLEO-F756ZG, NUCLEO-H723ZG, Arduino Nicla Vision and Arduino Giga H7.
<br />Arduino boards also now include a range of frozen libraries including
<br />senml.</p>
<p>For the unix and windows ports, build outputs (including executables) are
<br />now kept inside the $(BUILD) directory associated with the build. As part
<br />of this the variant suffix has been removed from the executable name. For
<br />example, what was micropython-coverage is now build-coverage/micropython,
<br />and the standard variant is build-standard/micropython. Furthermore, the
<br />dev variant has been removed and its features enabled instead on the
<br />standard variant, which now enables the same feature set as a typical
<br />bare-metal board, making it more convenient to use for development. The
<br />remaining variants are: minimal, standard, nanbox, coverage. The SSL
<br />implementation for this port has switched from axtls to mbedtls, again to
<br />match most bare-metal ports.</p>
<p>The javascript port has been renamed to the webassembly port, and adds
<br />support for VFS and VfsPosix using Emscripten's POSIX filesystem layer.
<br />The way stdout printing works has also changed to dispatch via a custom
<br />event called "micropython-print".</p>
<p>The zephyr port upgraded Zephyr to v3.1.0, added custom configuration for
<br />bbc_microbit_v2, and enabled finalisers.</p>
<p>The change in code size since the previous release for various ports is
<br />(absolute and percentage change in the text section):</p>
<p> bare-arm: -1124 -1.934%
<br /> minimal x86: -4322 -2.967%
<br /> unix x64: +264181 +50.533% standard
<br /> stm32: -3592 -0.906% PYBV10
<br /> cc3200: -1832 -0.990%
<br /> esp8266: -2284 -0.327% GENERIC
<br /> esp32: +9659 +0.632% GENERIC
<br /> nrf: -84 -0.045% pca10040
<br /> rp2: +13096 +4.291% PICO
<br /> samd: +127776 +90.488% ADAFRUIT_ITSYBITSY_M4_EXPRESS</p>
<p>The changes that dominate these numbers are:
<br />- bare-arm, minimal, stm32, cc3200, esp8266: reduced size due to compressed
<br /> type structs
<br />- unix: switching axtls for mbedtls, merging in dev configuration options
<br /> and features
<br />- esp32: new Ethernet drivers and some additional machine module
<br /> functionality
<br />- nrf: compressed type struct and machine module improvements
<br />- rp2: additional mbedtls features and ciphers
<br />- samd: many new features, and machine module classes and functions</p>
<p>Thanks to everyone who contributed to this release:
<br />Alex Riesen, Andrew Leech, Andrew Scheller, Angus Gratton, Antonello
<br />Margottini, Antonin ENFRUN, Ayke van Laethem, Blake Felt, brave ulysses,
<br />Brian Cooke, Brian Pugh, Carlosgg, Chris Overgaauw, Chris Swan, Chris
<br />Waggoner, chrismas9, Christian Clauss, Christian Walther, Clayton Cronk,
<br />cpottle9, Dale Weber, Damiano Mazzella, Damien George, Damien Tournoud, Dan
<br />Ellis, Daniel Jour, David (Pololu), David Grayson, David Lechner, David
<br />Peake, David Yang, Dorukyum, Efi Weiss, enriquezgarc, Felix Dörre, Florian
<br />Weimer, glenn20, hoihu, Howard Lovatt, iabdalkader, Ian Davies,
<br />IcedRooibos, Ihor Nehrutsa, Jacob Siverskog, Jan Hrudka, Jan Willeke, Jared
<br />Hancock, Jatty_, Jay Greco, Jeff Epler, Jeremy Rand, Jim Mussared, Jonas
<br />Scharpf, Jos Verlinde, Juan Francisco Cantero Hurtado, Koen De
<br />Vleeschauwer, Kyuchumimo, Lars Haulin, Laurens Valk, LiaoJingyi_winY7kp,
<br />Luiz Brandao, ma-lalonde, manobendro, Maripo GODA, Mark Grosen, Martin
<br />Milata, Mat Booth, Matt Trentini, Maureen Helm, Michael Bentley, Michael
<br />Mogenson, MrJake222, Nathan Hendler, Ned Konz, Nicholas H.Tollervey, Oliver
<br />Joos, omogenot, Patrick, Patrick Joy, Paul Grayson, Paul Warren, Pepijn de
<br />Vos, Peter Harper, Peter Hinch, PGE, Phil Howard, Philip Peitsch, Philipp
<br />Ebensberger, pmendham, Rayane Chatrieux, Red_M, Rob Knegjens, robert-hh,
<br />Sebastian Romero, Simon Arlott, Sky, Stewart C. Russell, Stig Bjørlykke,
<br />stijn, Stuart Langridge, Takeo Takahashi, Thorsten von Eicken, Tim Gates,
<br />Tobias Thyrrestrup, Tomasz 'CeDeROM' CEDRO, Tomofumi Inoue, TPReal,
<br />Trammell hudson, Wind-stormger, yn386, Yonatan Goldschmidt, 小权一句两句.</p>
<p>The work done in this release was funded in part through GitHub Sponsors,
<br />by George Robotics, and by Planet Innovation.</p>
<p>What follows is a detailed list of changes, generated from the git commit
<br />history, and organised into sections.</p>
<p>Main components
<br />===============</p>
<p>all:
<br />- fix paths to mpy-cross and micropython binaries
<br />- remove MICROPY_PY_IO_FILEIO config option
<br />- update all manifest.py files to use new features
<br />- simplify buffer protocol to just a "get buffer" callback
<br />- standardise mp_obj_type_t initialisation
<br />- make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE
<br />- fix #if inside MP_DEFINE_CONST_OBJ_TYPE for msvc
<br />- remove unnecessary locals_dict cast
<br />- use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS
<br />- keep msvc build output in build/ directories
<br />- fix Python comparison to None and True, and use "not in"
<br />- use micropython-lib unconditionally in manifests
<br />- replace upip with mip everywhere
<br />- update Python formatting to black "2023 stable style"
<br />- update copyright year range to include 2023</p>
<p>py core:
<br />- vm: change comparison for finally handler search from > to >=
<br />- emit: remove logic to detect last-emit-was-return-value
<br />- emit: suppress unreachable bytecode/native code that follows jump
<br />- objcell: make cell get/set funcs static-inline to reduce code size
<br />- parsenum: support parsing complex numbers of the form "a+bj"
<br />- parsenum: fix parsing of complex "j" and also "nanj", "infj"
<br />- parsenum: optimise when building with complex disabled
<br />- objclosure: forward function attributes for closures
<br />- objfun: support function attributes on native functions
<br />- builtin: remove unnecessary module declarations
<br />- builtinhelp: don't show help for an MP_MODULE_ATTR_DELEGATION_ENTRY
<br />- mkrules.cmake: improve printing of git-submodules error
<br />- scheduler: de-inline and fix race with pending exception / scheduler
<br />- vm: document internal SELECTIVE_EXC_IP option
<br />- emitnative: fix STORE_ATTR viper code-gen when value is not a pyobj
<br />- vm: remove check for ip being NULL when handling StopIteration
<br />- vm: in YIELD_FROM opcode, expand helper macros and remove them
<br />- vm: consistently indent #if guards to match the code they surround
<br />- objnamedtuple: fix segfault with empty namedtuple
<br />- misc: add MP_STATIC_ASSERT_NOT_MSC()
<br />- obj: add static safety checks to mp_obj_is_type()
<br />- obj: add debug-only runtime checks to mp_obj_is_type()
<br />- make_root_pointers: add MP_REGISTER_ROOT_POINTER parser/generator
<br />- mpstate: drop MICROPY_PORT_ROOT_POINTERS from mp_state_vm_t
<br />- persistentcode: use MP_REGISTER_ROOT_POINTER()
<br />- modsys: use MP_REGISTER_ROOT_POINTER()
<br />- scheduler: use MP_REGISTER_ROOT_POINTER()
<br />- misc: fix msvc compilation with compressed error messages
<br />- qstr: make mp_decompress_rom_string decl and def the same
<br />- gc: allow the GC heap to be split over multiple memory areas
<br />- gc: reduce code size when MICROPY_GC_SPLIT_HEAP is disabled
<br />- obj: add support for __float__ and __complex__ functions
<br />- obj: make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first
<br />- compile: support large integers in inline-asm data directive
<br />- modio: remove FileIO and TextIOWrapper from io module
<br />- formatfloat: format all whole-number floats exactly
<br />- builtinimport: remove duplicate static function argument
<br />- mkenv.mk: use micropython-lib from submodule by default
<br />- runtime: fix crash in star arg unpacking
<br />- mpprint: fix formatting typo with mp_print_ext_t struct name
<br />- objstr: reformat str access macros to make them readable
<br />- mkrules.mk: keep all build artefacts inside $(BUILD) directory
<br />- dynruntime.mk: allow building assembly source in natmods
<br />- nlrpowerpc: fix generation of ppc64 code on ppc32 build
<br />- qstr: change qstr hash type from mp_uint_t to size_t
<br />- objstr: consolidate methods for str/bytes/bytearray/array
<br />- objstr: add hex/fromhex to bytes/memoryview/bytearray
<br />- objstr: remove str function object declarations from header file
<br />- mkrules: use abspath to find directory for mpy-cross dependency
<br />- parsenum: ensure that trailing zeros lead to identical results
<br />- formatfloat: use pow(10, e) instead of pos/neg_pow lookup tables
<br />- dynruntime: add mp_obj_is_true
<br />- clean up formatting of union definitions
<br />- builtinimport: allow overriding of mp_builtin___import__
<br />- objstr: split mp_obj_str_from_vstr into bytes/str versions
<br />- objstr: always ensure mp_obj_str_from_vstr is unicode-safe
<br />- objstr: optimise mp_obj_new_str_from_vstr for known-safe strings
<br />- objstr: always validate utf-8 for mp_obj_new_str
<br />- persistentcode: clarify ValueError when native emitter disabled
<br />- objpolyiter: add a new polyiter type with finaliser support
<br />- mpconfig: add LFS1/LFS2 options to match FAT/posix
<br />- mpconfig: make feature levels available to mpconfigport.h
<br />- mpconfig: add "everything" features from unix coverage
<br />- objpolyiter: fix comment about finaliser method
<br />- mkrules.mk: add link to build troubleshooting on failure
<br />- obj: add macro to declare ROM mp_obj_type_t instances
<br />- objexcept: make MP_DEFINE_EXCEPTION use MP_DEFINE_CONST_OBJ_TYPE
<br />- obj: add "full" and "empty" non-variable-length mp_obj_type_t
<br />- obj: add accessors for type slots and use everywhere
<br />- obj: add slot-index mp_obj_type_t representation
<br />- obj: remove basic mp_obj_type_t sparse representation
<br />- objtype: optimise slot RAM usage for instance types
<br />- objnamedtuple: optimise slot RAM usage for namedtuple
<br />- obj: merge getiter and iternext mp_obj_type_t slots
<br />- obj: convert make_new into a mp_obj_type_t slot
<br />- obj: optimise code size and performance for make_new as a slot
<br />- persistentcode: introduce .mpy sub-version
<br />- objmodule: add support for __dict__
<br />- runtime: add mp_raise_OSError_with_filename helper function
<br />- include filename in errors from loading/saving files via "open"
<br />- parse: allow const types other than int to optimise as true/false
<br />- objstr: don't treat bytes as unicode in str.count
<br />- mkenv.mk: make CPP definition explicit for consistency
<br />- objstr: add a helper to set mp_obj_str_t data
<br />- modsys: add support for sys.executable
<br />- py.mk: make user-C-module handling self-contained in py.mk
<br />- misc: remove use of bitfield from vstr_t
<br />- obj: verify floating point type is correct for repr C
<br />- persistentcode: only emit sub-version if generated code has native
<br />- obj: add comments explaining the slot index scheme
<br />- makeversionhdr: fall back to py/mpconfig.h instead of docs/conf.py
<br />- builtinimport: fix crash handling "weak link" module names
<br />- objarray: detect bytearray(str) without an encoding
<br />- emitnative: ensure load_subscr does not clobber existing REG_ARG_2
<br />- nlrmips: add native NLR support for MIPS architecture
<br />- makeversionhdr.py: allow running outside of repo
<br />- objdict: implement dictionary union (PEP 584)
<br />- bc: fix checking for duplicate **kwargs
<br />- modmicropython: make module optional
<br />- mpconfig: include micropython module in core features
<br />- remove the word "yet" from exception messages
<br />- pass in address to compiled module instead of returning it
<br />- gc: avoid valgrind false positives
<br />- gc: ensure a gap of one byte after the ATB
<br />- gc: fix debug printing of GC layout
<br />- obj: remove unused MP_DEFINE_CONST_OBJ_FULL_TYPE macro
<br />- emitnative: initialise locals as Python object type for native code
<br />- map: clear value when re-using slot with ordered dictionaries
<br />- gc: increase the address length in gc_dump_alloc_table()
<br />- objarray: raise error on out-of-bound memoryview slice start
<br />- lexer: wrap in parenthesis all f-string arguments passed to format
<br />- add parenthesis to default impl of MP_OBJ_TO_PTR, MP_OBJ_FROM_PTR
<br />- objint_mpz: catch and reject @ and @= operating on big integers
<br />- mkrules: support mpy-tool-flags in cmake frozen code generation
<br />- mkrules.cmake: force build mpversion.h and frozen_content.c
<br />- modmath: fix two-argument math function domain check
<br />- emitnative: explicitly compare comparison ops in binary_op emitter
<br />- makeversionhdr.py: optionally get git tag and git hash from env vars
<br />- compile: fix scope of assignment expression target in comprehensions
<br />- gc: make gc_dump_info/gc_dump_alloc_table take a printer as argument
<br />- mpconfig: provide config option for internal printf printer
<br />- builtinimport: fix unix port build with external imports disabled
<br />- makeversionhdr.py: always add micro to version string even if it's 0
<br />- obj: add MP_NOINLINE to mp_obj_malloc_helper
<br />- mpstate: add mp_thread_is_main_thread() helper macro
<br />- scheduler: implement VM abort flag and mp_sched_vm_abort()
<br />- obj: fix spelling of staticmethod
<br />- makeqstrdefs.py: fix handling GreenHills C/C++ preprocessor output</p>
<p>extmod:
<br />- network_cyw43: rename WLAN keyword args to ssid/security/key
<br />- network_ninaw10: rename WLAN connect argument from essid to ssid
<br />- modlwip: clean up inclusion of modlwip in build process
<br />- extmod.cmake: only include modbtree in build if it's enabled
<br />- extmod.mk: separate out extmod file list from py.mk to extmod.mk
<br />- modbtree: use buffer protocol for keys/values
<br />- uasyncio: attempt to write immediately in Stream.write method
<br />- uasyncio: implement stream read(-1) to read all data up to EOF
<br />- vfs: prevent uninitialized variable warning for path_out
<br />- network_cyw43: support new cyw43-driver
<br />- modnetwork: include cyw43-driver header if it's enabled
<br />- network_cyw43: add "security" config option to get/set auth mode
<br />- btstack: use MP_REGISTER_ROOT_POINTER()
<br />- nimble: use MP_REGISTER_ROOT_POINTER()
<br />- modnetwork: use MP_REGISTER_ROOT_POINTER()
<br />- uos_dupterm: use MP_REGISTER_ROOT_POINTER()
<br />- modlwip: use MP_REGISTER_ROOT_POINTER()
<br />- vfs: use MP_REGISTER_ROOT_POINTER()
<br />- modbluetooth: use MP_REGISTER_ROOT_POINTER()
<br />- always use custom mbedtls error message code
<br />- modussl_mbedtls: implement cert_reqs and cadata arguments
<br />- btstack: fix descriptor discovery handle range and events
<br />- network_ninaw10: move ninaw10 root pointer registrations here
<br />- modbluetooth: add support for running sync irq on system thread
<br />- webrepl: allow the page to run from the device (over HTTP)
<br />- uasyncio: handle gather with no awaitables
<br />- ntptime: factor out ntptime module from esp8266 port
<br />- modussl_mbedtls: set a more sensible default debug log level
<br />- network_cyw43: add hostname config option
<br />- network_wiznet5k: register NIC when the lwIP stack is used
<br />- network_wiznet5k: drop obsolete argument count check
<br />- network_wiznet5k: deinit the NIC before (re-)initialisation
<br />- network_wiznet5k: schedule clearing of interrupt flags
<br />- network_wiznet5k: rearrange the function wiznet5k_poll()
<br />- network_wiznet5k: extract SPI transfer function dynamically
<br />- uasyncio: add clear method to ThreadSafeFlag
<br />- uasyncio: rename internal _flag to state, to save a qstr
<br />- modlwip: add support for leaving multicast groups
<br />- vfs_posix_file: remove unused MICROPY_VFS_POSIX_FILE
<br />- modframebuf: optimise argument handling
<br />- modframebuf: add fill argument to rect()
<br />- modframebuf: add ellipse drawing method
<br />- modframebuf: add polygon drawing methods
<br />- modframebuf: improve poly-fill boundary pixels
<br />- network_wiznet5k: use the configured DNS address if available
<br />- machine_i2c: call MICROPY_PY_EVENT_HOOK during i2c.scan()
<br />- modure: convert byte offsets to unicode indices when necessary
<br />- modbluetooth: fix descriptor registration with empty tuple
<br />- modbluetooth: replace def_handle with end_handle in char IRQ
<br />- vfs: add finaliser to ilistdir to close directory handle
<br />- vfs_posix_file: implement finaliser for files
<br />- modbluetooth: change data_len type from size_t to uint16_t
<br />- modbluetooth: do GATTC reassembly in protected uPy context
<br />- modbluetooth: run BLE IRQ callback in protected NLR context
<br />- extmod.mk: make extmod.mk handle GIT_SUBMODULES
<br />- make extmod.mk self-contained
<br />- utime_mphal: make ticks_add check for overflow of delta
<br />- btstack: update BTstack bindings to work with latest BTstack
<br />- mbedtls: add common configuration file, and use it in all ports
<br />- mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
<br />- mbedtls: enable elliptic curve DH and DSA cryptography
<br />- mbedtls: remove MBEDTLS_ECP_DP_CURVE25519_ENABLED config
<br />- mbedtls: remove brainpool curves from config
<br />- machine_timer: move stm32's implementation of machine.Timer here
<br />- vfs_posix: include errno.h and unistd.h headers
<br />- extmod.cmake: allow overriding the default MBEDTLS_CONFIG_FILE
<br />- modlwip: use actual errno in exception for error in listen
<br />- extmod.mk: set default mbedtls config file in extmod Makefile
<br />- btstack: allow the BTstack config to be overridden by a board
<br />- add and reorganise compilation guards and includes
<br />- extmod.cmake: add MICROPY_PY_BTREE compiler definition
<br />- moduplatform: remove _M_IX86 test for xtensa
<br />- moduplatform: fix MSVC x86_64 check
<br />- modframebuf: fix crash in FrameBuffer scrolling beyond extents
<br />- uasyncio: fix syntax of generator functions
<br />- modnetwork: use a type protocol to implement NIC functions
<br />- modussl_mbedtls: fix support for ioctl(MP_STREAM_POLL)
<br />- network_cyw43: fix handling of networks with open security
<br />- axtls-include: add back needed header files for building axTLS
<br />- utime_mphal: fix comment re delta range check in time_ticks_add
<br />- modbtree: move system includes within MICROPY_PY_BTREE guard
<br />- modnetwork: add network.hostname() and network.country()
<br />- modnetwork: allow more extensive port-specific customisation
<br />- network_cyw43: use CYW43_CHANNEL_NONE for default arg in connect
<br />- vfs_posix: do not filter '..*' in ilistdir when filtering '..'
<br />- network_ninaw10: check socket types when creating new sockets
<br />- network_cyw43: fix setting hostname using config() method
<br />- network_cyw43: add support to get STA RSSI using status() method
<br />- network_ninaw10: add missing raw socket type to socket()
<br />- btstack: switch to use hci_dump_init instead of hci_dump_open
<br />- modbluetooth: merge gatts_notify/indicate implementation
<br />- btstack: fix indicate/notify queuing
<br />- btstack: include value handle in client read/write events
<br />- btstack: fix MTU handling
<br />- btstack: add support for CCCD to allow client subscriptions
<br />- nimble: fix flags for descriptor registration
<br />- modbluetooth: make all HCI transports trace in the same format
<br />- btstack/modbluetooth_btstack: add default services</p>
<p>shared:
<br />- runtime/tinyusb_helpers: add TinyUSB helper functions
<br />- netutils/dhcpserver: match default DNS to server IP
<br />- readline: use MP_REGISTER_ROOT_POINTER()
<br />- runtime/pyexec: use MP_REGISTER_ROOT_POINTER()
<br />- runtime/softtimer: move softtimer.[ch] to shared/runtime
<br />- runtime/softtimer: remove obsolete #include statement
<br />- runtime/sys_stdio_mphal: make func static and remove some TODOs
<br />- runtime/gchelper_native: fix pointer cast on x86_64
<br />- netutils: add "py/obj.h" header include
<br />- tinyusb: create common TinyUSB code for reuse by ports
<br />- tinyusb: further refactor static USB device implementation
<br />- tinyusb: fix CDC bNumInterfaces value
<br />- runtime: use mp_printf consistently, instead of printf
<br />- runtime/gchelper: drop cpu directive from ARM asm helpers
<br />- runtime/softtimer: use consistently the same clock source
<br />- runtime/softtimer: fix ticks range when computing ticks diff
<br />- tinyusb: allow max USB descriptor string to be configured
<br />- runtime/pyexec: don't allow Ctrl+C to interrupt frozen boot code
<br />- tinyusb: revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256</p>
<p>drivers:
<br />- hts221: add HTS221 humidity sensor driver
<br />- lsm9ds1: add LSM9DS1 IMU driver
<br />- lps22h: add LPS22HB/HH pressure sensor driver
<br />- lps22h: use machine.idle for power saving
<br />- ninaw10/nina_wifi_bsp: use MP_REGISTER_ROOT_POINTER()
<br />- fix a few typos in comments
<br />- cyw43: allow configuring the netif/mDNS hostname
<br />- sdcard: add delay in init_card_v1 to make timeout work
<br />- wiznet5k: remove old Wiznet driver
<br />- cc3000: remove CC3000 WiFi driver files
<br />- display: don't include tests by default
<br />- remove drivers that are now in micropython-lib
<br />- ninaw10: connect to WiFi asynchronously
<br />- bus: detect QSPI transfer errors and pass up to spiflash driver
<br />- bus: change QSPI read_cmd signature to return an error code
<br />- ninaw10: implement machine.Pin external pin controls
<br />- cyw43: use board-defined BLE UART secondary baudrate
<br />- cyw43: use a different baudrate for BT firmware download
<br />- ninaw10: fix machine_pin GPIO read
<br />- cyw43: include CYW43 config file
<br />- ninaw10: add missing external pins 34 and 39
<br />- ninaw10: fix ESP32 input-only pins</p>
<p>mpy-cross:
<br />- Makefile: respect existing CFLAGS and LDFLAGS
<br />- remove .gitignore file
<br />- include alloca.h for NetBSD
<br />- mpy_cross: add Python wrapper for mpy-cross
<br />- mpy_cross: fix default path to mpy-cross binary
<br />- mpy_cross: add a way to query the mpy version
<br />- mpy_cross: add list of architectures to `__all__`
<br />- mpy_cross: add docstrings to public methods
<br />- main: don't set a default native architecture
<br />- main: add MSVC-compatible architecture checks
<br />- force forward slashes in paths
<br />- main: fix return type of mp_import_stat</p>
<p>lib:
<br />- cyw43-driver: add new submodule for CYW43xx WiFi driver
<br />- pico-sdk: update to version 1.4.0
<br />- cyw43-driver: update cyw43-driver to fix ap_auth mode setting
<br />- tinyusb: update to the most recent master
<br />- cyw43-driver: update driver to latest version
<br />- micropython-lib: add micropython-lib as a submodule
<br />- lwip: update lwIP to v2.1.3, tag STABLE-2_1_3_RELEASE
<br />- micropython-lib: update to latest version with manifest changes
<br />- micropython-lib: update submodule to latest
<br />- stm32lib: update library to get L1 v1.10.3, and some other fixes
<br />- micropython-lib: update submodule to latest
<br />- btstack: update to v1.5.3
<br />- micropython-lib: update submodule to latest
<br />- libm: use __asm__ instead of asm
<br />- btstack: update to v1.5.4
<br />- cyw43-driver: update driver to latest version
<br />- re1.5: reduce code size when checking for named class char
<br />- re1.5: add support for named classes in class sets
<br />- micropython-lib: update submodule to latest
<br />- cyw43-driver: update driver to latest version
<br />- pico-sdk: update to version 1.5.0
<br />- cyw43-driver: update driver to latest version v0.9.0
<br />- micropython-lib: update submodule to latest
<br />- stm32lib: update library to get H7 v1.11.0
<br />- cyw43-driver: update driver to latest version v1.0.0
<br />- micropython-lib: update submodule to latest</p>
<p>Support components
<br />==================</p>
<p>docs:
<br />- update to use new WLAN argument names for ssid/security/key
<br />- library/pyb.Timer: document `brk` argument and its constants
<br />- library: remove unnecessary "pyb." prefix on class names
<br />- set LaTeX engine to XeLaTeX for PDF generation
<br />- library/machine: add note on interrupts being critical to system
<br />- library/uasyncio: consistently use "uasyncio" instead of "asyncio"
<br />- library/bluetooth: add link to aioble
<br />- library/neopixel: add note that neopixel is included in rp2 builds
<br />- library/time: provide more info about which epoch is used
<br />- library/pyb.Pin: fix out-of-context paragraphs, and AF_PP typo
<br />- library/pyb.Pin: add Pin.ALT constant
<br />- library/pyb.Timer: document how to use BKIN pin with example
<br />- update links for Arm GCC toolchain
<br />- library/rp2: fix pull_thresh docs to use pull instead of push
<br />- esp32: fix string quoting consistency in SDCard mount example
<br />- update CPython differences and improve the look of table layouts
<br />- esp32: update UART quickref on input-only pins
<br />- library/machine.UART: add notes about UART init and deinit
<br />- library: fix nested rst styles not rendering
<br />- library/micropython: fix spelling of compiler
<br />- templates/topindex.html: update forum link
<br />- library/machine.I2C: add a note about I2C pull-up resistors
<br />- library/machine.UART: add docs for uart.flush() and uart.txdone()
<br />- renesas-ra: add pin drive keyword argument description
<br />- Makefile: enable parallel compilation for Sphinx
<br />- templates/layout.html: indicate latest vs release docs
<br />- samd: add documentation for the samd port
<br />- library/machine: add machine.memX to docs with brief example
<br />- samd/pinout: fix the pin numbering for the default assignments
<br />- develop: fix mp_compile snippet to match latest code
<br />- renesas-ra: correct the internal file system size of EK-RA6M2
<br />- library/array: add docs for dunder methods
<br />- library/pyb.CAN: update the recv example to take a 5-tuple
<br />- library/uasyncio: describe restriction on ThreadSafeFlag
<br />- library/framebuf: clarify docs for blit regarding palette
<br />- library/struct: fix buffer argument description
<br />- library/struct: embed format tables
<br />- library/neopixel: update GitHub URL for neopixel.py link
<br />- differences: update Python 3.9 status
<br />- differences: add Python 3.10 page
<br />- rp2: make LED have exactly 50% duty cycle in PIO 1Hz example
<br />- library/rp2.StateMachine: expand put() documentation
<br />- library/socket: use correct sockaddr variable name
<br />- esp32/quickref: add docs for the LAN interface constructor
<br />- library/machine.Timer: add freq argument to machine.Timer
<br />- reference/constrained: add missing heap-dump symbols to mem_info()
<br />- zephyr/quickref: fix zsensor module usage examples
<br />- library/network: update docs for network.country, network.hostname
<br />- update copyright year range to include 2023</p>
<p>examples:
<br />- embedding: remove obsolete axtls build target
<br />- usercmodule: add example of a native C class
<br />- embedding: rework example to use ports/embed
<br />- rp2: add comment that examples using IO25 don't work on Pico W
<br />- bluetooth: fix check for _conn_handle being None
<br />- usercmodule/cexample: use mp_obj_malloc()
<br />- bluetooth/ble_temperature_central.py: remove service tuple</p>
<p>tests:
<br />- extmod: add heap-lock test for stream writing
<br />- basics: add tests for __name__ and __globals__ attrs on closures
<br />- perf_bench: add some configurations for N=32, M=10
<br />- add an explanation of run-perfbench.py
<br />- fix run-perfbench parsing "no matching params" case
<br />- micropython: add test for builtin execfile() function
<br />- extmod/ussl_basic: make test run on axtls and mbedtls
<br />- cpydiff: fix formatting of code snippet to use double quotes
<br />- run-tests.py: provide better default MPYCROSS value for Windows
<br />- extmod/ubinascii: add tests for bytes.hex etc
<br />- update path to unix micropython executable
<br />- unicode: add test for invalid utf-8 file contents
<br />- renesas-ra: update pin test to support all boards
<br />- extmod/uasyncio_heaplock.py: force SKIP on stackless
<br />- frozen: move frozentest.mpy from ports/ to tests/
<br />- run-multitests: extend usage information
<br />- run-multitests: make paths more deterministic
<br />- allow 'special' tests to output "SKIP" on a single line
<br />- extmod: add test for sleep_ms value that overflows ticks
<br />- run-perfbench: support --heapsize argument and pass to executable
<br />- basics: add exp file for builtin_str_hex test
<br />- run-tests.py: use host arch for mpy-cross for target=unix
<br />- misc: add test for cexample module
<br />- misc/cexample_module: test class presence
<br />- misc/cexample_class: fix timing sensitivity
<br />- extmod/framebuf_scroll: add tests for FrameBuffer scrolling
<br />- unix/mod_os: add test for os module
<br />- extmod/ure_namedclass: add tests for named classes in class sets
<br />- float: skip new complex tests if complex unavailable
<br />- extmod: get DecompIO test running on low-memory targets
<br />- extmod: skip vfs tests if target doesn't have enough memory
<br />- micropython: split viper_misc test into two files
<br />- float: add domain checks for log and also -inf
<br />- float: make output of math function tests more readable
<br />- run-multitests.py: add ability to test instance over reboot
<br />- multi_bluetooth: add bluetooth multi-test for deepsleep
<br />- run-multitests.py: support outputting test metrics
<br />- multi_bluetooth: use multitest.output_metric in BLE perf tests
<br />- extmod/vfs_fat_ilistdir_del.py: use 512-byte erase block size
<br />- multi_bluetooth: use time.sleep_ms instead of time.sleep
<br />- multi_bluetooth/ble_mtu: split peripheral/central-initiated
<br />- multi_bluetooth/ble_subscribe: use end_handle in desc discovery
<br />- multi_bluetooth: add test for descriptors
<br />- multi_bluetooth/ble_characteristic.py: add write-no-response
<br />- multi_bluetooth: use multitest.broadcast instead of sleep</p>
<p>tools:
<br />- metrics.py: add mimxrt and renesas-ra to list of available ports
<br />- ci.sh: drop ppa requirement for code formatting CI
<br />- pyboard.py: add verbose option to filesystem_command
<br />- mpremote: don't be verbose when using cat command
<br />- autobuild: add nrf port to autobuild scripts
<br />- ci.sh: initialise submodules for more ports
<br />- ci.sh: force mpy-cross build for samd and teensy
<br />- update path to unix micropython executable
<br />- mpremote: allow + terminator for fs commands
<br />- pyboard.py: add "touch" filesystem command
<br />- mpremote: add "edit" command
<br />- ci.sh: split the stm32 builds for wiznet5k and cc3k
<br />- mpremote: print a nicer error when a filesystem command fails
<br />- pyboard.py: remove implicit fs_put if source starts with ./
<br />- pyboard.py: add fs_cp function for direct device-to-device copy
<br />- mpremote: print nicer errors for unsupported 'cp -r' arguments
<br />- manifestfile.py: add library for working with manifests
<br />- makemanifest.py: update to use mpy_cross module
<br />- manifestfile.py: allow include of directory path
<br />- manifestfile.py: allow require() to specify unix packages
<br />- manifestfile.py: allow manifests to set metadata
<br />- autobuild: use distinct directory for building stm32 variants
<br />- makemanifest.py: force the repo version of the mpy_cross package
<br />- pyboard.py: support Windows pathname separators
<br />- manifestfile.py: add `author` kwarg to metadata()
<br />- manifestfile.py: replace recursive glob with os.walk
<br />- mpremote: simplify dispatch of commands
<br />- mpremote: use argparse for command line parsing
<br />- mpremote: add `mpremote mip install` to install packages
<br />- pyboard.py: handle unsupported fs command
<br />- add note about uncrustify versions
<br />- add pre-commit support
<br />- mpremote: fix argument handling for follow and add help strings
<br />- mpremote: bump version to 0.4.0
<br />- verifygitlog.py: ignore comment lines in commit messages
<br />- verifygitlog.py: add additional help for subject line issues
<br />- mpremote: handle FileNotFound exceptions in listdir
<br />- mpremote: make RemoteFile objects iterable
<br />- makemanifest.py: fix printing of mpy_cross.CrossCompileError
<br />- gen-cpydiff.py: use os.path.join and os.path.isdir
<br />- gendoc.py: remove unused script
<br />- ci.sh: add ARDUINO_NANO_RP2040_CONNECT to rp2 CI build
<br />- ci.sh: remove one build from zephyr CI to speed it up
<br />- ci.sh: don't print python2 version
<br />- mpremote: allow EDITOR environment variable to work on Windows
<br />- mpremote: only auto connect to serial device with USB VID/PID
<br />- autobuild: create .uf2 file for seeed_xiao_nrf52
<br />- pyboard.py: fix Python 2 compatibility
<br />- pyboard.py: add parse kwarg to eval
<br />- pyboard.py: add fs_{listdir,readfile,writefile,stat}
<br />- pyboard.py: set DTR on Windows to avoid ESPxx hard reset
<br />- mpy-tool.py: initialize line_info_top
<br />- ci.sh: install pkg-config for macos builds
<br />- ci.sh: add unix, stm32 and rp2 ports to code size check
<br />- mpremote: use hatch to build mpremote package
<br />- pyboard.py: use '/' exclusively when dealing with paths
<br />- pyboard.py: fix joining of path in filesystem_command
<br />- pyboard.py: fix ESPxx boards hanging in bootloader after reset
<br />- manifestfile.py: add support for publishing packages to PyPI
<br />- mpremote: add ctrl-x as additonal mpremote disconnect shortcut</p>
<p>CI:
<br />- ISSUE_TEMPLATE: make minor improvements to placeholder text
<br />- ISSUE_TEMPLATE: replace forum with Discussions
<br />- workflows: print test failures for webassembly workflow
<br />- workflows: bump actions/checkout to v3
<br />- add dependabot to update GitHub Actions
<br />- workflows: bump codecov/codecov-action from 1 to 3
<br />- workflows: bump actions/setup-python from 1 or 2 to 4
<br />- workflows: run unix port workflow if mpy-cross changes
<br />- workflows: use ubuntu-20.04 when python2 is required
<br />- workflows: run mpy-format CI when tests and examples change
<br />- workflows: comment on code size change instead of failing CI
<br />- workflows: fix code size comment workflow for non-PR
<br />- workflows: cancel when branch is updated
<br />- workflows: update existing comments for code_size_comment
<br />- workflows/code_size: print code size change
<br />- workflows: add "shared/**" to list of paths that trigger CI
<br />- workflows: add workflow to build mpremote wheel
<br />- workflows: bump actions/setup-python from 1 to 4
<br />- workflows: bump actions/checkout from 2 to 3
<br />- workflows: bump actions/upload-artifact from 2 to 3</p>
<p>The ports
<br />=========</p>
<p>all ports:
<br />- adapt mimxrt, nrf and rp2 ports to work with latest TinyUSB
<br />- fix a few typos in comments
<br />- remove unused mp_type_{fileio/textio} macros in mpconfigport.h
<br />- always include debug information in the ELF
<br />- always append to GIT_SUBMODULES
<br />- use micropython-lib version of drivers in manifests
<br />- make generated pin.c handling more consistent across ports
<br />- make all network-capable boards use bundle-networking
<br />- make BOARD default from BOARD_DIR in Makefile's
<br />- rename remaining "Micro Python" to "MicroPython"
<br />- fix MCU tags in Arduino board.json files
<br />- implement simple write polling for stdout</p>
<p>bare-arm port: no changes specific to this component/port</p>
<p>cc3200 port:
<br />- mpconfigport: remove mp_const_user_interrupt
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- fix various array-based compiler warnings
<br />- mods/pybuart: implement uart.flush() and uart.txdone()
<br />- remove unused NIC type customisation</p>
<p>embed port:
<br />- add new "embed" port which builds a simple C package
<br />- fix arguments to mp_raw_code_load_mem</p>
<p>esp8266 port:
<br />- modnetwork: rename WLAN keyword args to ssid/security/key
<br />- mpconfigport: switch to ROM feature level configuration
<br />- mpconfigport: disable MICROPY_PY_UTIMEQ
<br />- rename WLAN dhcp_hostname config to hostname
<br />- boards: enable reverse-special-methods on GENERIC board
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- modnetwork: add support for WLAN.config(protocol=XX) option
<br />- README: update build instructions to match ci.sh
<br />- machine_uart: implement uart.flush() and uart.txdone()
<br />- modmachine: move dht_readinto() to the machine module
<br />- machine_pwm: enable real open drain output on pin driven by PWM
<br />- machine_pin: disable open drain when pin becomes input/output
<br />- modnetwork: add ability to set tx power for WLAN interface
<br />- README: remove notice about port being "experimental"
<br />- use extmod/modnetwork.c instead of port-specific version</p>
<p>esp32 port:
<br />- network_wlan: rename WLAN keyword args to ssid/security/key
<br />- machine_uart: implement the functionality of timeout_char arg
<br />- boards: increase 512 bytes limit on ULP programs to 2040
<br />- modesp32: add wake_on_ulp() so ULP can wake CPU from deepsleep
<br />- network_wlan: don't raise exception when scan returns no results
<br />- rename WLAN dhcp_hostname config to hostname
<br />- modmachine: fix machine.freq to allow maximum 160MHz on ESP32-C3
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- mpconfigport: enable BLE synchronous events and pairing/bonding
<br />- Makefile: force micropython-lib as a required submodule
<br />- network_wlan: use esp_wifi_set/get_channel to config wifi channel
<br />- network_wlan: add support to set/get the wifi protocol
<br />- modnetwork: add network.MODE_LR constant
<br />- machine_uart: change sendbreak time to be at least 15 bit times
<br />- machine_timer: support all init arguments in Timer constructor
<br />- boards: merge manifest_release modules into standard manifest
<br />- machine_sdcard: free SPI bus when deiniting SD card
<br />- machine_uart: implement uart.flush() and uart.txdone()
<br />- mphalport: fix calculation of large sleep by using 64-bit arith
<br />- Makefile: add link to build troubleshooting on failure
<br />- modsocket: use mp_obj_is_integer to test port type
<br />- machine_pwm: don't use LEDC_USE_REF_TICK on ESP32-C3 variants
<br />- machine_i2s: add I2S finaliser which calls deinit()
<br />- machine_hw_spi: use auto DMA channel on S2, S3, C3 chips
<br />- rename machine I2C and SPI types consistently across ports
<br />- machine_i2c: fix clocks and timeouts for ESP32-C3, ESP32-S3
<br />- machine_pin: fix size of machine_pin_irq_handler array
<br />- machine_pwm: verify PWM is active when config methods are called
<br />- add 32MiB partition table templates
<br />- usb: add a timeout to usb_tx_strn()
<br />- modmachine: move dht_readinto() to the machine module
<br />- boards/GENERIC_S3_SPIRAM: enable BLE support
<br />- boards/GENERIC_S3_SPIRAM: enable BLE
<br />- machine_timer: fix ESP32C3 timer period doubling
<br />- machine_touchpad: fix TouchPad for ESP32S2, ESP32S3
<br />- main: don't call usocket_events_deinit if unavailable
<br />- usb: cleanup connection detection
<br />- boards/GENERIC_S3_SPIRAM_OCT: add ESP32S3 board with Octal SPIRAM
<br />- network_lan: add support for LAN8710 PHY
<br />- network_lan: support configuration of ETH ref_clk pin
<br />- network_lan: add support for SPI-based ethernet chips
<br />- network_lan: fix setting MAC address of ethernet devices
<br />- network_lan: fix compilation on IDF lower than v4.4
<br />- machine_sdcard: change dma_channel to SPI_DMA_CH_AUTO for ESP32S3
<br />- boards: add board definition for Olimex ESP32 PoE boards
<br />- boards/GENERIC_UNICORE: add board definition for unicore chips
<br />- network_lan: add support for Ethernet PHY KSZ8081
<br />- add a small delay before leaving wlan.active()
<br />- boards/OLIMEX_ESP32_POE: remove id from and update board.json
<br />- Makefile: allow specifying BOARD_DIR on make command line
<br />- use extmod/modnetwork.c instead of port-specific version
<br />- machine_pin: use const for size of machine_pin_irq_handler array
<br />- esp32_rmt: fix looping behaviour for RMT on ESP32-S3</p>
<p>mimxrt port:
<br />- Makefile: refactor Makefile and divide it into sections
<br />- Makefile: modify handling of SDRAM option
<br />- Makefile: modify handling of SDCARD option
<br />- Makefile: rework board flash type handling
<br />- Makefile: rework floating point config
<br />- Makefile: fix some minor formatting inconsistencies
<br />- boards: remove conditional assignment of flash type/size
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- machine_uart: implement uart.flush() and uart.txdone()
<br />- machine_uart: drop a few commented lines about TX ring buffer
<br />- format the firmware image to match the new teensy loader
<br />- machine_spi: allow a setting of -1 for cs in the constructor
<br />- machine_uart: set the UART ioctl write poll flag properly
<br />- machine_uart: fix a bug in UART.write()
<br />- Makefile: split up SRC_C variables
<br />- machine_pin: add the Pin.toggle() method
<br />- fix CPU freeze when calling __WFE() in MICROPY_EVENT_POLL_HOOK
<br />- machine_timer: use soft-timer implementation for machine.Timer
<br />- machine_timer: use extmod version of machine.Timer
<br />- mphalport: add a timeout to mp_hal_stdout_tx_strn()
<br />- modmachine: move dht_readinto() to the machine module
<br />- add support for MIMXRT1176 MCUs, and MIMXRT1170_EVK board
<br />- README: add build and flashing instructions
<br />- usb: change macro name MICROPY_HW_USB_STR_MANUF
<br />- network: rename the argument clock_mode to ref_clk_mode
<br />- Makefile: set MPY_CROSS_FLAGS
<br />- mpconfigport: remove config options that are set by default
<br />- machine_rtc: set the microsecond value to 0
<br />- sdcard: fix an error when writing large blocks
<br />- sdcard: remove obsolete code already excluded by preprocessor
<br />- set MICROPY_GC_STACK_ENTRY_TYPE to uint32_t for large RAM
<br />- Makefile: move the FROZEN_MANIFEST setting after board config
<br />- enable ROM text compression
<br />- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
<br />- pendsv: clean up PendSV code
<br />- Makefile: fix internal flash configuration and build
<br />- boards/MIMXRT1064_EVK: fix board config to use internal flash
<br />- mpconfigport: allow configuring different network interfaces
<br />- modmachine: implement machine.bootloader()
<br />- fix the build for boards without ROM API</p>
<p>minimal port:
<br />- Makefile: avoid terminal reset, use BUILD variable
<br />- Makefile: set linker to $(CC)
<br />- increase heap size for Linux builds</p>
<p>nrf port:
<br />- main: add startup and early-init board hook macros
<br />- modmachine: add machine.bootloader() and make it customisable
<br />- enable optional support for Arduino 1200bps touch
<br />- Makefile: drop unused MPY_CROSS and MPY_TOOL variables
<br />- boards/arduino_nano_33_ble: add Arduino Nano 33 BLE sense board
<br />- modmachine: add machine.idle() function
<br />- mpconfigport: remove obsolete module declarations
<br />- drivers/bluetooth: handle PHY_UPDATE messages, used in Bluetooth 5
<br />- drivers/usb: probe for interrupt char in USB CDC task
<br />- drivers/usb: add a tud_cdc_rx_cb() callback to check interrupt char
<br />- mpconfigport: call tud_task() in MICROPY_EVENT_POLL_HOOK
<br />- drivers/usb: fix reading of a single USB CDC character
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- boards/arduino_nano_33_ble_sense: update deploy instructions
<br />- main: call usb_cdc_init() before executing boot.py and main.py
<br />- modules/ubluepy: use mp_obj_str_get_data to extract str data
<br />- don't enable debug info by default if LTO is on
<br />- modules/machine/uart: implement uart.flush() and uart.txdone()
<br />- Makefile: split up SRC_C variables
<br />- rename machine I2C, PWM, SPI, UART types consistently across ports
<br />- rename MICROPY_PY_MACHINE_TIMER to MICROPY_PY_MACHINE_TIMER_NRF
<br />- boards/seeed_xiao_nrf52: add defn for Seeed XIAO NRF52840 Sense
<br />- mpconfigport: enable seeding of the PRNG by the hardware RNG
<br />- Makefile: add support for BOSSAC flasher
<br />- boards/arduino_nano_33_ble_sense: add support for REV-2 chipset
<br />- modules/machine/pwm: add paramter checks and error messages
<br />- modules/machine/pwm: use extmod/machine_pwm.c for PWM module
<br />- modules/machine/soft_pwm: add PWM for nrf51x boards using soft PWM
<br />- modules/machine/pwm: support using all 4 channels of a PWM module
<br />- modules/machine/uart: add timeout keyword options and "any" method
<br />- nrfx_config: use the UARTE definitions and drivers for the NRF52xx
<br />- modules/machine: use a dedicated function for machine.idle()
<br />- modules/machine: support the freq=n argument for machine.I2C
<br />- modules/machine/pwm: fix resource conflict, and change id to device
<br />- nrfx_config: use UARTE for nrf52xxx devices
<br />- modules/machine/uart: prevent UART lock-up after a receive error</p>
<p>pic16bit port:
<br />- pic16bit_mphal: use MP_REGISTER_ROOT_POINTER()</p>
<p>powerpc port: no changes specific to this component/port</p>
<p>qemu-arm port: no changes specific to this component/port</p>
<p>renesas-ra port:
<br />- modmachine: allow boards to provide custom bootloader code
<br />- machine_i2c: remove unnecessary start/stop dummy functions
<br />- mpconfigport: drop pyb_hid_report_desc root pointer
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- softtimer: switch to use softtimer code from shared/runtime
<br />- machine_pin: support drive keyword and fix GPIO setting
<br />- rename machine SPI type consistently across ports
<br />- machine_timer: use extmod version of machine.Timer
<br />- boards: update linker script to detect code flash overflow
<br />- disable debugging option for RA4 to reduce code size
<br />- change file system size to 64KB for RA6M1
<br />- add the UART methods uart.txdone() and uart.flush()</p>
<p>rp2 port:
<br />- modmachine: allow boards to provide custom bootloader code
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: enable Arduino 1200bps touch
<br />- modmachine: implement lightsleep() with optional sleep period
<br />- mpthreadport: ensure core1 doesn't hold gc lock in deinit
<br />- mbedtls: enable some more mbedtls options
<br />- lwip_inc: enable lwIP status callback
<br />- rp2_flash: add asserts for size of flash filesystem partition
<br />- mpnetworkport: convert network task scheduling to use PendSV IRQ
<br />- integrate CYW43xx WiFi driver
<br />- boards/PICO_W: add new Pico W board, an RP2040 with WiFi
<br />- boards/GARATRONIC_PYBSTICK26_RP2040: change pico-sdk board name
<br />- main: set default AP auth mode to WPA2_AES_PSK
<br />- mpconfigport: factor core event handling to EVENT_POLL_HOOK_FAST
<br />- Makefile: regenerate cmake if generated Makefile missing
<br />- CMakeLists: give error if required submodules are missing
<br />- CMakeLists: don't override cyw43-driver unless necessary
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: add urequests module
<br />- run USB stack task exclusively from core 0
<br />- make atomic sections suspend the other core (if active)
<br />- mpconfigport: make networking options consistent across boards
<br />- mphalport: fix missing storage_read_blocks symbol in debug build
<br />- CMakeLists: use armv6m mpy-cross arch for rp2
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- mpbthciport: remove mp_bthci_uart from set of root pointers
<br />- cyw43_configport: set CYW43_EVENT_POLL_HOOK value
<br />- cyw43_configport: set CYW43_WIFI_NVRAM_INCLUDE_FILE value
<br />- rp2_pio: fix StateMachine.restart when PIO program is shared
<br />- cyw43_configport: add event hook into cyw43_delay_ms
<br />- Makefile: always use cmake to discover submodules
<br />- mbedtls: enable certificate validity time validation
<br />- machine_spi: add mp_hal_get_spi_obj helper function
<br />- boards/W5500_EVB_PICO: add new board definition for W5500_EVB_PICO
<br />- mark gc_heap NOLOAD for faster boot
<br />- correctly determine path to arm-none-eabi-size
<br />- machine_wdt: check for the maximum timeout value of watchdog
<br />- machine_uart: implement uart.flush() and uart.txdone()
<br />- mbedtls: fix missing time.h include
<br />- rp2_flash: add start/len support to rp2.Flash() constructor
<br />- boards: set PICO_BOARD correctly for each board
<br />- machine_spi: use pico-sdk's default pins for SPI
<br />- machine_i2c: use pico-sdk's default pins for I2C
<br />- boards: remove all I2C,SPI pin defs that already match pico-sdk
<br />- Makefile: add link to build troubleshooting on failure
<br />- Makefile: add support for BOARD_VARIANTS
<br />- boards/WEACTSTUDIO: add WEACTSTUDIO with multiple variants
<br />- fatfs_port: fix the modification date of files
<br />- rename machine I2C type consistently across ports
<br />- mphalport: add a timeout to mp_hal_stdout_tx_strn()
<br />- cyw43_configport: make sure only core0 executes a __WFI()
<br />- modmachine: move dht_readinto() to the machine module
<br />- allow enabling USB device without enabling USB-CDC
<br />- boards/ARDUINO_NANO_RP2040: add more modules and enable MD5 hash
<br />- fix lightsleep to work with interrupts and cyw43 driver
<br />- machine_pwm: use more accurate formulas for freq and duty_u16
<br />- machine_pwm: fix overflows with freq > 268 MHz
<br />- mphalport: change order of pin operations to prevent glitches
<br />- rp2_flash: call MICROPY_EVENT_POLL_HOOK_FAST after reading flash
<br />- machine_pin: refactor the machine.Pin class for external GPIO
<br />- machine_pin: add support for named pins and alternate functions
<br />- boards: add pin CSV files to board definitions
<br />- fix crash in a pin.irq handler
<br />- main: use mp_printf in nlr_jump_fail
<br />- machine_pin: fix configuring OPEN_DRAIN with initial value
<br />- boards/NULLBITS_BIT_C_PRO: add Bit-C PRO board
<br />- rp2_pio: track use of PIO resources and free them on soft reset
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: use default aioble
<br />- mpconfigport: enable os.dupterm and hashlib.sha1 on all boards
<br />- cyw43_configport: specify the chipset firmware include file
<br />- Makefile: allow specifying BOARD_DIR on make command line
<br />- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: include "time" in manifest
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: add more external pins
<br />- boards/ARDUINO_NANO_RP2040_CONNECT: include "senml" in manifest
<br />- modrp2: support reading the BOOTSEL button on the Pico board
<br />- modrp2: disable other core, shorten delay to 8us in bootsel_button
<br />- allocate GC heap from unused RAM
<br />- allow disabling USB via MICROPY_HW_ENABLE_USBDEV config
<br />- main: keep UART REPL with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1
<br />- machine_uart: fix setting of UART LCR parameters
<br />- machine_i2c: add timeout parameter for machine.I2C()
<br />- memmap_mp.ld: allow a board to reserve memory for the C heap</p>
<p>samd port:
<br />- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
<br />- remove the existing provisional support for REPL on UART
<br />- boards: replace pins.c and pins.h by pins.csv
<br />- boards: move mcu-specific settings into a mpconfig_samdXX.h file
<br />- Makefile: alphabetically sort the source code files in Makefile
<br />- boards: add ADAFRUIT_FEATHER_M4_EXPRESS and _ITSYBITSY_M0_EXPRESS
<br />- clock_config: set up the clock configuration
<br />- modmachine: allow changing the CPU freq with machine.freq(f)
<br />- mphalport: add pin open-drain funcs, and improve delay and ticks
<br />- samd_isr: extend systick_ms to 64 bit
<br />- machine_pin: add OPEN_DRAIN mode for pins
<br />- machine_pin: allow specifying a pin or LED by its name as a string
<br />- modmachine: enable SoftSPI and SoftI2C
<br />- boards: create pin_af_table.c from pin_af_table_SAMDxx.csv files
<br />- pin_af: add the pin af table and its helper functions
<br />- machine_adc: add the machine.ADC class
<br />- machine_pwm: add the machine.PWM class
<br />- samd_isr: rework the interrupt tables
<br />- machine_pin: add pin.irq() to the machine.Pin class
<br />- modmachine: add disable_irq(), enable_irq() and idle() to machine
<br />- machine_uart: add the machine.UART class
<br />- machine_spi: add the machine.SPI class
<br />- machine_i2c: add the machine.I2C class
<br />- moduos: add uos.dupterm()
<br />- moduos: add uos.urandom() for SAMD51
<br />- main: use the common execution mode of boot.py and main.py
<br />- mpconfigport: enable a few more MicroPython features
<br />- samd_isr: change the way a Sercom ISR is registered and called
<br />- machine_timer: add machine.Timer based on the shared soft-timer
<br />- machine_wdt: add the machine.WDT class
<br />- modsamd: add pininfo() function to the samd module
<br />- machine_led: optimise size of the machine.LED class
<br />- machine_dac: add the machine.DAC class
<br />- modmachine: add machine.time_pulse_us
<br />- mcu: factor out MCU policy for SAMD21 and SAMD51
<br />- mphalport: add a mp_hal_ticks_ms_64() function
<br />- modutime: enable time.time() based on systick_ms()
<br />- machine_uart: support buffered TX for UART
<br />- boards: add missing/lost board config and pin definitions
<br />- mphalport: use CYCCNT for SAMD51's mp_hal_ticks_cpu()
<br />- machine_bitstream: add the machine.bitstream() function
<br />- mpconfigport: restructure to use ROM feature levels
<br />- clock_config: split clock_config.c to separate SAMD21/SAMD51 files
<br />- clock_config: add HW_DFLL_USB_SYNC and HW_MCU_OSC32KULP extensions
<br />- pin_af: simplify the pin-af-table handling
<br />- samd_flash: remove obsolete printf's and return values instead
<br />- Makefile: fix a dependency problem with "make -j"
<br />- mphalport: fix USB endpoint handling ignoring Ctrl-C
<br />- change the symbol names for the peripheral clocks
<br />- mcu: add floating point suport for SAMD21 devices
<br />- mcu: enable the math module on SAMD51
<br />- boards: move the flash filesystem definitions to the linker files
<br />- boards: use the same linker file for all SAMD51x19 variants
<br />- main: initialize readline on start up
<br />- mcu: use lf2s for SAMD51 and lfs1 for SAMD21
<br />- machine_pin: change the printing of Pin and LED objects
<br />- Makefile: split up SRC_C variables
<br />- rename machine I2C type consistently across ports
<br />- clock_config: extend the range of machine.freq()
<br />- clock_config: support changing machine.freq() for SAMD21
<br />- modmachine: add machine.reset_cause()
<br />- boards/SPARKFUN_SAMD51_THING_PLUS: add board files for Thing Plus
<br />- modmachine: add machine.dht_readinto and enable on SAMD51
<br />- mcu/samd51: enable onewire support for SAMD51
<br />- mcu/samd51: enable FAT support for SAMD51
<br />- modmachine: implement machine.lightsleep()
<br />- modmachine: get the bootloader magic address from the lib
<br />- clock_config: document the #defines use in init_clocks()
<br />- machine_uart: implement uart.txdone() and uart.flush()
<br />- mcu: make some settings in mpconfigmcu.h conditional
<br />- machine_rtc: add the machine.RTC class
<br />- clock_config: extend the SAMD51 us-counter to 60 bit
<br />- boards/SEEED_WIO_TERMINAL: declare more pins for SEEED WIO board
<br />- machine_pin: change the pin handling and naming/numbering
<br />- make ADC, DAC, PWM, SPI objects consistent in how they print out
<br />- modmachine: replace the LED class by the Signal class
<br />- boards: rework the pins.csv files
<br />- machine_pwm: serialize fast update of PWM settings
<br />- machine_uart: use a finaliser to tidy up UART on soft reset
<br />- machine_spi: implement spi.deinit() and simplify sercom_deinit_all
<br />- machine_spi: register SerCom objects as root pointers
<br />- modmachine: add machine.softreset()
<br />- machine_timer: use extmod version of machine.Timer
<br />- mcu/samd51: use an additional manifest.py for SAMD51 boards
<br />- README: update README to reflect recent changes to the port
<br />- boards/SEEED_WIO_TERMINAL: enable using the 32kHz crystal
<br />- mphalport: add a timeout to mp_hal_stdout_tx_strn()
<br />- move MCU-specific CFLAGS to mpconfigmcu.mk
<br />- Makefile: set MPY_CROSS_FLAGS
<br />- mpconfigport: support MICROPY_HW_SOFTSPI_MIN_DELAY
<br />- mpconfigport: use __WFE() in MICROPY_EVENT_POLL_HOOK
<br />- avoid under-/overflow in I2C and SPI baudrate calculations
<br />- machine_uart: fix IRQ flag setting and clearing
<br />- machine_uart: simplify machine_uart_any() and machine_uart_read()
<br />- machine_uart: check the UART TX pin assignment
<br />- machine_uart: fix uart.deinit() and save some RAM
<br />- add a vref=num option to the ADC and DAC constructor
<br />- support entering bootloader via USB CDC 1200bps touch
<br />- boards/SEEED_XIAO: rename to SEEED_XIAO_SAMD21
<br />- add Pin.board and Pin.cpu classes to Pin
<br />- boards: clean up comments and some pins in pins.csv files
<br />- mcu: rework the comments in clock_config.c
<br />- mcu: use the FDPLL96M clock for the SAMD21 CPU
<br />- mcu: implement a hardware seed for the SAMD21 random module
<br />- mcu: set the SAMD21 us-counter to 2 MHz for better resolution
<br />- moduos: add uos.urandom() using the phase-jitter rng
<br />- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
<br />- always provide the machine.RTC class</p>
<p>stm32 port:
<br />- modmachine: allow boards to provide custom bootloader code
<br />- modmachine: factor out mboot enter code to a function
<br />- boards/stm32f091xc.ld: allocate space for a small filesystem
<br />- boards/NUCLEO_F091RC: enable LFS1 filesystem
<br />- Makefile: set CSUPEROPT to -Os for F0 and G0 MCUs to save space
<br />- usbd_cdc_interface: add support for Arduino 1200bps touch
<br />- usb: expose USB HID device instance via usbd_hid_get()
<br />- use a separate symbol name for the bootloader state pointer
<br />- Makefile: enable link-time-optimisation via LTO=1 make option
<br />- boards: enable LTO by default on boards with smaller flash size
<br />- Makefile: fix setting of define that enables WIZNET5K driver
<br />- mboot: remove redundant code in mboot_state_change function
<br />- boardctrl: allow boards to override fatal-error handler
<br />- sdram: include boardctrl.h for fatal-error handler
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- Makefile: workaround LTO linker order bug in binutils <2.35
<br />- softtimer: switch to use softtimer code from shared/runtime
<br />- boards/LEGO_HUB_NO6: fix typo in README
<br />- boards/LEGO_HUB_NO6: use named pins
<br />- boards/LEGO_HUB_NO6/appupdate: detect filesystem size at runtime
<br />- boards/LEGO_HUB_NO6/spiflash: pick command type at runtime
<br />- boards/LEGO_HUB_NO6/cc2564: make timer configurable
<br />- boards/LEGO_HUB_NO7: add LEGO Hub No. 7 board definition
<br />- boards/NUCLEO_WB55: add error handling to firmware update scripts
<br />- don't enable debug info by default if LTO is on
<br />- switch Wiznet to use lib/wiznet5k and extmod/network_wiznet5k
<br />- add definitions required for lwIP version of Wiznet NIC
<br />- mphalport: add mp_hal_get_spi_obj() helper function
<br />- sdram: enable MPU for unaligned access on H7 MCUs
<br />- boards: increase mboot region to 32k for WB55 boards
<br />- move board variant config to mpconfigboard.mk
<br />- boardctrl: use HAL_Delay instead of mp_hal_delay_ms
<br />- remove support for CC3000 WiFi driver
<br />- machine_uart: implement uart.flush() and uart.txdone()
<br />- boards/LEGO_HUB_NO6: update manifest to new format
<br />- boards: only freeze LCD160CR driver in PYB board firmware
<br />- adc: make ADCAll.read_channel reject invalid channels
<br />- pyb_i2c: fix pyb.I2C to work with dma=True on F4 MCUs
<br />- timer: fix use of timer channel callback() method on L4 MCUs
<br />- boards: add alternate function list for STM32F446RE
<br />- boards/PYB: fix handling of BOARD_VARIANT selection
<br />- make-stmconst.py: support TypeDef's with a single char prefix
<br />- add support for STM32L1 MCUs
<br />- boards/NUCLEO_L152RE: add NUCLEO-L152RE board support
<br />- rename machine I2C and SPI types consistently across ports
<br />- boards/ARDUINO_PORTENTA_H7: revert to single-precision float
<br />- mbedtls: enable mbedtls certificate time validation
<br />- Makefile: allow overriding the default MBEDTLS_CONFIG_FILE
<br />- boards/ARDUINO_PORTENTA_H7: add custom mbedtls config
<br />- modmachine: move dht_readinto() to the machine module
<br />- spi: downgrade SPIHandle definitions to static
<br />- boards/ARDUINO_PORTENTA_H7: add more modules, I2C1 and SE pin
<br />- usbd_desc: support USB strings on CDC interface descriptors
<br />- Makefile: set MPY_CROSS_FLAGS based on MCU type
<br />- pyb_i2c: fix failing pyb.I2C(dma=True) after receiving 1 byte
<br />- i2c: fix I2C frequency calc so it doesn't exceed requested rate
<br />- adc: fix reading internal ADC channels on L4 MCUs
<br />- adc: fix ADCAll.read_core_temp() on L4 MCUs
<br />- i2c: add hardware I2C implementation for STM32L1
<br />- i2c: add hardware I2C implementation for STM32L4
<br />- mboot: make all mboot sectors erase/write protected
<br />- boards: add missing LPUART macros for H7 HAL
<br />- boards/NUCLEO_F429ZI: enable I2C1 and I2C2 with default pins
<br />- powerctrl: improve standby mode entry code for H7 MCUs
<br />- boards/NUCLEO_F756ZG: add board definition for NUCLEO-F756ZG
<br />- powerctrl: fix build on STM32G0xx and STM32H7Bx MCUs
<br />- boards: consolidate linker snippets to reduce duplication
<br />- Makefile: leave DFU mode after download when using dfu-util
<br />- boards/NUCLEO_H743ZI2: refer to NUCLEO_H743ZI for frozen manifest
<br />- boards/STM32F769DISC: fix building with USE_QSPI_XIP=1
<br />- boards/ARDUINO_PORTENTA_H7: fix macro value check for QSPI
<br />- boards/ARDUINO_PORTENTA_H7: use default aioble
<br />- Makefile: clean up nested if-else to chained if-else-if
<br />- update to use the open-source lib version of cyw43-driver
<br />- boards: update linker scripts now that big_const is gone
<br />- add a default implementation of pyb.country
<br />- cyw43_configport: fix build for boards without an RF switch
<br />- boards/PYBD_SF2: set CYW43 Bluetooth fimrware download baudrate
<br />- cyw43_configport: allow boards to override default resource files
<br />- boards/ARDUINO_PORTENTA_H7: update board config files
<br />- Makefile: include HAL HSEM driver on H747 MCUs
<br />- boards/ARDUINO_NICLA_VISION: add support for Arduino Nicla Vision
<br />- boards/ARDUINO_GIGA: add support for Arduino Giga H7 board
<br />- cyw43_configport: add cyw43_sdio_enable_high_speed_4bit function
<br />- powerctrl: add sleep RCC semaphore management for WB55 MCUs
<br />- powerctrl: disable WB55 BLE before entering deepsleep
<br />- powerctrlboot: provide custom SystemInit for WB55
<br />- powerctrl: don't compile WB helpers on WL MCUs
<br />- boards: include "senml" in manifest for ARDUINO boards
<br />- remove commented-out printf's and debugging code
<br />- main: use mp_printf instead of printf for MPY start-up messages
<br />- i2c: return error code and raise exception if I2C init fails
<br />- spi: return error code and raise exception if SPI init fails
<br />- modmachine: make machine.info print using mp_printf
<br />- extint: make ExtInt.regs print using mp_printf
<br />- pin: make pin_find debug output use mp_printf
<br />- pybthread: make pyb_thread_dump take a printer as its argument
<br />- boards/NUCLEO_H743ZI2: fix MCU tag in board.json file
<br />- mphalport: update HAL version to 1.11.0 to match stm32lib
<br />- add support for STM32H723 MCUs
<br />- boards: add ld and af.csv for H723
<br />- boards/NUCLEO_H723ZG: add new H723 board
<br />- add support for USB on G0 MCUs
<br />- mboot: add support for G0 MCUs
<br />- boards/NUCLEO_G0B1RE: add config for USB and mboot
<br />- boards/ARDUINO_NICLA_VISION: fix incorrect bootloader PID
<br />- flash: fix get_bank function for STM32H750
<br />- cyw43_configport: provide cyw43_hal_pin_config_irq_falling func</p>
<p>teensy port:
<br />- mpconfigport: drop unused root pointers
<br />- teensy_hal: use MP_REGISTER_ROOT_POINTER()</p>
<p>unix port:
<br />- variants: move setting of MICROPY_PY_USELECT to port config file
<br />- variants: enable remaining options on dev,coverage from ROM extra
<br />- variants/coverage: change config to use ROM level everything
<br />- variants/dev: allow all config options to be overridden
<br />- moduos: include errno.h
<br />- main: restore tty settings on nlr_jump_fail()
<br />- alloc: use MP_REGISTER_ROOT_POINTER() for mmap_region_head
<br />- mpconfigport: make MICROPY_EVENT_POLL_HOOK call usleep directly
<br />- mbedtls: add custom config for mbedtls
<br />- mpconfigport: switch ussl from axtls to mbedtls
<br />- Makefile: only include axtls in GIT_SUBMODULES list when enabled
<br />- Makefile: only checkout libffi submodule when used
<br />- mpconfigport: allow overriding MICROPY_EVENT_POLL_HOOK
<br />- enable MICROPY_GC_SPLIT_HEAP on coverage build
<br />- unix_mphal: allow overriding hal time functions
<br />- variants: remove variant suffix from executable filename
<br />- modjni: add missing const qualifier
<br />- remove .gitignore file
<br />- modusocket: support proto and flags arguments to getaddrinfo
<br />- include alloca.h for NetBSD
<br />- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
<br />- variants: remove freedos and fast variants
<br />- refactor mpconfigport.h and mpconfigvariant.h
<br />- refactor mpconfigvariant.mk
<br />- variants/coverage: add test for manifest freeze_mpy()
<br />- enable sys.executable
<br />- Makefile: don't use _MOD variable names
<br />- modffi: move header includes inside MICROPY_PY_FFI guard
<br />- variants: change mip package to mip-cmdline
<br />- coverage: add extra GC coverage test for ATB gap byte
<br />- moduos: implement 2-arg version of os.getenv()
<br />- Makefile: disable building the shared library of libffi
<br />- main: free pathbuf when there's an error opening a file</p>
<p>webassembly port:
<br />- Makefile: remove obsolete disable of array-bounds warning
<br />- rename this port from 'javascript' to 'webassembly'
<br />- mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES
<br />- add support for VFS and enable VFS_POSIX
<br />- use Date's now() instead of getTime()
<br />- change "stack" argument to "heapsize"
<br />- support piping in a program on stdin
<br />- dispatch micropython-print via document not mp_js_stdout
<br />- README: update README to describe new stdout behaviour
<br />- Makefile: change compiler optimisation from O3 to Os
<br />- library: make use of CustomEvent detail property
<br />- library: extract and send data to print as UInt8Array</p>
<p>windows port:
<br />- provide a definition for MP_ALWAYSINLINE
<br />- msvc: support compressed ROM text for error messages
<br />- Makefile: update test dependency on $(PROG)
<br />- make project file read-only for IDE
<br />- .gitignore: simplify by removing build artefacts
<br />- msvc: remove variant suffix from executable filename
<br />- msvc: make mpy-cross independent of micropython variant
<br />- msvc: fix qstr generation dependency
<br />- msvc: fix module freezing</p>
<p>zephyr port:
<br />- update include paths to use the zephyr namespace
<br />- upgrade to Zephyr v3.1.0
<br />- use MP_REGISTER_ROOT_POINTER()
<br />- machine_uart: use mp_obj_str_get_str to get device name
<br />- boards: add config for bbc_microbit_v2
<br />- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
<br />- rename machine I2C and SPI types consistently across ports</p>dpgeorgetag:github.com,2008:Repository/878361717/v1.19.12022-06-17T02:58:09Zv1.19.1: Bug fix for esp32 SoftI2C<p>Bug fix for esp32 SoftI2C</p>
<p>This is a bug fix release. The changes are:</p>
<p>- extmod/machine_i2c: only use WRITE1 option if transfer supports it</p>
<p> This fixes the machine.SoftI2C.readfrom_mem() method on esp32, so it
<br /> writes the address to read from.</p>dpgeorge