tag:github.com,2008:https://github.com/jonfoster/micropython/releases Tags from micropython 2024-02-20T12:20:36Z tag:github.com,2008:Repository/776054618/v1.22.2 2024-02-20T12:20:36Z v1.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> dpgeorge tag:github.com,2008:Repository/776054618/v1.22.1 2024-01-05T02:13:56Z v1.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> dpgeorge tag:github.com,2008:Repository/776054618/v1.23.0-preview 2024-01-02T07:11:41Z v1.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 &lt;damien@micropython.org&gt;</p> dpgeorge tag:github.com,2008:Repository/776054618/v1.22.0 2023-12-27T06:00:39Z v1.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> dpgeorge tag:github.com,2008:Repository/776054618/v1.22.0-preview 2023-10-06T01:10:14Z v1.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 &lt;jim.mussared@gmail.com&gt;</p> jimmo tag:github.com,2008:Repository/776054618/v1.21.0 2023-10-05T23:33:14Z v1.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-&lt;num&gt;-g&lt;hash&gt; (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.&lt;num&gt;.g&lt;hash&gt;. 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 -&gt; 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_ -&gt; 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-&gt;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-&gt;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> dpgeorge tag:github.com,2008:Repository/776054618/v1.20.0 2023-04-26T05:43:11Z v1.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 &gt; to &gt;= <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 &gt; 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 &lt;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> dpgeorge tag:github.com,2008:Repository/776054618/v1.19.1 2022-06-17T02:58:09Z v1.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 tag:github.com,2008:Repository/776054618/v1.19 2022-06-16T05:11:24Z v1.19 <p>New mpy 6 file format with improved bytecode, addition of renesas-ra …</p> <p>…port</p> <p>In this release of MicroPython the .mpy file format has been significantly <br />reworked and bumped to version 6. The new format now contains data and <br />bytecode organised to be mostly static and ready to run in-place. To <br />achieve this, qstr references from bytecode (and native machine code) now <br />go through a lookup table, to convert from local qstr number in the module <br />to global qstr number in the runtime that the module executes within. This <br />means bytecode (and most native code) does not need rewriting when it is <br />imported. Along with this change, the jump opcodes have been optimised to <br />emit 1-byte jump offsets when possible, which gives a good reduction in <br />bytecode size, saving RAM and reducing the size of .mpy files.</p> <p>The change to the bytecode means that code constants (like long strings, <br />bytes objects and floats) are now shared and de-duplicated across the whole <br />module, rather than each code object having a separate constant table. The <br />parser can also now turn a tuple of constants into a constant object, so <br />the tuple doesn't need to be built at runtime each time it is used. <br />Furthermore, any constant object can now be used in "X = const(obj)" <br />statements.</p> <p>With these bytecode changes, .mpy files see around a 10% reduction in size <br />and frozen .mpy code sees about a 5% size reduction. Heap memory use after <br />import is also down by around 5% (more savings are seen if the code uses <br />lots of constants). Due to the qstr indirection performance of the VM is <br />slightly reduced on some benchmarks by a few percent, but the benefits of <br />smaller code and reduced RAM usage are deemed to outweigh this. See commit <br /><a class="commit-link" href="https://github.com/jonfoster/micropython/commit/f2040bfc7ee033e48acef9f289790f3b4e6b74e5"><tt>f2040bf</tt></a> for more details.</p> <p>In the runtime, support has been added for multiple *args and **args in a <br />function call, following PEP 448. Built-in modules can now have (optional) <br />mutable attributes, and this is used to implement sys.ps1/sys.ps2 which <br />allow the user to customise the REPL prompt. This can be useful, for <br />example, to configure a different REPL for different boards so they can be <br />easily distinguished. The sys module has also had the MicroPython git <br />version and build date appended to sys.version, sys.implementation._machine <br />has been added, and sys.implementation.mpy renamed to <br />sys.implementation._mpy. The sys module can now be used to fully identify <br />the MicroPython version and target it is running on (and the platform <br />module provides additional information when it's available).</p> <p>The MP_REGISTER_MODULE macro is now used to register all built-in C modules <br />and the third argument to this macro has been removed. Any user-C-modules <br />will need to be updated. Also support for MICROPY_PORT_BUILTIN_MODULES is <br />removed because this is no longer needed, and should be replaced by usage <br />of MP_REGISTER_MODULE (see commit <a class="commit-link" href="https://github.com/jonfoster/micropython/commit/0a92469c10542d57ef0ea6b6cf2ed0cae9491dbe"><tt>0a92469</tt></a> <br />for example).</p> <p>The MP_REGISTER_MODULE macro is now used to register all built-in C modules <br />and the third argument to this macro has been removed. Also support for <br />MICROPY_PORT_BUILTIN_MODULES is removed because this is no longer needed.</p> <p>mpy-cross now supports the -march=armv6m option, which can be used with the <br />rp2 port. The -mno-unicode has been removed.</p> <p>The littlefs2 library has been updated to v2.5.0 which includes some <br />performance improvements and minor fixes.</p> <p>At the REPL, a tab will now insert an indent when it follows whitespace, <br />and auto-indent is automatically disabled if a space or tab follows an <br />auto-indent. This means that Python code can be pasted into the standard <br />REPL without messing up the indentation.</p> <p>mpremote is now at version 0.3.0, with a progress indicator shown when <br />copying large files, and recursive copy fixed on Windows. It also has the <br />following commands added: --help, --version, version, resume, soft-reset, <br />umount.</p> <p>The esp32 port has a new machine.ADCBlock class and updated ADC class. <br />Fixes have been made to ADC2 channel mapping, low PWM frequencies, <br />UART initialisation of unspecified parameters, and RMT channel on S2/S3/C3 <br />variants. The Pin.PULL_HOLD constant has been replaced by a "hold" keyword <br />argument to the Pic constructor, and it's now possible to configure pin <br />drive strength. I2C write-then-read transfers have been optimised to be <br />faster. WLAN.config() now supports setting/getting the txpower. New <br />boards include LOLIN C3 MINI ESP32-C3, LilyGO LoRa32, and UM ESP32-S3 based <br />boards.</p> <p>The mimxrt port has updated the nxp_driver to v2.10 and fixed USB CDC RX <br />handling to not block. Pin drive constants have been renamed to DRIVE_x to <br />match other ports, and the machine.I2S class has been added. New boards <br />include Olimex RT1010 and MIMXRT1015_EVK.</p> <p>The nrf port now includes uasyncio in the default board manifest, and <br />additional features have been enabled on nrf52840 and nrf9160 boards to <br />match the features on stm32, rp2 and esp32. This includes enabling the <br />json, re, zlib and framebuf modules.</p> <p>There is a new renesas-ra port which targets Renesas RA4M1, RA4W1, RA6M1 <br />and RA6M2 MCUs, with board definitions for evaluation kits for these MCUs, <br />along with RA4M1 clicker. This port currently supports Pin, ADC, SoftI2C, <br />I2C, SoftSPI, SPI, UART, Timer and RTC classes in the machine module, along <br />with the VFS and an internal flash filesystem.</p> <p>The rp2 port now has optional USB MSC support, and optional dupterm <br />support. The machine.UART class has init and deinit methods added, and <br />the ucryptolib module is now available. The lwIP network stack has been <br />integrated, along with mbedtls for the ssl module, and these can be used <br />with the new Wiznet driver to provide Ethernet support. The Wiznet <br />W5100S-EVB-Pico board has been added which makes use of this driver. The <br />day-of-week value reported by time.localtime() has been fixed, memory <br />corruption when a thread is created on core1 has been fixed, and the UART <br />now uses a mutex when reading/writing to prevent character duplication in <br />code that uses both cores.</p> <p>The stm32 port has added support for G0, G4 and WL MCUs. The new boards <br />for these MCUs are NUCLEO_G0B1RE, NUCLEO_G474RE and NUCLEO_WL55. The <br />ARDUINO_PORTENTA_H7 board has also been added, with full WiFi and BLE <br />support. The rfcore on WB55 MCUs has been improved by removing an extra <br />layer of buffering, and the restriction on the use of address resolution <br />has been removed, meaning that the rfcore WS firmware should be updated <br />to v1.12.0 or later; see commit <a class="commit-link" href="https://github.com/jonfoster/micropython/commit/26b1d31eda292d9cd5cfc68f14ce8055256fade8"><tt>26b1d31</tt></a>. <br />The board-level configuration of mboot has been significantly improved to <br />allow more control over system clocks, more hooks into the start up <br />process, and a hook for state change. And the CRC32 of DFU files is now <br />verified before writing them.</p> <p>The pyb.CAN class has been improved to support FD frames and buses with <br />mixed classic/extended-ID nodes, allowing extended IDs to be specified on a <br />per-message basis. CAN.recv also now returns a value indicating if the <br />received message had an extended ID or not. And CAN.initfilterbanks has <br />been removed, replaced with the num_filter_banks keyword argument to <br />CAN.init. These are all breaking changes to the pyb.CAN class API and code <br />will need to be updated accordingly; see commit <br /><a class="commit-link" href="https://github.com/jonfoster/micropython/commit/5cdf9645711cc12b45e602ef5795c33895116fc4"><tt>5cdf964</tt></a> for details.</p> <p>The unix port now shows compiler information in the REPL banner to make it <br />consistent with how bare-metal ports work, and the "-X realtime" <br />command-line option has been added for macOS to get improved timing. All <br />variants have switched to use the VFS subsystem, and use the VfsPosix class <br />for mounting the host's filesystem. The os module has been consolidated <br />with all other ports and the minimal and standard variants gain the unlink, <br />chdir, getcwd and listdir functions.</p> <p>The windows port has also switched to the VFS subsystem and VfsPosix. It <br />adds support for micropython.schedule and uasyncio on the dev variant. And <br />BCryptGenRandom has been used to implement os.urandom.</p> <p>The zephyr port upgraded Zephyr to v3.0.0.</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: +792 +1.394% <br /> minimal x86: +2091 +1.286% <br /> unix x64: +10231 +1.995% <br /> unix nanbox: +9777 +2.162% <br /> stm32: +184 +0.047% PYBV10 <br /> cc3200: +904 +0.493% <br /> esp8266: -1240 -0.177% GENERIC <br /> esp32: +6464 +0.425% GENERIC <br /> nrf: +11288 +6.472% pca10040 <br /> rp2: +14432 +2.929% PICO <br /> samd: +1352 +0.970% ADAFRUIT_ITSYBITSY_M4_EXPRESS</p> <p>The changes that dominate these numbers are: <br />- bare-arm, minimal, cc3200, samd: reworked bytecode and mpy format, <br /> optimisation of jump opcodes to use 1-byte offsets, de-duplication of <br /> constants at the module level, and PEP 448 support <br />- unix: switching to use VFS, and new mpy format and related changes <br />- esp8266: removal of esp.info and machine.WDT.deinit <br />- esp32: addition of machine.ADCBlock, and new mpy format changes <br />- nrf: enabling uasyncio, enabling MICROPY_PY_IO <br />- rp2: enabling ucryptolib with mbedtls</p> <p>Note that the stm32 port's size remained roughly unchanged. This is <br />because it has a decent amount of frozen Python code and the reduction in <br />frozen code size due to the reworked bytecode has offset the increase in <br />runtime/VM size due to this change. Ports like bare-arm, minimal, cc3200 <br />and samd do not have any frozen code so only see the increase in runtime/VM <br />size. Production-level projects that have a significant amount of frozen <br />code have seen around a 4% overall reduction in their firmware size.</p> <p>Thanks to everyone who contributed to this release: Algy Tynan, Andrew <br />Leech, Andrew Scheller, Artyom Skrobov, Asensio Lorenzo Sempere, Bradley <br />Wogsland, Cem Eliguzel, Chris Wilson, Christian Decker, Christian Zietz, <br />Christophe Priouzeau, Clayton Mills, Damien George, Daniel Jour, Daniël van <br />de Giessen, Dave Hylands, David Lechner, Emil Kondayan, Herwin Grobben, <br />iabdalkader, IhorNehrutsa, Jan, Jared Hancock, jason, Jeff Epler, Jeremy <br />Herbert, Jim Mussared, Jon Bjarni Bjarnason, Jonathan Hogg, Jos Verlinde, <br />Kattni Rembor, Lars Kellogg-Stedman, Luiz Brandao, marcidy, Martin Fischer, <br />Maureen Helm, Meriç SARIIŞIK, Michael Himing, Michael O'Cleirigh, <br />MikeTeachman, Peter D. Gray, Peter Hinch, Peter Züger, Phil Howard, Philipp <br />Ebensberger, Rob Knegjens, robert-hh, Sean Coates, Seon Rozenblum, Stephane <br />Smith, stijn, Takeo Takahashi, ubi de feo, Waterlens, wemos, YoungJoon <br />Chun, Yukai Li.</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 MICROPY_OBJ_REPR_D compilation with msvc <br />- update Python formatting to latest Black version 22.1.0 <br />- use mp_obj_malloc everywhere it's applicable <br />- reformat remaining C code that doesn't have a space after a comma <br />- remove third argument to MP_REGISTER_MODULE <br />- rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K</p> <p>py core: <br />- objstr: support '{:08}'.format("Jan") like Python 3.10 <br />- modmath: add math.tau, math.nan and math.inf constants <br />- qstr: separate hash and len from string data <br />- qstr: use `const` consistently to avoid a cast <br />- gc: update debug code to compile with changes to qstr pool types <br />- rework bytecode and .mpy file format to be mostly static data <br />- bc.h: fix C++ compilation of public API <br />- objmodule: support delegating failed attr lookups <br />- modsys: add optional attribute delegation <br />- modsys: add optional sys.tracebacklimit attribute <br />- modsys: add optional mutable attributes sys.ps1/ps2 and use them <br />- parse: simplify handling of const int parse nodes <br />- parse: put const bytes objects in parse tree as const object <br />- parse: handle check for target small-int size in parser <br />- showbc: remove global variables and make DECODE_PTR work correctly <br />- smallint: introduce MP_SMALL_INT_BITS macro <br />- objgenerator: fix unused variables when native gen extracts prelude <br />- change jump opcodes to emit 1-byte jump offset when possible <br />- emitbc: add check for bytecode jump offset overflow <br />- change jump-if-x-or-pop opcodes to have unsigned offset argument <br />- builtinimport: alias sys to usys if import weak links aren't enabled <br />- bc.h: fix C++20 compilation with "volatile" <br />- compile: only show raw code that is bytecode <br />- asmxtensa: fix use of l32i/s32i when offset won't fit in encoding <br />- emitnative: don't store prelude at end of machine code if not needed <br />- vm: prevent array bound warning when using -MP_OBJ_ITER_BUF_NSLOTS <br />- runtime: allow multiple **args in a function call <br />- runtime: allow multiple *args in a function call <br />- runtime: do not overallocate when len is known <br />- runtime: drop new_alloc &lt; 4 check <br />- runtime: use size_t/ssize_t instead of uint/int <br />- emitbc: assert that a small int fits its encoding when emitting one <br />- fix compiling and decoding of *args at large arg positions <br />- runtime: remove unnecessary check for kw_value == MP_OBJ_NULL <br />- makeqstrdefs: cleanup and extend source file classification <br />- emitinlinethumb: use 16 bit encodings for PUSH LR and POP PC <br />- scheduler: add support for scheduling static C-based callbacks <br />- emitnative: revert "don't store prelude at end of machine code if..." <br />- persistentcode: define enum values for obj types instead of letters <br />- parse: factor obj extract code to mp_parse_node_extract_const_object <br />- parse: print const object value in mp_parse_node_print <br />- parse: add MICROPY_COMP_CONST_TUPLE option to build const tuples <br />- persistentcode: support loading and saving tuples in .mpy files <br />- objtype: convert result of user __contains__ method to bool <br />- modsys: append MicroPython git version and build date to sys.version <br />- modsys: rename sys.implementation.mpy to sys.implementation._mpy <br />- modsys: introduce sys.implementation._machine constant <br />- emitcommon: don't implicitly close class vars that are assigned to <br />- obj: introduce mp_obj_malloc macro to allocate, and set object type <br />- objfloat: explain why mp_obj_malloc isn't used <br />- malloc: introduce m_tracked_calloc, m_tracked_free functions <br />- objmodule: move stray #include to top of file <br />- persistentcode: remove obsolete comment about qstr window size <br />- persistentcode: remove unicode feature flag from .mpy file <br />- asmx64: support full range of regs in asm_x64_lea_disp_to_r64 <br />- bc: provide separate code-state setup funcs for bytecode and native <br />- emitnative: put a pointer to the native prelude in child_table array <br />- compile: allow new qstrs to be allocated at all compiler passes <br />- compile: de-duplicate constant objects in module's constant table <br />- parse: allow all constant objects to be used in "X = const(o)" <br />- makemoduledefs.py: allow multiple ways to register a module <br />- make builtin modules use MP_REGISTER_MODULE <br />- remove support for MICROPY_PORT_BUILTIN_MODULES <br />- asmthumb: fix PC relative load by sign extending the constant <br />- emitnative: simplify generation of code that loads prelude pointer <br />- emitnative: provide dedicated local for exception unwind handler ptr <br />- asmthumb: fix offset variable name in ldr, ldrh and strh functions <br />- asmthumb: add asm_thumb_ldrh_reg_reg_i12_optimised() helper func <br />- asmarm: add asm_arm_ldrh_reg_reg_offset() helper func <br />- asm: add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset <br />- emitnative: access qstr values using indirection table qstr_table <br />- asmthumb: make ARMv7-M instruction use dynamically selectable <br />- persistentcode: select ARMV6M as maximum when __thumb2__ not defined <br />- dynruntime.mk: add basic support for armv6m architecture <br />- asmthumb: provide implementations of clz/ctz for msvc <br />- builtin: clean up and simplify import_stat and builtin_open config <br />- emitinlinethumb: make ARMv7-M instruction use dynamically selectable <br />- emitinlinethumb: make float instruction use dynamically selectable <br />- change makemoduledefs process so it uses output of qstr extraction <br />- persistentcode: remove remaining native qstr linking support <br />- bc: remove unused mp_opcode_format function <br />- compile: give the compiler a hint about num nodes being non-zero <br />- makemoduledefs.py: remove shebang line and adjust style of comment <br />- parse: work around xtensa esp-2020r3 compiler bug <br />- dynruntime: add macros to create a new dict and store to dicts <br />- dynruntime: add macros to access more types and mp_const_empty_bytes <br />- makemoduledefs.py: emit useful error for legacy MP_REGISTER_MODULE</p> <p>extmod: <br />- network_ninaw10: implement MP_STREAM_POLL in ioctl <br />- modusocket: make setsockopt return if NIC is not connected <br />- modusocket: add makefile() method and common socket options <br />- modusocket: create new sockets in blocking mode <br />- modusocket: support additional args to getaddrinfo <br />- machine_i2c: increase default SoftI2C timeout to 50ms <br />- modubinascii: add newline keyword to b2a_base64 function <br />- moduplatform: move platform PP definitions into a header <br />- moduzlib: fix parsing zlib header dict size <br />- moduos: create general uos module to be used by all ports <br />- modure: set subject begin_line so ^ doesn't match interior <br />- uasyncio: allow task state to be a callable <br />- uasyncio: fix gather cancelling and handling of exceptions <br />- extmod.cmake: add micropy_lib_mbedtls component <br />- modusocket: implement optional socket.listen backlog argument <br />- modusocket: provide config macro for socket.listen backlog deflt <br />- uasyncio: make Python Task match C version with use of asserts <br />- uasyncio: fix bug with task ending just after gather is cancel'd <br />- uasyncio: rename and merge TaskQueue push/pop methods <br />- move font_petme128_8x8.h from ports/stm32 to extmod <br />- make extmod modules use MP_REGISTER_MODULE <br />- make port-included extmod modules use MP_REGISTER_MODULES <br />- revert accidental usocket-&gt;socket rename <br />- webrepl: fix setting password in foreground mode and factor code <br />- modusocket: fix polling of a new socket <br />- modusocket: bind unconnected socket to default NIC in setsockopt <br />- modusocket: fix errcode returned from socket read/write <br />- modusocket: add socket type print function <br />- modusocket: add support for socket events callback <br />- modusocket: fix socket_make_new argument parsing <br />- modusocket: add timeout and callback to socket object <br />- modusocket: add sendall function <br />- network_ninaw10: add support for socket events callback <br />- machine_i2c: add optional support for write-then-read transfers <br />- uasyncio: fix edge case for cancellation of wait_for <br />- nimble: add support for reading whole HCI UART packets <br />- network_wiznet5k: add Wiznet Ethernet network interface <br />- modussl_mbedtls: poll EVENT_POLL_HOOK in ssl handshake loop <br />- modurandom: fix missing void in empty argument list <br />- extmod.cmake: require components to be explicitly enabled <br />- modusocket: add socket state to track new/listening/conn/closed <br />- modusocket: fix polling of closed sockets <br />- extmod.cmake: fix hard-coded mbedtls config file path</p> <p>shared: <br />- readline: make tab insert an indent when it follows whitespace <br />- readline: disable auto-indent if space/tab follows added indent</p> <p>drivers: <br />- ninaw10: add function to check socket state/data availability <br />- ninaw10: fix timeout handling to match modusocket <br />- ninaw10: return standard error numbers <br />- ninaw10: add NIC-level ioctl function <br />- sdcard: allow setting the final SPI baudrate <br />- codec: add driver for the WM8960 codec <br />- ninaw10: fix isconnected to return False when inactive <br />- dht/dht.py: change default import module as machine <br />- ninaw10: update driver to support firmware 1.5.0 <br />- bus: rename MP_SPI_ADDR_IS_32B to MICROPY_HW_SPI_ADDR_IS_32BIT <br />- lsm6dsox: add support for SPI mode <br />- sdcard: fix CSD version 1.0 device size calculation <br />- sdcard: make ioctl(4), ioctl(5) return num blocks, block size <br />- sdcard: fix address calculation on v2 SDSC cards</p> <p>mpy-cross: <br />- add armv6m architecture option</p> <p>lib: <br />- re1.5: distinguish between subject start-of-line and start-of-srch <br />- stm32lib: update library for G0 v1.5.1 <br />- fsp: add renesas fsp git repository as submodule <br />- littlefs: update littlefs2 to v2.5.0 <br />- littlefs: guard lfs2_file_rawopen with LFS2_NO_MALLOC <br />- littlefs: remove assignment of variables to themselves <br />- nxp_driver: update nxp_driver to v2.10 <br />- wiznet5k: add submodule for Wiznet Ethernet drivers</p> <p>Support components <br />==================</p> <p>docs: <br />- library: specify additional ADC methods and new ADCBlock class <br />- esp32: document expanded ADC API in quickref <br />- differences: update differences now that math.tau/inf/nan exist <br />- differences: update python_36 now that b2a_base64 accepts newline <br />- remove reference to obsolete neopixel_write function <br />- develop/porting.rst: fix build and import problems in the example <br />- reference/isr_rules.rst: fix inconsistent variable name in example <br />- esp32/quickref: update ADC documentation <br />- reference/isr_rules.rst: describe uasyncio-IRQ interface <br />- library/collections.rst: use class for deque and OrderedDict <br />- use the correct * keyword-only notation <br />- library/socket.rst: document socket as a class <br />- library/pyb.Timer.rst: add pyb.Timer class constants <br />- library/pyb.rst: add pyb.hid_mouse and pyb.hid_keyboard constants <br />- library/pyb.DAC.rst: add DAC class constants <br />- library/machine.SPI.rst: add class constant SoftSPI.MSB and .LSB <br />- library/machine.WDT.rst: use correct case for WDT.feed <br />- library/esp.rst: document the osdebug function <br />- library/pyb.SPI.rst: document default for prescaler argument <br />- library/machine.Pin.rst: document defaults for Pin.init <br />- library/uasyncio.rst: fix description of ThreadSafeFlag.wait <br />- library/machine.UART.rst: add details for `invert` parameter <br />- differences/python_35: mark PEP 486 as not applicable <br />- library/esp32.rst: mark esp32.Partition as not taking kw args <br />- esp32/quickref: document GPIO drive strength <br />- library/machine.Pin: update to use preferred DRIVE_x constants <br />- esp32/quickref: refine deep-sleep power-saving notes <br />- library/machine.I2S: clarify what rate refers to <br />- library/pyb.CAN: update CAN docs to match revised API <br />- add quickref and docs for mimxrt, including network.LAN docs <br />- reference/mpremote: add details about mount usage over soft reboot <br />- differences: update Python 3.5 diff, with optional listen backlog <br />- reference: update constrained docs now that tuples can be const <br />- library/network.WLAN: add "txpower" to list of known WLAN configs <br />- renesas-ra: add renesas-ra docs files <br />- update files for renesas-ra port <br />- renesas-ra: remove unused image files <br />- reference/mpyfiles: remove docs about mpy flags and qstr win size <br />- mimxrt: add i.MX RT1015 to general.rst, and a few clarifications <br />- mimxrt: move the pinout tables to a separate document <br />- reference/manifest: add link to details about opt-level for freeze <br />- reference/mpyfiles: update .mpy description to match latest format <br />- update Raspberry Pi URLs from .org to .com</p> <p>examples: <br />- embedding: fix build with updated sys and os modules <br />- natmod/features3: add example to test more natmod features</p> <p>tests: <br />- run-multitests.py: ignore lld_pdu_get_tx_flush_nb msgs from IDF <br />- run-multitests.py: set HOST_IP so tests work between PC and board <br />- multi_net: add testing key/cert to SSL server/client test <br />- multi_net: close accepted sockets when tests are done <br />- multi_net/udp_data.py: allow reusing port before bind <br />- multi_net/udp_data.py: make UDP test more reliable <br />- run-perfbench.py: allow a test to SKIP, and to have a .exp file <br />- perf_bench: add perf tests for qstr interning and importing .mpy <br />- perf_bench: add perf test for yield-from execution <br />- run-perfbench.py: use SKIP consistently, and increase print width <br />- extmod/vfs_fat_finaliser.py: make finalisation more robust <br />- run-tests.py: skip repl tests when running windows underneath <br />- perf_bench: skip bm_chaos test if random.randrange is unavailable <br />- unix: add coverage test for freezing various objects <br />- basics: add test for creating small-ints in nan-box builds <br />- run-tests.py: include test files ending in _set as set tests <br />- micropython: switch from set.pop to raise-0 to test exc strings <br />- extmod/vfs_posix.py: only test statvfs if it exists <br />- cmdline/cmd_showbc: fix spelling of sequence <br />- extmod: add test for machine.I2S data rate <br />- extmod: update I2S rate test to work on mimxrt <br />- basics/fun_callstardblstar: add coverage test <br />- basics/fun_callstardblstar: add test for large arg allocation <br />- pyb: update CAN tests to match revised CAN API <br />- inlineasm: add test for PUSH LR and POP PC <br />- perf_bench: update import tests for changes to .mpy consts <br />- micropython: add tests that const tuples don't use the heap <br />- extmod/uasyncio_gather: make double-raise gather test reliable <br />- run-tests.py: add timeout for running PC-based MicroPython test <br />- cmdline: add test for REPL auto-indent <br />- renesas-ra: add tests for renesas-ra port <br />- run-tests.py: update for renesas-ra port <br />- renesas-ra: remove unsupported feature test of Pin <br />- extmod: increase timing on uasyncio tests to make more reliable <br />- fix tests to use sys.implementation._mpy <br />- perf_bench: update .mpy file header to remove old unicode flag <br />- run-perfbench.py: return error code if any test fails on target <br />- thread: use less resources for stress_aes if settrace enabled <br />- run-tests.py: exclude settrace tests when using native emitter <br />- multi_net: skip SSL test if relevant modules aren't available <br />- micropython: fully unlink nested list in extreme exc test <br />- extmod: use bytearray instead of bytes for uctypes test <br />- micropython: add more test cases for native generators <br />- run-tests.py: allow running tests via mpy-cross on remote targets <br />- run-perfbench.py: allow running tests via mpy and native emitter <br />- basics: unlock heap if skipping nanbox small-int test <br />- run-tests.py: handle case where mpy-cross fails to compile script <br />- run-tests.py: enable `-X realtime` option for macOS tests <br />- extmod: change expected errno code from 36 to 30 in VfsLfs2 test <br />- multi_net: fix TCP accept test when using system error numbers <br />- run-multitests.py: use LAN for IP address if WLAN doesn't exist <br />- micropython: make import_mpy_native_gc run on ARMv6-M and above <br />- micropython: make import_mpy_native test run on all architectures <br />- run-tests.py: add rp2 test target <br />- move native while test from pybnative to micropython <br />- net_inet: remove broken api.telegram.org from tests <br />- run-multitests.py: read IP address from boot nic if available <br />- basics: add .exp file for sys.tracebacklimit test <br />- stress: adjust bytecode_limit test so it can SKIP if no memory</p> <p>tools: <br />- mpremote: use machine instead of umachine in commands <br />- ci: test math constants with MICROPY_OBJ_REPR_D <br />- uf2conv.py: update to latest version <br />- autobuild: provide .uf2 images for esp32 builds when available <br />- mpremote: fix "fs cp -r" on Windows <br />- mpremote: make ConsolePosix work without .raw attribute <br />- mpremote: during soft reboot wait long enough for 115200 data <br />- mpremote: accept both --help and help to show usage <br />- mpremote: correctly manage mounted flag during soft-reset <br />- mpremote: fix special handling of ctrl-D when host FS is mounted <br />- verifygitlog.py: ignore line length in body if it's a URL <br />- ci.sh: update IDF v4.4 build to use v4.4 tag <br />- ci.sh: run urandom test scripts as part of native module tests <br />- mpremote: add "resume" and "soft-reset" commands <br />- mpremote: add "umount" command <br />- upip.py: remove unused op_basename() function <br />- mpy-tool.py: fix frozen comment generation to escape chars <br />- ci.sh: run performance benchmark as part of all unix test runs <br />- mpremote: bump version to 0.2.0 <br />- gen-cpydiff: skip Black fmt comments <br />- mpremote: support any prompt string when detecting soft reset <br />- mpremote: allow running mpremote with `python -m` <br />- mpremote: improve reliability of mount after soft reboot <br />- mpremote: show progress indicator when copying large files <br />- mpremote: add option to mount cmd to allow "unsafe" symlinks <br />- mpy-tool.py: support loading tuples from .mpy files <br />- mpy-tool.py: support freezing tuples and other consts <br />- mpy-tool.py: optimise freezing of ints that can fit a small int <br />- mpy-tool.py: optimise freezing of empty str and bytes objects <br />- mpy-tool.py: make global qstr list a dedicated class <br />- mpy-tool.py: optimise freezing of str when str data is a qstr <br />- mpy-tool.py: intern more strings when freezing <br />- codeformat.py: remove ports/unix/*.py from exclusion list <br />- codeformat.py: include more ports .c/.h files in formatting <br />- ci.sh: don't run uasyncio_gather test on macOS <br />- ci.sh: update for ports/renesas-ra <br />- uncrustify: make sure a space exists after a comma <br />- autobuild: update for ports/renesas-ra <br />- mpy_ld.py: remove obsolete QSTR_WINDOW_SIZE constant <br />- ci.sh: run full test suite on stackless and settrace builds <br />- ci.sh: for esp8266 CI install esptool 3.3.1 <br />- mpy-tool.py: remove obsolete unicode flag in .mpy header <br />- ci.sh: add build of W5100S_EVB_PICO board to rp2 CI <br />- mpy-tool.py: rework .mpy merging feature <br />- ci.sh: add test for mpy-tool's merging feature <br />- mpy-tool.py: improve generated frozen identifiers <br />- mpremote: add command to print the version <br />- mpremote: bump version to 0.3.0 <br />- ci.sh: build NUCLEO_H743ZI with -O2 optimisation level <br />- mpy_ld.py: support R_XTENSA_PDIFF32 relocation <br />- ci.sh: build native .mpy examples for armv7emsp, xtensawin in CI <br />- mpy_ld.py: support GOT entries that reference inside mp_fun_table</p> <p>CI: <br />- workflows: show context for qemu-arm test failures <br />- workflows: add new workflow to test .mpy file format and tools <br />- workflows: add new workflow to test embedding example <br />- workflows: add workflow for renesas-ra port</p> <p>The ports <br />=========</p> <p>all ports: <br />- consolidate inclusion of umachine module in built-ins <br />- recompile bytecode tests now that .mpy format changed <br />- allow boards to define additional network interfaces <br />- recompile bytecode tests now that .mpy format changed <br />- reformat more C and Python source code <br />- rename thread_t to mp_thread_t <br />- use default VFS config for import_stat and builtin_open</p> <p>bare-arm port: no changes specific to this component/port</p> <p>cc3200 port: <br />- make port-specific modules use MP_REGISTER_MODULE</p> <p>esp8266 port: <br />- moduos: convert module to use extmod version <br />- mpconfigport.h: remove config values that are the defaults <br />- modesp: remove esp.info() function <br />- make port-specific modules use MP_REGISTER_MODULE <br />- machine_wdt: remove deinit method for watchdog <br />- etshal.h: remove unneeded function declaration</p> <p>esp32 port: <br />- machine_adcblock: add new machine.ADCBlock class and update ADC <br />- pin MicroPython to core 1 again <br />- esp32_rmt: call rmt_driver_install directly if running on core 1 <br />- main: allocate at most 1/2 of available IDF heap for MP heap <br />- README.md: fix URL for esp-idf installation <br />- modnetwork: fix test for WIFI_AUTH_MAX for IDF v4.3.0 <br />- main: use heap_caps_get_info on IDF &lt;4.1 to compute total heap <br />- boards: provide custom deploy_c3.md for ESP32-C3 boards <br />- partitions: increase size of app-part from 0x180000 to 0x1F0000 <br />- machine_pwm: fix PWM not allowing frequencies &lt; 611 Hz <br />- machine_pwm: clean up macro names and their use <br />- esp32_rmt: select correct last RMT channel on S2, S3, C3 variants <br />- main: automatically size SPIRAM heap when allocated using malloc <br />- adc: fix wrong mapping between ADC2 channel and GPIO number <br />- remove unneeded modesp.h <br />- create .uf2 binaries for S2 and S3 chips <br />- partitions-16MiB.csv: increase 14MiB filesystem to maximum size <br />- machine_adcblock: fix ADC bit width for ESP32-S3 <br />- machine_adc: fix configuration of default ADC atten value <br />- boards: add three UM ESP32-S3 based boards <br />- mpconfigport.h: use the "extra" feature level <br />- mpconfigport.h: enable remaining features to get to "extra" level <br />- esp32_partition: add support for specifying block_size <br />- modules: create ffat partition object with block_size=512 <br />- README.md: update list of supported IDF versions <br />- boards: add specific deploy instructions for S3 variant <br />- uart: correctly init low-level UART driver for REPL <br />- machine_uart: allow limited configuration of REPL UART <br />- sleep one tick in MICROPY_EVENT_POLL_HOOK <br />- machine_pwm: always set the duty cycle when setting the frequency <br />- machine_uart: make UART.init preserve unspecified parameters <br />- machine_pin: add support for pin drive strength <br />- moduos: convert module to use extmod version <br />- machine_pin: add new hold keyword argument and remove PULL_HOLD <br />- modesp32: add new gpio_deep_sleep_hold function <br />- boards/UM_TINYPICO: remove use of PULL_HOLD <br />- boards: add LOLIN C3 MINI ESP32-C3 based board <br />- machine_hw_spi: use automatic DMA channel selection for SPI on C3 <br />- boards: add support for LilyGO LoRa32 boards <br />- machine_pin: expose pin 20 for ESP32 <br />- allow overriding cmake frozen manifest from the command line <br />- boards: add test manifest to test freezing during build <br />- add MICROPY_HW_ENABLE_UART_REPL and enable on generic S2/S3 <br />- boards: compile GENERIC_SPIRAM and UM_TINYPICO with -Os <br />- machine_pin: don't expose pins 33-37 when octal SPIRAM is enabled <br />- modesp32: properly define RTC_VALID_EXT_PINS on S2/S3 variants <br />- network_wlan: support setting/getting txpower in WLAN.config() <br />- modnetwork: fix build when MICROPY_PY_NETWORK_WLAN is disabled <br />- make port-specific modules use MP_REGISTER_MODULE <br />- boards/UM_FEATHERS3: use correct sdkconfig.board <br />- boards/LILYGO_TTGO_LORA32: remove ID from TTGO Lora32 board json <br />- machine_pin: fix ESP32C3 IDFv4.4.1 build <br />- track allocated iRAM and free it on soft reset <br />- machine_i2c: implement write-then-read I2C transfers <br />- machine_pin: only expose IO20 on esp32 for IDF 4.3.2 and above</p> <p>javascript port: <br />- make port-specific modules use MP_REGISTER_MODULE</p> <p>mimxrt port: <br />- support gaps in the SPI an I2C device numbers <br />- allow for board-specific flash driver files <br />- compensate for a bug in the fsl_lpspi.c file <br />- remove two files from the Seeed Arch Mix directory <br />- replace Pin-config constants by a function call <br />- allow to select cs0 or cs1 for SPI <br />- add USB ID elements <br />- add support for the Olimex RT1010 board <br />- simplify Makefile in selection of flash type <br />- machine_pin: change pin drive constants to DRIVE_x naming <br />- machine_spi: add omitted GPIO config <br />- boards: add board files for MIMXRT1015 and MIMXRT1015_EVK <br />- eth: fix an Ethernet transmit error <br />- boards/TEENSY41: use the same SPI1 pins for Teensy 4.0 and 4.1 <br />- boards: support using an optional board-specific manifest.py <br />- eth: avoid a race condition for Ethernet <br />- hal/pwm_backport: make PWM symmetric, and round division calcs <br />- moduos: convert module to use extmod version <br />- mbedtls: add NULL pointer check in m_free_mbedtls <br />- machine_i2s: add I2S protocol support <br />- boards: add board.json file for OLIMEX RT1010Py <br />- modules: append /flash/lib to the default sys.path <br />- machine_rtc: start RTC at boot and set datetime if not set <br />- machine_spi: improve handling of busy SPI peripheral <br />- mphalport: fix USB CDC RX handling to not block when unprocessed <br />- mbedtls: use core-provided tracked alloc instead of custom funcs <br />- make port-specific modules use MP_REGISTER_MODULE <br />- boards/OLIMEX_RT1010: document the initial deploy procedure <br />- boards: extend the deploy_teensy.md instructions <br />- mphalport: fix strict aliasing error with unique id <br />- update port to work with new nxp_driver v2.10 <br />- machine_uart: fix an inconsistency for UART.init() arg handling</p> <p>minimal port: no changes specific to this component/port</p> <p>nrf port: <br />- drivers/usb: fix background events/scheduling while at USB REPL <br />- drivers/usb: fix MP_STREAM_POLL_RD support on USB CDC <br />- modules: include uasyncio in default board manifest <br />- make port-specific modules use MP_REGISTER_MODULE <br />- mpconfigport: set MICROPY_CONFIG_ROM_LEVEL defines for each MCU <br />- mpconfigport: enable extra features as defined by ROM levels <br />- mpconfigport: fix MICROPY_VFS IO build support <br />- modules/uos/microbitfs: fix MICROPY_MBFS build to use mp_obj_malloc</p> <p>pic16bit port: <br />- make port-specific modules use MP_REGISTER_MODULE <br />- use 1 byte for qstr hash len and include header to fix build</p> <p>powerpc port: no changes specific to this component/port</p> <p>qemu-arm port: <br />- add tests for freezing viper and asm_thumb code <br />- moduos: convert module to use extmod version <br />- test-frzmpy: add test for freezing constant tuples <br />- mpconfigport: define MICROPY_PY_SYS_PLATFORM</p> <p>renesas-ra port: <br />- add new port to Renesas RA <br />- boards: change device name information to show properly <br />- rename pyb_uart_ to machine_uart_ <br />- rename pyb_rtc_ to machine_rtc_ <br />- make port-specific modules use MP_REGISTER_MODULE <br />- modmachine: add missing MP_REGISTER_MODULE for umachine <br />- machine_pin: remove code for unsupported Pin features</p> <p>rp2 port: <br />- machine_i2c: provide more specific error codes from I2C transfer <br />- mpconfigport.h: use internal error numbers <br />- mphalport: add optional dupterm support <br />- machine_uart: add machine.UART init/deinit methods <br />- machine_i2c: use soft I2C only for len=0, and increase timeout <br />- modutime: fix time.localtime day-of-week value <br />- machine_uart: fix UART RTS behaviour so RTS is deasserted <br />- Makefile: add FROZEN_MANIFEST Makefile option, to override default <br />- mpthreadport: fix memory corruption when thread is created in core1 <br />- add USB MSC support <br />- allow Overriding cmake frozen manifest from the command line <br />- enable ucryptolib, using mbedtls for backend functions <br />- mphalport: fix USB CDC RX handling to not block when unprocessed <br />- Makefile: add mbedtls to GIT_SUBMODULES list and use it in CI func <br />- machine_uart: use read/write mutex to prevent char duplication <br />- mpconfigport: enable execfile, NotImplemented and REPL EMACS keys <br />- make port-specific modules use MP_REGISTER_MODULE <br />- mpconfigport.h: enable static scheduler nodes <br />- mpconfigport.h: allow boards to override internal errno config <br />- boards/ARDUINO_NANO_RP2040_CONNECT: disable internal errno <br />- boards/ARDUINO_NANO_RP2040_CONNECT: enable webrepl <br />- mbedtls: add support for ssl module with MICROPY_SSL_MBEDTLS <br />- machine_pin: add mp_hal_pin_interrupt C interface <br />- Makefile: use cmake for "make submodules" task when needed <br />- integrate lwIP network stack <br />- add support for using Wiznet hardware as an Ethernet NIC <br />- boards/W5100S_EVB_PICO: add Wiznet W5100S-EVB-Pico board <br />- Makefile: build in debug mode with "make DEBUG=1" <br />- boards/ARDUINO_NANO_RP2040_CONNECT: update USB PID <br />- mpnetworkport: fix lwip alarm callback timing to use microseconds <br />- CMakeLists: simplify qstr sources when enabling extmod components</p> <p>samd port: <br />- moduos: convert module to use extmod version <br />- make port-specific modules use MP_REGISTER_MODULE</p> <p>stm32 port: <br />- mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE <br />- mboot: remove custom HAL_RCC_GetHCLKFreq and use HAL provided one <br />- pin: change remaining uses of "af" to "alt" <br />- dac: deinit all DACs on soft reset <br />- fdcan: fix FIFO1 usage and handling of error interrupts <br />- fdcan: fix naming with regards to G4 series <br />- usbd_conf: set lpm_enable and battery_charging_enable on all MCUs <br />- powerctrlboot: set HAL uwTickPrio variable when needed <br />- powerctrl: write bootloader-state as 64-bit word to work on H7 <br />- mboot: use PLL3 for USB clock source on H7 MCUs <br />- mboot: include hal_rcc_ex.c in source file list <br />- mboot: support H7 MCUs in fwupdate.py <br />- mboot: compute and check CRC32 of dfu file in fwupdate.py <br />- add support for G4 MCUs, and add NUCLEO_G474RE board defn <br />- mboot: allow HSI to be used as the main clock source <br />- mboot: add MBOOT_BOARD_ENTRY_INIT for a board to add entry code <br />- mboot: add support for F469/479 MCUs in fwupdate.py <br />- rtc: use LL_RTC functions to simplify some MCU-specific code <br />- Makefile: make stm32lib configurable <br />- add initial support for STM32WL MCUs <br />- boards/NUCLEO_WL55: add new board definition <br />- system_stm32: make SystemClock_Config() a weak symbol <br />- adc: fix L4 ADC channel numbers <br />- adc: remove obsolete FIRST/LAST GPIO channel macros <br />- boards/NUCLEO_L432KC: disable MICROPY_OPT_COMPUTED_GOTO <br />- boards/NUCLEO_WB55: add Arduino pin alias definitions <br />- mboot: allow a board to fully configure system clocks <br />- mboot: allow a board more control over entry initialisation <br />- moduos: convert module to use extmod version <br />- boards: convert F4xx and F7xx to new flash FS config <br />- mbedtls: add NULL pointer check in m_free_mbedtls <br />- sdcard: use mp_hal_pin_input instead of HAL function <br />- sdcard: add sdcard_select_sd/mmc functions <br />- main: support SD cards without a partition table <br />- dma: add option to disable auto-DMA-turn-off <br />- mboot: add pragma for GCC to ignore array bounds warning <br />- mboot: always check the magic number to enter filesystem loading <br />- mboot: add support for 64-bit mboot address space for reads <br />- mboot: add support for reading from SD card <br />- boards/PYBD_SF2: turn on SD card in mboot init if SD enabled <br />- mboot/fwupdate.py: simplify calculation of CRC32 <br />- mboot: verify signature of fsload packed DFU files before writing <br />- mboot: verify CRC32 of fsload DFU files before writing <br />- support building for STM32F745 <br />- machine_i2s: set FullDuplexMode to disabled on F4 <br />- machine_i2s: allow I2S.deinit to be called multiple times <br />- machine_i2s: fix 16-bit stereo i2s_frame_map <br />- sdio: use runtime calculation for clock divider of sdio on H7 <br />- modmachine: add deepsleep support to reset_cause() for WB55 <br />- pyb_can: enable CAN FD frame support and BRS <br />- pyb_can: add support for CAN FD extended frame ID <br />- pyb_can: add support for bus with mixed Classic/FD nodes <br />- pyb_can: return the filter ID and type of received messages <br />- pyb_can: define the maximum bit timing parameters <br />- pyb_can: replace CAN.initfilterbanks with CAN.init keyword arg <br />- Makefile: allow overriding COPT in Makefile <br />- mpconfigport.h: let MICROPY_PY_IO_FILEIO take its default value <br />- machine_bitstream: include all clobbered regs in Cortex-M0 impl <br />- mboot: consolidate all UI and add general state change hooks <br />- mboot: add macros for use in led_state_all() <br />- sdram: add function to enable SDRAM power-down mode <br />- Makefile: add H747 to Makefile's MCU flags <br />- system_stm32: add H7 switched-mode-power-supply support <br />- system_stm32: set voltage scaling level 0 for H7 Rev-V devices <br />- system_stm32: allow boards to configure PLL VCI, VCO and FRACN <br />- system_stm32: improve H7 PLL and OSC configuration <br />- boards/PYBD_SFx: allow FROZEN_MANIFEST to be overridden <br />- mpbthciport: switch scheduling callback to use node scheduler <br />- boards/SPARKFUN_MICROMOD_STM32: fix incorrect UART and I2C config <br />- mphalport: fix I/O glitches when switching GPIO mode to alt-func <br />- boards/ADAFRUIT_F405_EXPRESS: use external SPI flash for storage <br />- boards/LEGO_HUB_NO6: exclude BTstack code from formatting <br />- qspi: support common flash sizes in MPU configuration <br />- qspi: wait for a free FIFO location before writing to DR <br />- qspi: workaround for SR set immediately after setting AR <br />- ulpi: add USB3320 ULPI low-power functions <br />- ulpi: include missing py/mperrno.h header <br />- boards/ARDUINO_PORTENTA_H7: add support for Arduino Portenta H7 <br />- storage: add support for internal storage on Cortex-M0 MCUs <br />- add support for G0 MCUs <br />- boards/NUCLEO_G0B1RE: add NUCLEO_G0B1RE board definition <br />- mbedtls: use core-provided tracked alloc instead of custom funcs <br />- make port-specific modules use MP_REGISTER_MODULE <br />- rfcore: revert "intercept addr-resolution HCI cmd to work arou..." <br />- mboot: move remaining led_state_all call into mboot_state_change <br />- mboot: add update_app_elements to return mboot fsload elements <br />- mboot: make 0x70ad0000 values named constants with macros <br />- mboot: pass initial_r0 to early-init and get-reset-mode funcs <br />- boards/LEGO_HUB_NO6: make all SPI flash transfers use 32-bit addr <br />- boards/LEGO_HUB_NO6: add support for mboot to access SPI flash <br />- boards/LEGO_HUB_NO6: use multi-colour LED for mboot status <br />- boards/LEGO_HUB_NO6: implement robust filesystem-load updates <br />- boards/LEGO_HUB_NO6: add helper scripts to update app firmware <br />- rfcore: remove extra layer of buffering on BLE IPCC <br />- flash: remove FLASH_OPTR_DBANK condition in L4, H7 get_bank func <br />- machine_i2c: enable timingr constructor keyword on H7 MCUs <br />- powerctrl: disable sys tick interrupt in stop mode on some STM32s <br />- usbd_conf: remove disable of SYSCFG clock <br />- mboot: add board-configurable SysTick hook <br />- mboot: remove MP_WEAK on led funcs and make some of them static <br />- boards/LEGO_HUB_NO6: add comment to readme about powering off <br />- mboot: only include UI code if at least one board LED is defined</p> <p>teensy port: <br />- make port-specific modules use MP_REGISTER_MODULE <br />- mpconfigport.h: remove obsolete macros</p> <p>unix port: <br />- Makefile: remove explicit addition of -std=c++ flag <br />- show compiler info in REPL banner <br />- .gitignore: remove *.py from ignore list <br />- moduos: convert module to use extmod version <br />- mpconfigport.h: collect together config options from extra level <br />- variants: use rom feature config for standard, dev, coverage <br />- variants: enable a few optimisations and features on dev, coverage <br />- make port-specific modules use MP_REGISTER_MODULE <br />- implement `-X realtime` command-line option on macOS <br />- factor out code that generates random bytes to a new func <br />- variants: enable seeding random module on import in dev, coverage</p> <p>windows port: <br />- README.md: fix broken mingw link <br />- add micropython.schedule support <br />- mingw: include extmod/shared/lib sources properly <br />- uselect: enable micropython select in dev variant <br />- uasyncio: add support for uasyncio to windows dev variant <br />- appveyor: fix printing of test failures <br />- Makefile: specify CXXFLAGS in the Makefile <br />- unify project file headers <br />- switch to VFS subsystem and use VfsPosix <br />- consolidate all sleep-related functions into windows_mphal.c <br />- avoid busy loop when using scheduler <br />- use BCryptGenRandom to implement os.urandom <br />- factor out code that generates random bytes to a new func</p> <p>zephyr port: <br />- update include path to disk_access.h <br />- upgrade to Zephyr v3.0.0 <br />- prj.conf: enable CONFIG_BUILD_OUTPUT_HEX to generate .hex output <br />- moduos: convert module to use extmod version <br />- make port-specific modules use MP_REGISTER_MODULE <br />- modusocket: fix function object wrapper for listen method</p> dpgeorge tag:github.com,2008:Repository/776054618/v1.18 2022-01-16T22:50:36Z v1.18 <p>Boosted performance, board.json metadata, more mimxrt, rp2, samd feat…</p> <p>…ures</p> <p>This release of MicroPython sees a boost to the overall performance of the <br />VM and runtime. This is achieved by the addition of an optional cache to <br />speed up general hash table lookups, as well as a fast path in the VM for <br />the LOAD_ATTR opcode on instance types. The new configuration options are <br />MICROPY_OPT_MAP_LOOKUP_CACHE and MICROPY_OPT_LOAD_ATTR_FAST_PATH. As part <br />of this improvement the MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE option has <br />been removed, which provided a similar map caching mechanism but with the <br />cache stored in the bytecode, which made it not useful on bare metal ports. <br />The new mechanism is measured to be at least as good as the old one, <br />applies to more map lookups, has a constant RAM overhead, and applies to <br />native code as well as bytecode.</p> <p>These performance options are enabled on the esp32, mimxrt, rp2, stm32 and <br />unix ports. For esp32 and mimxrt some code is also moved to RAM to further <br />boost performance. On stm32, performance increases by about 20% for <br />benchmarks that are heavy on name lookups, like misc_pystone.py and <br />misc_raytrace.py. On esp32 performance can increase by 2-3x, and on mimxrt <br />it is up to 6x.</p> <p>All boards in all ports now have a board.json metadata file, which is used <br />to automatically build firmware and generate a webpage for that board <br />(among other possibilities). Auto-build scripts have been added for this <br />purpose and they build all esp32, mimxrt, rp2, samd and stm32 boards. The <br />generated output is available at <a href="https://micropython.org/download">https://micropython.org/download</a>.</p> <p>Support for FROZEN_DIR and FROZEN_MPY_DIR has been deprecated for some time <br />and was finally removed in this release. Instead of these, FROZEN_MANIFEST <br />can be used. The io.resource_stream() function is also removed, replaced <br />by the pure Python version in micropython-lib.</p> <p>The search order for importing frozen Python modules is now controlled by <br />the ".frozen" entry in sys.path. This string is added by default in the <br />second position in sys.path. User code should adjust sys.path depending on <br />the desired behaviour. Putting ".frozen" first in sys.path will speed up <br />importing frozen modules.</p> <p>A bug in multiple precision integers with bitwise of -0 was fixed in commit <br /><a class="commit-link" href="https://github.com/jonfoster/micropython/commit/2c139bbf4e5724ab253b5b034ce925e04267a9c4"><tt>2c139bb</tt></a>.</p> <p>The platform module has been added to allow querying the compiler and <br />underlying SDK/HAL/libc version. This is enabled on esp32, mimxrt and <br />stm32 ports.</p> <p>The mpremote tool now supports seek, flush, mkdir and rmdir on PC-mounted <br />filesystems. And a help command has been added.</p> <p>The documentation has seen many additions and improvements thanks (for a <br />second time) to the Google Season of Docs project. The rp2 documentation <br />now includes a reference for PIO assembly instructions, a PIO quick <br />reference and a PIO tutorial. The random and stm modules have been <br />documented, along with sys.settrace, manifest.py files and mpremote. There <br />is also now more detail about the differences between MicroPython and <br />standard Python 3.5 and above.</p> <p>The esp32 port sees support for ESP32-S3 SoCs, and new boards GENERIC_S3, <br />ESP32_S2_WROVER, LOLIN_S2_MINI, LOLIN_S2_PICO and UM_FEATHERS2NEO. The PWM <br />driver has been improved and now supports all PWM timers and channels, and <br />the duty_u16() and duty_ns() methods, and it keeps the duty constant when <br />changing frequency. The machine.bitstream() function has been improved to <br />use RMT, with an option to select the original bit-banging implementation.</p> <p>The mimxrt port gained new hardware features: SDRAM and SD card support, as <br />well as network integration with a LAN driver. The machine.WDT class was <br />added along with the machine.reset_cause(), machine.soft_reset(), <br />machine.unique_id() add machine.bitstream() functions. DHT sensor support <br />was added, and f-strings were enabled.</p> <p>The rp2 port now has support for networking, and bluetooth using NimBLE. <br />The Nina-W10 WiFi/BT driver is fully integrated and supported by the new <br />Arduino Nano RP2040 connect board. I2S protocol support is added along <br />with a machine.bitstream() driver and DHT sensor support. The PWM driver <br />had a bug fix with the accuracy of setting/getting the frequency, and the <br />duty value is now retained when changing the frequency.</p> <p>On the samd port there is now support for the internal flash being a block <br />device, and for filesystems and the os module. Pin and LED classes have <br />been implemented. There are more time functions, more Python features <br />enabled, and the help() function is added. SEEED_WIO_TERMINAL and <br />SEEED_XIAO board definitions are now available.</p> <p>The stm32 port now has support for F427, F479 and H7A3(Q)/H7B3(Q) MCUs, and <br />new board definitions for VCC_GND_H743VI, OLIMEX_H407, MIKROE_QUAIL, <br />GARATRONIC_PYBSTICK26_F411, STM32H73B3I_DK. A bug was fixed in the SPI <br />driver where a SPI transfer could fail if the CYW43 WiFi driver was also <br />active at the same time.</p> <p>On the windows port the help() function has been enabled, and support for <br />build variants added, to match the unix port.</p> <p>The zephyr port upgraded Zephyr to v2.7.0.</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: -1520 -2.605% <br /> minimal x86: -2256 -1.531% <br /> unix x64: -457 -0.089% <br /> unix nanbox: -925 -0.204% <br /> stm32: +312 +0.079% PYBV10 <br /> cc3200: -176 -0.096% <br /> esp8266: +532 +0.076% GENERIC <br /> esp32: +27096 +1.820% GENERIC <br /> nrf: -212 -0.121% pca10040 <br /> rp2: +9904 +2.051% PICO <br /> samd: +35332 +33.969% ADAFRUIT_ITSYBITSY_M4_EXPRESS</p> <p>The changes that dominate these numbers are: <br />- bare-arm, minimal: use of new MICROPY_CONFIG_ROM_LEVEL_MINIMUM option and <br /> subsequent disabling of remaining optional features <br />- unix, cc3200, nrf: general code size reductions of the core <br />- stm32: performance improvements, addition of platform module <br />- esp8266: enabling f-strings <br />- esp32: use of -O2 instead of -Os <br />- rp2: machine.I2S and other new hardware features <br />- samd: filesystem support and other new hardware features</p> <p>Thanks to everyone who contributed to this release: Alan Dragomirecký, <br />Alexey Shvetsov, Andrew Leech, Andrew Scheller, Antoine Aubert, Boris <br />Vinogradov, Chris Boudacoff, Chris Fiege, Christian Decker, Damien George, <br />Daniel Gorny, Dave Hylands, David Michieli, Emilie Feral, Frédéric Pierson, <br />gibbonsc, Henk Vergonet, iabdalkader, Ihor Nehrutsa, Jan Hrudka, Jan Staal, <br />jc_.kim, Jim Mussared, Jonathan Hogg, Laurens Valk, leo chung, Lorenzo <br />Cappelletti, Magnus von Wachenfeldt, Matt Trentini, Matt van de Werken, <br />Maureen Helm, Michael Bentley, Michael Buesch, Mike Causer, Mike Teachman, <br />Mike Wadsten, Ned Konz, NitiKaur, oli, patrick, Patrick Van Oosterwijck, <br />Peter Boin, Peter Hinch, Peter van der Burg, Philipp Ebensberger, Pooya <br />Moradi, retsyo, robert-hh, roland van straten, Scott Armitage, Sebastian <br />Wicki, Seon Rozenblum, Sergei Silnov, Simon Baatz, Stewart Bonnick, stijn, <br />Tobias Thyrrestrup, Tomas Vanek, YoungJoon Chun.</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 />- remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE <br />- update Python formatting to latest Black version 21.12b0 <br />- remove support for FROZEN_DIR and FROZEN_MPY_DIR</p> <p>py core: <br />- parse: simplify parse nodes representing a list <br />- emitnative: ensure load_subscr does not clobber existing REG_RET <br />- mpconfig.h: define initial templates for "feature levels" <br />- vm: add a fast path for LOAD_ATTR on instance types <br />- map: add an optional cache of (map+index) to speed up map lookups <br />- builtinimport: forward all debug printing to MICROPY_DEBUG_PRINTER <br />- add wrapper macros so hot VM functions can go in fast code location <br />- runtime: fix crash when exc __new__ doesn't return an exc instance <br />- mpconfig.h: define the "extra" feature level <br />- mpconfig.h: revert MICROPY_REPL_INFO to disabled at all levels <br />- gc: add hook to run code during time consuming GC operations <br />- showbc: print unary-op string when dumping bytecode <br />- modsys: replace non-ASCII quote char with ASCII char <br />- runtime: allow types to use both .attr and .locals_dict <br />- lexer: support nested [] and {} characters within f-string params <br />- objfun.h: remove obsolete comments about entries in extra_args <br />- builtinimport: refactor module importing <br />- showbc: fix printing of raw bytecode header on nanbox builds <br />- modio: remove io.resource_stream function <br />- only search frozen modules when '.frozen' is found in sys.path <br />- mkrules.cmake: set frozen preprocessor defs early <br />- runtime: allow initialising sys.path/argv with defaults <br />- mpstate.h: only include sys.path/argv objects in state when enabled <br />- mpz: fix bugs with bitwise of -0 by ensuring all 0's are positive <br />- qstr: reset mpstate.qstr_last_chunk before raising an error <br />- modbuiltins: add additional macro for extending builtins <br />- mpconfig.h: define MICROPY_PY_USSL_FINALISER only if not defined</p> <p>extmod: <br />- machine_i2c: make SoftI2C configurable via macro option <br />- machine_spi: make SoftSPI configurable via macro option <br />- modonewire: make _onewire module configurable via macro option <br />- machine_pwm: factor out machine.PWM bindings to common code <br />- move modnetwork and modusocket from stm32 to extmod <br />- modnetwork: add STA_IF and AP_IF constants <br />- modnetwork: add extended socket state <br />- modusocket: add read/write stream methods to socket object <br />- modnetwork: define network interfaces in port config files <br />- network_cyw43: make consistent use of STA and AP constants <br />- modnetwork: remove STM32 references <br />- modnetwork: remove modnetwork socket u_state member <br />- mpbthci.h: add mp_bluetooth_hci_uart_any prototype <br />- nimble: add nimble CMake fragment file <br />- add platform module <br />- moduplatform: improve implementation for PC ports <br />- vfs_posix_file: support MP_STREAM_POLL in vfs_posix_file_ioctl <br />- modbluetooth: add connection interval to gap_connect <br />- nimble: update to NimBLE v1.4 <br />- nimble: remove workaround for OS_ENOMEM <br />- uasyncio: fix gather returning exceptions from a cancelled task <br />- uplatform: remove unused definitions <br />- uplatform: use generic custom platform string <br />- network_ninaw10: fix scan list order to match other NICs <br />- modbluetooth: support gap_connect(None) to cancel a connection <br />- modure: redirect regex debug printing to mp_printf <br />- network_ninaw10: fix config of AP mode <br />- network_ninaw10: disable active connections before connecting <br />- network_ninaw10: make NIC state persistent <br />- network_ninaw10: return -1 on timeout from recv/send <br />- network_ninaw10: make recv/recvfrom interchangeable <br />- moduplatform: detect xtensa arch <br />- modusocket: allow setting timeout on unbound sockets <br />- modusocket: initialise accepted socket state <br />- network_ninaw10: use socket timeout preset in modusocket <br />- modbluetooth: fix conditional compilation of ringbuf_put_uuid <br />- modbluetooth: put declaration of connect_cancel in correct place</p> <p>shared: <br />- libc/string0: don't include string.h, and provide __memcpy_chk <br />- runtime/pyexec: cleanup EXEC_FLAG flag constants</p> <p>drivers: <br />- ninaw10: add ublox Nina-W10 WiFi/BT module driver <br />- lsm6dsox: add LSM6DSOX driver and examples <br />- neopixel: avoid heap alloc in fill() <br />- ninaw10: fix BSSID byte order, and add null byte to ESSID <br />- ninaw10/nina_wifi_drv: fix DNS resolution</p> <p>mpy-cross: no changes specific to this component/port</p> <p>lib: <br />- mynewt-nimble: switch to the MicroPython fork of NimBLE <br />- asf4: point submodule to latest commit on circuitpython branch <br />- update pico-sdk to 1.3.0 and tinyusb to 0.12.0 <br />- stm32lib: update library for L4 v1.17.0, new G4, WL, and MMC fixes <br />- stm32lib: update library for fix to F7 USB HS</p> <p>Support components <br />==================</p> <p>docs: <br />- library/os.rst: clarify littlefs requirements for block erase <br />- library/bluetooth.rst: update incorrect link to gatts_write <br />- make.bat: change Windows output dir from '_build' to 'build' <br />- library/machine.I2S.rst: specify that I2S.shift args are kw-only <br />- esp32: explain ESP32 PWM modes, timers, and channels <br />- rp2: add reference for PIO assembly instructions, and PIO tutorial <br />- library/random.rst: document the random module <br />- reference/mpremote.rst: add docs for mpremote <br />- reference/manifest.rst: add docs for manifest.py files <br />- library/stm.rst: document the stm module <br />- esp32/tutorial: add an example of peripheral control via regs <br />- rp2/general.rst: fix typo with missing spaces <br />- library/framebuf.rst: adjust dimensions in example <br />- library/rp2.rst: update function asm_pio_encode to add sideset_opt <br />- reference/filesystem.rst: add detail on how to use littlefs fuse <br />- rp2/quickref.rst: add section on PIO <br />- library/sys.rst: add docs for sys.settrace <br />- esp8266/tutorial: fix comments of FrameBuffer examples <br />- library/uasyncio.rst: detail exception behaviour in cancel/timeout <br />- library/machine.Timer.rst: document 'id' as positional-only arg <br />- library/machine.SPI.rst: add example SPI usage <br />- library/machine.Timer.rst: document `period` and `callback` args <br />- library/machine.Pin.rst: add Pin.ANALOG mode constant <br />- remove trailing spaces and convert tabs to spaces <br />- library/sys.rst: add note about '.frozen' as an entry in sys.path <br />- differences: document details of new PEPs/features in Python 3.5+ <br />- update copyright year range to include 2022 <br />- esp32: update RMT quickref example to match latest code</p> <p>examples: no changes specific to this component/port</p> <p>tests: <br />- perf_bench: use math.log instead of math.log2 <br />- basics: add tests for type-checking subclassed exc instances <br />- micropython/const.py: add comment about required config for test <br />- cpydiff: clarify f-string diffs regarding concatenation <br />- basics/int_big_cmp.py: add more tests for big-int comparison <br />- extmod: skip uselect_poll_udp when poll() is not available</p> <p>tools: <br />- autobuild: add auto build for GENERIC_C3_USB <br />- ci.sh: use IDF v4.4 as part of esp32 CI and build GENERIC_S3 <br />- autobuild: add the MIMXRT1010_EVK board to autobuild <br />- ci.sh: use a specific ESP IDF v4.4 commit <br />- autobuild: add script to generate website board metadata <br />- dfu.py: make tool work with python3 when parsing DFU files <br />- autobuild: automatically build all mimxrt, rp2 and samd boards <br />- autobuild: automatically build all stm32 boards <br />- mpremote: implement seek and flush in ioctl method <br />- autobuild: automatically build all esp32 boards <br />- upip.py: support == to specify exact package version <br />- makemanifest.py: make str conversion compatible with Python 2 <br />- makemanifest.py: merge make-frozen.py <br />- mpremote: add mkdir and rmdir to RemoteFS <br />- mpremote: add help command <br />- mpremote: add link to mpremote docs URL in help message <br />- upip.py: skip '.frozen' entry in sys.path for install path <br />- autobuild: build esp8266 OTA image with GENERIC_1M board <br />- ci.sh: upgrade Zephyr docker image to v0.21.0 <br />- ci.sh: build zephyr nucleo_wb55rg to test zephyr bluetooth build</p> <p>CI: <br />- workflows: use Python 3.8 for macos workflow <br />- workflows: add new workflow to build ports download metadata</p> <p>The ports <br />=========</p> <p>all ports: <br />- add board.json for all boards <br />- add images, features and urls to board.json <br />- add '.frozen' as the first entry in sys.path <br />- move '.frozen' to second entry in sys.path</p> <p>bare-arm port: <br />- mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM <br />- mpconfigport.h: disable remaining optional features</p> <p>cc3200 port: no changes specific to this component/port</p> <p>esp8266 port: <br />- boards/GENERIC: enable f-strings <br />- extract qstr from object when comparing keys in config() <br />- etshal.h: remove unneeded function declarations <br />- allow building a board to any dest directory</p> <p>esp32 port: <br />- boards: add new FeatherS2-Neo board definition <br />- machine_timer: use tx_update member for IDF 4.4 and above <br />- add support for ESP32-S3 SoCs <br />- boards: add new GENERIC_S3 board definition <br />- machine_hw_spi: fix hardware SPI DMA channels for S2/S3 <br />- boards: add board definition for ESP32-S2-WROVER module <br />- boards: add LOLIN_S2_MINI ESP32-S2 board <br />- machine_pwm: add support for all PWM timers and channels <br />- README: updated readme with req IDF vers for ESP32-S2, C3 and S3 <br />- usb: add USB host connection detection for CDC serial output <br />- machine_pin: block out IO16 and IO17 when using SPIRAM on ESP32 <br />- mpthreadport: fix TCB cleanup function so thread_mutex is ready <br />- main: add option for a board to hook code into startup sequence <br />- split out WLAN code from modnetwork.c to network_wlan.c <br />- enable optimisations and move code to iRAM to boost performance <br />- usb: improve speed of USB CDC output <br />- add specific deploy_s2.md instructions for esp32-s2 <br />- boards/LOLIN_S2_MINI: add image to board.json <br />- boards: update board and deploy metadata for UM_xxx boards <br />- usb: further improve speed of USB CDC output <br />- boards/LOLIN_S2_PICO: add LOLIN_S2_PICO board definition files <br />- boards/ESP32_S2_WROVER: link to specific deploy_s2 instructions <br />- support building with latest IDF v5 <br />- in machine_i2s, send null samples in underflow situations <br />- in machine_i2s, make object reference arrays root pointers <br />- add SDCard support for S3, and a GENERIC_S3_SPIRAM board <br />- boards/GENERIC_S3: enable BLE on ESP32 S3 <br />- machine_pwm: implement duty_u16() and duty_ns() PWM methods <br />- extract qstr from object when comparing keys in config() <br />- machine_pin: make GPIO 26 usable for S2,S3 if SPIRAM not config'd <br />- machine_hw_spi: fix SPI default pins reordering on ESP32-S2/S3 <br />- machine_hw_spi: set proper default SPI(id=1) pins on S2,S3 and C3 <br />- machine_hw_spi: set proper default SPI(id=2) pins on S2 and S3 <br />- boards: remove SPI pin defaults from GENERIC S2/S3 boards <br />- modnetwork: synchronize WiFi AUTH_xxx constants with IDF values <br />- machine_pwm: keep duty constant when changing frequency <br />- machine_bitstream: replace bit-bang code with RMT-based driver <br />- machine_i2s: add support for ESP-IDF 4.4 <br />- machine_bitstream: fix signal duplication on output pins <br />- esp32: enable platform module with IDF version <br />- boards/GENERIC_D2WD: build with -Os optimisation <br />- esp32_rmt: install RMT driver on core 1 <br />- machine_bitstream: reinstate bitstream bit-bang implementation</p> <p>javascript port: no changes specific to this component/port</p> <p>mimxrt port: <br />- sdcard: implement SDCard driver <br />- machine_bitstream: add bitstream function to machine module <br />- rework flash configuration <br />- sdram: add SDRAM support <br />- eth: add LAN support and integrate the network module <br />- modmachine: implement machine.WDT() and machine.reset_cause() <br />- boards: fix the D14/D15 pin assignment of MIMXRT1050/60/64_EVK <br />- hal: remove duplicate definitions from flexspi_hyper_flash.h <br />- dma_channel: fix the DMA channel management <br />- fix cycle counter for time.ticks_cpu() and machine.bitstream() <br />- add dht_readinto() to the mimxrt module, and freeze dht.py <br />- extend the help() message and README.md <br />- mpconfigport.h: enable f-strings <br />- modmachine: implement soft_reset() and unique_id() functions <br />- boards/make-pins.py: allow empty lines and comments in pins.csv <br />- optimize the runtime speed <br />- enable the platform module <br />- boards: add the Seeed ARCH MIX board <br />- boards: update the board.json files and add deploy_xx.md files <br />- fix mp_hal_quiet_timing_enter()/exit() so timer still runs <br />- support PWM using the FLEXPWM and QTMR modules <br />- define UART 0 on MIMXRT boards <br />- support selection of PHY type and address <br />- re-enable eth checksum creation by HW <br />- fix a tiny unnoticed bug in sdcard.c <br />- add a driver for the DP83848 PHY device <br />- refactor the reading of the machine id <br />- enable ticks_cpu at boot time for NDEBUG builds only <br />- use -Og instead of -O0 for DEBUG builds <br />- tidy up the board flash related files <br />- hal: allow readSampleClkSrc to be configured by a board <br />- enable MICROPY_PY_USSL_FINALISER</p> <p>minimal port: <br />- mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM <br />- Makefile: don't force a 32-bit build <br />- mpconfigport.h: disable features that are not needed</p> <p>nrf port: <br />- Makefile: improve Black Magic Probe commands <br />- main: use VFS helper function to mount fs and chdir</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>rp2 port: <br />- mpconfigport.h: enable heapq module <br />- add support for bluetooth module using NimBLE <br />- add framework for networking <br />- mpconfigport.h: use the "extra" feature level <br />- enable optimisations (comp goto, map cache, fast attr) <br />- machine_i2s: add I2S protocol support <br />- add support for Nina-W10 WiFi/BT module <br />- boards: add support for Arduino Nano RP2040 <br />- machine_bitstream: implement the machine.bitstream driver <br />- boards: add neopixel.py to manifest.py <br />- rp2_pio: support exec with sideset <br />- boards/PIMORONI_PICOLIPO_16MB: fix 16MB flash size <br />- boards: add PYBSTICK26 RP2040 board definition <br />- machine_uart: handle and clear UART RX timeout IRQ <br />- boards/ARDUINO_NANO_RP2040_CONNECT: set default I2C pins <br />- machine_pwm: fix PWM frequency setting <br />- machine_pwm: keep duty value when changing the frequency <br />- add support for DHT11 and DHT22 sensors <br />- CMakeLists.txt: allow a board to override PICO_BOARD <br />- boards/GARATRONIC_PYBSTICK26_RP2040: use correct pico-sdk board cfg</p> <p>samd port: <br />- integrate latest asf4, add help, more time funcs and uPy features <br />- samd_soc: allow a board to configure the low-level MCU config <br />- add internal flash block device, filesystem and uos support <br />- add Pin and LED classes, and machine.unique_id <br />- boards/ADAFRUIT_FEATHER_M0_EXPRESS: update for flash and pins <br />- boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS: update for flash and pins <br />- boards/MINISAM_M4: update for flash and pins <br />- boards/ADAFRUIT_TRINKET_M0: update for flash and pins <br />- boards/SAMD21_XPLAINED_PRO: update for flash and pins <br />- boards/SEEED_WIO_TERMINAL: add new board definition <br />- boards/SEEED_XIAO: add new board definition <br />- README.md: update README to reflect new features and boards</p> <p>stm32 port: <br />- pin: enable GPIO clock of pin if it's constructed without init <br />- main: don't unconditionally enable GPIO A,B,C,D clocks <br />- boards/VCC_GND_H743VI: add board definition for VCC_GND_H743VI <br />- boards/OLIMEX_E407: add Ethernet RMII support <br />- boards/LEGO_HUB_NO6: remove user paths from cc2564 init file <br />- boards: remove trailing spaces, and add newline at end of file <br />- add basic support for STM32H750 <br />- add support for H7A3(Q)/H7B3(Q), and STM32H73B3I_DK board defn <br />- suggest putting code in main.py not boot.py <br />- boards/make-pins.py: allow a CPU pin to be hidden <br />- boards/make-pins.py: allow empty lines and comments in pins.csv <br />- dma: add functions for external users of DMA to enable clock <br />- enable LOAD_ATTR fast path, and map lookup caching on &gt;M0 <br />- boards: add OLIMEX H407 board definition <br />- enable platform module <br />- extended flash filesystem space to 512K on H743 boards <br />- boards/NUCLEO_H743ZI: enable VfsLfs2 on NUCLEO_H743ZI(2) boards <br />- boards: add PF11-BOOT0 to stm32f091_af.csv <br />- machine_i2c: use hardware I2C for STM32H7 <br />- sdram: enforce gcc opt, and use volatile and DSB in sdram_test <br />- usbd_cdc_interface: allow a board to hook into USBD CDC RX events <br />- mpbthciport: allow a board to hook BT HCI poll functions <br />- pendsv: allow a board to add entries for pendsv_schedule_dispatch <br />- boards: add images to board.json for Adafruit and VCC_GND boards <br />- uart: fix race conditions and clearing status in IRQ handler <br />- mpconfigport.h: use the "extra" feature level <br />- in machine_i2s, send null samples in underflow situations <br />- in machine_i2s, make object reference arrays root pointers <br />- led: support an extra 2 LEDs in board configuration <br />- boards/MIKROE_CLICKER2_STM32: add more detail to board.json <br />- boards: add new board MikroElektronika Quail, and F427 support <br />- main: run optional frozen module at boot <br />- sdio: don't explicitly disable DMA2 on deinit of SDIO <br />- dma: make DMA2_Stream3 exclusive to SDIO when CYW43 enabled <br />- boards: build NUCLEO_WB55 and STM32F769DISC without mboot enabled <br />- boards: add PYBSTICK26 F411 board definition <br />- boards/NADHAT_PYBF405: rename board to GARATRONIC_NADHAT_F405 <br />- usb: use a table of allowed values to simplify usb_mode get/set <br />- boards/NUCLEO_WB55: update rfcore_firmwre for new WS <br />- flashbdev: support generic flash storage config via link symbols <br />- boards: convert F413,F439,H743,L4xx,WB55 to new flash FS config <br />- add support for F479 MCUs <br />- include HAL MMC code in F4 builds <br />- boards/make-pins.py: use cpu pins to define static alt-fun macros <br />- boards/NUCLEO_WB55: fix LED ordering <br />- boards/LEGO_HUB_NO6: set filesystem label as HUB_NO6 <br />- boards: remove stray '+' characters at start of lines in ld files <br />- boards: remove unused MICROPY_HW_ENABLE_TIMER config <br />- boards: enable MICROPY_HW_ENABLE_SERVO on various boards <br />- update L4 code to build with latest stm32lib and L4 HAL 1.17.0 <br />- main: call sdcard_init when only MICROPY_HW_ENABLE_MMCARD enabled <br />- sdcard: support 8-bit wide SDIO bus <br />- sdcard: add config option to force MM card capacity <br />- factoryreset: init vfs flags before calling pyb_flash_init_vfs <br />- qspi: fix typo in address comment <br />- boards/make-pins.py: generate empty ADC table if needed <br />- boards/OLIMEX_H407: fix typo in OLIMEX H407 board.json <br />- network_wiznet5k: fix build error with wiznet5k and lwip enabled <br />- enable MICROPY_PY_USSL_FINALISER</p> <p>teensy port: <br />- switch to use manifest.py instead of FROZEN_DIR</p> <p>unix port: <br />- enable LOAD_ATTR fast path, and map lookup caching <br />- modusocket: support MP_STREAM_POLL in unix socket_ioctl <br />- modos: add support for uos.urandom(n) <br />- coverage: change remaining printf to mp_printf <br />- Makefile: use -Og instead of -O0 for debug builds</p> <p>windows port: <br />- README: remove unsupported Python instructions for Cygwin <br />- mpconfigport.h: enable help and help("modules") <br />- add support for build variants to windows port <br />- run tests via Makefile <br />- appveyor: build both standard and dev variants <br />- appveyor: build mpy-cross only once for mingw-w64 <br />- msvc: run qstr preprocessing phase in parallel</p> <p>zephyr port: <br />- mphalport.h: remove unused and unimplemented C-level pin API <br />- increase minimum CMake version to 3.20.0 <br />- update include path to reboot.h <br />- get UART console device from devicetree instead of Kconfig <br />- use CONFIG_USB_DEVICE_STACK for conditional USB device support <br />- upgrade to Zephyr v2.7.0 <br />- modbluetooth_zephyr: provide dummy connect_cancel function</p> dpgeorge