Skip to content

Tags: lvgl/lv_micropython

Tags

v1.20.0

Toggle v1.20.0's commit message
New mip package manager, compressed type structs and Pico W support

This release of MicroPython introduces a new lightweight package manager
called mip, which uses a custom protocol to query and install packages that
is optimised for embedded systems.  It is intended to take over the role of
upip and supports installing packages from micropython-lib as well as any
URL.  Mip can be run directly on a device (with network connectivity) or
via mpremote.  As part of this, all pure-Python drivers have been moved
from the micropython repository to the micropython-lib repository, making
it easier to install the packages needed for a given project.

In the MicroPython runtime, core/built-in types have been compressed by
only including in the C-level type struct as many slots for C function
pointers as is needed for a given type (instead of storing NULL pointers
for unused slots).  This resulted in a reduction of code size of many
kilobytes for all ports (eg around 1200 for bare-arm) with a very minimal
loss in performance.  Any third-party C extensions will need to be updated
to work with this change.  See commits
662b9761b37b054f08fe2f7c00d0fce3a418d0b0 and
3ac8b5851e5f4dade465d52b91ed2ccc17851263 for details.

The MicroPython VM/runtime has also seen many improvements and bug fixes,
including: addition of hex/fromhex methods to bytes/memoryview/bytearray,
dictionary union (PEP 584), support for __float__ and __complex__
functions, support for __dict__ on module objects and UTF-8 validation of
all strings.  Whole number floats are now formatted exactly, and there have
been other accuracy improvements to parsing and formatting of floats.
A sub-version has been introduced for .mpy files which is used only when a
.mpy file includes native code, allowing the native ABI to change while
retaining backwards compatibility with pure bytecode .mpy files.
There is now an option to have the GC heap split across more than one pool
of memory, although this is not yet in use by the ports.  And root pointer
registration has been simplified with the new MP_REGISTER_ROOT_POINTER
macro.

In the network module, the keyword arguments to scan(), connect() and
config() have been renamed to be more consistent across ports and drivers.
The changed argument names are: "essid" changed to "ssid", "auth" or
"authmode" changed to "security", and "password" changed to "key".  The old
keyword arguments are still supported so this change is backwards
compatible.  The functions network.hostname() and network.country() have
also been added and provide a standard interface across ports to set the
global networking configuration for all interfaces and interface types.  In
particular, setting the hostname is now supported for all CYW43xx-based
boards (pyboard-D, Arduino Portenta, Pico W, and others).

The mbedtls (SSL library) settings have also been unified across ports that
use this library and enable elliptic curve DH and DSA cryptography enabled
so that devices can connect to more websites.  The cert_reqs and cadata
arguments have also been implemented.  Sockets now support leaving
multicast groups.  WebREPL will now run the page from the device, allowing
WebREPL resources to load from a HTTPS site.

The bluetooth module has a minor breaking change for
IRQ_GATTC_CHARACTERISTIC_RESULT: def_handle has been replaced with
end_handle.  This is not expected to affect most programs as def_handle is
unlikely to be used.  See commit cacc96d98c2a70dc7e5194331ea70746c39746ec.

The uasyncio module now supports stream read(-1), handles gather with no
awaitables, and adds a clear() method to ThreadSafeFlag.  The framebuf
module adds ellipse and polygon drawing methods, and a fill argument to
rect() for consistency with those new methods.

A new port has been added, the "embed" port, which is a port of MicroPython
that targets the C language and outputs a set of self-contained .c and .h
files for embedding into a wider project.  An example is provided to show
how this works.

The esp8266 port has reverse-special-methods enabled on the GENERIC board,
uart.flush() and uart.txdone() added, real open drain output enabled on
pins driven by PWM, and adds the ability to set TX power for the WLAN
interface.

The esp32 port now uses synchronous BLE events which allows support for BLE
pairing and bonding.  The LAN driver adds support for LAN8710, KSZ8081,
configuration of ETH ref_clk pin, and support for SPI-based Ethernet chips.
UART now supports setting timeout_char and implements uart.flush() and
uart.txdone().  New boards include ESP32S3 with octal SPIRAM, Olimex PoE
boards and a generic board for unicore chips.  There have also been many
bug fixes, in particular for newer MCU versions such as S2, S3 and C3.

The mimxrt port has seen a lot of clean up of the code, support for
MIMXRT1176 MCUs and the MIMXRT1170_EVK board, a soft-timer implementation
of machine.Timer, addition of machine.bootloader(), as well as uart.flush()
and uart.txdone().

On the nrf port, machine.UART and machine.PWM have been improved to match
other ports (the PWM change is a breaking change), and machine.I2C now
supports the freq argument.  New boards include the Arduino Nano 33 BLE
sense board and the Seeed XIAO NRF52840 Sense.

The rp2 port sees the integration of the CYW43xx WiFi driver which is used
in the new Pico W board, a board similar to the Pico but with WiFi support.
Other new boards include W5500_EVB_PICO, WEACTSTUDIO and the nullbits Bit-C
PRO board.  Support has been added for named pins, including Pin.board and
Pin.cpu attributes, consistent with other ports that support this feature.
The machine.lightsleep() function has been implemented, along with SSL
certificate time validation, and more accurate formulas are used to
determine PWM frequency and duty.  The GC heap available to MicroPython
programs has been increased to use the maximum available free RAM, adding
about 20k to the user heap.  There have also been important bug fixes to
threading and concurrency when using both cores.

The samd port has been significantly extended to include: named pins with
a pins.csv file, and Pin.board and Pin.cpu attributes; ADC, PWM, DAC,
SoftSPI, SoftI2C, SPI, I2C and RTC classes added to the machine module;
pin.irq() method and OPEN_DRAIN mode for pins; freq, disable_irq,
enable_irq, idle, lightsleep and time_pulse_us functions added to the
machine module.  Floating point support has been added for SAMD21 devices,
and the math module enabled for SAMD51.  A board definition for Sparkfun
Think Plus has been added.

The stm32 port sees support added for STM32L1xx MCUs, STM32H723, USB on
STM32G0xx and mboot support for STM32G0xx.  The existing CYW43xx WiFi
driver has been replaced with the open-source version of cyw43-driver and
this has been integrated with all existing boards with CYW43xx chips.
Support for the CC3000 WiFi driver has been removed, and the Wiznet driver
integration has been reworked to use the generic one shared with other
ports (and also uses lib/wiznet5k instead of the old drivers/wiznet5k).
Hardware I2C implementation has been added for STM32L1xx and STM32L4xx,
support added for Arduino 1200bps touch to enter the bootloader (only on
Arduino boards), mbedtls (SSL) certificate time validation added, and
link-time-optimisation (LTO) enabled by default on boards with small flash
size.  New board definitions include: LEGO Hub No. 7, NUCLEO-L152RE,
NUCLEO-F756ZG, NUCLEO-H723ZG, Arduino Nicla Vision and Arduino Giga H7.
Arduino boards also now include a range of frozen libraries including
senml.

For the unix and windows ports, build outputs (including executables) are
now kept inside the $(BUILD) directory associated with the build.  As part
of this the variant suffix has been removed from the executable name.  For
example, what was micropython-coverage is now build-coverage/micropython,
and the standard variant is build-standard/micropython.  Furthermore, the
dev variant has been removed and its features enabled instead on the
standard variant, which now enables the same feature set as a typical
bare-metal board, making it more convenient to use for development.  The
remaining variants are: minimal, standard, nanbox, coverage.  The SSL
implementation for this port has switched from axtls to mbedtls, again to
match most bare-metal ports.

The javascript port has been renamed to the webassembly port, and adds
support for VFS and VfsPosix using Emscripten's POSIX filesystem layer.
The way stdout printing works has also changed to dispatch via a custom
event called "micropython-print".

The zephyr port upgraded Zephyr to v3.1.0, added custom configuration for
bbc_microbit_v2, and enabled finalisers.

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

       bare-arm:   -1124  -1.934%
    minimal x86:   -4322  -2.967%
       unix x64: +264181 +50.533% standard
          stm32:   -3592  -0.906% PYBV10
         cc3200:   -1832  -0.990%
        esp8266:   -2284  -0.327% GENERIC
          esp32:   +9659  +0.632% GENERIC
            nrf:     -84  -0.045% pca10040
            rp2:  +13096  +4.291% PICO
           samd: +127776 +90.488% ADAFRUIT_ITSYBITSY_M4_EXPRESS

The changes that dominate these numbers are:
- bare-arm, minimal, stm32, cc3200, esp8266: reduced size due to compressed
  type structs
- unix: switching axtls for mbedtls, merging in dev configuration options
  and features
- esp32: new Ethernet drivers and some additional machine module
  functionality
- nrf: compressed type struct and machine module improvements
- rp2: additional mbedtls features and ciphers
- samd: many new features, and machine module classes and functions

Thanks to everyone who contributed to this release:
Alex Riesen, Andrew Leech, Andrew Scheller, Angus Gratton, Antonello
Margottini, Antonin ENFRUN, Ayke van Laethem, Blake Felt, brave ulysses,
Brian Cooke, Brian Pugh, Carlosgg, Chris Overgaauw, Chris Swan, Chris
Waggoner, chrismas9, Christian Clauss, Christian Walther, Clayton Cronk,
cpottle9, Dale Weber, Damiano Mazzella, Damien George, Damien Tournoud, Dan
Ellis, Daniel Jour, David (Pololu), David Grayson, David Lechner, David
Peake, David Yang, Dorukyum, Efi Weiss, enriquezgarc, Felix Dörre, Florian
Weimer, glenn20, hoihu, Howard Lovatt, iabdalkader, Ian Davies,
IcedRooibos, Ihor Nehrutsa, Jacob Siverskog, Jan Hrudka, Jan Willeke, Jared
Hancock, Jatty_, Jay Greco, Jeff Epler, Jeremy Rand, Jim Mussared, Jonas
Scharpf, Jos Verlinde, Juan Francisco Cantero Hurtado, Koen De
Vleeschauwer, Kyuchumimo, Lars Haulin, Laurens Valk, LiaoJingyi_winY7kp,
Luiz Brandao, ma-lalonde, manobendro, Maripo GODA, Mark Grosen, Martin
Milata, Mat Booth, Matt Trentini, Maureen Helm, Michael Bentley, Michael
Mogenson, MrJake222, Nathan Hendler, Ned Konz, Nicholas H.Tollervey, Oliver
Joos, omogenot, Patrick, Patrick Joy, Paul Grayson, Paul Warren, Pepijn de
Vos, Peter Harper, Peter Hinch, PGE, Phil Howard, Philip Peitsch, Philipp
Ebensberger, pmendham, Rayane Chatrieux, Red_M, Rob Knegjens, robert-hh,
Sebastian Romero, Simon Arlott, Sky, Stewart C. Russell, Stig Bjørlykke,
stijn, Stuart Langridge, Takeo Takahashi, Thorsten von Eicken, Tim Gates,
Tobias Thyrrestrup, Tomasz 'CeDeROM' CEDRO, Tomofumi Inoue, TPReal,
Trammell hudson, Wind-stormger, yn386, Yonatan Goldschmidt, 小权一句两句.

The work done in this release was funded in part through GitHub Sponsors,
by George Robotics, and by Planet Innovation.

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

Main components
===============

all:
- fix paths to mpy-cross and micropython binaries
- remove MICROPY_PY_IO_FILEIO config option
- update all manifest.py files to use new features
- simplify buffer protocol to just a "get buffer" callback
- standardise mp_obj_type_t initialisation
- make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE
- fix #if inside MP_DEFINE_CONST_OBJ_TYPE for msvc
- remove unnecessary locals_dict cast
- use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS
- keep msvc build output in build/ directories
- fix Python comparison to None and True, and use "not in"
- use micropython-lib unconditionally in manifests
- replace upip with mip everywhere
- update Python formatting to black "2023 stable style"
- update copyright year range to include 2023

py core:
- vm: change comparison for finally handler search from > to >=
- emit: remove logic to detect last-emit-was-return-value
- emit: suppress unreachable bytecode/native code that follows jump
- objcell: make cell get/set funcs static-inline to reduce code size
- parsenum: support parsing complex numbers of the form "a+bj"
- parsenum: fix parsing of complex "j" and also "nanj", "infj"
- parsenum: optimise when building with complex disabled
- objclosure: forward function attributes for closures
- objfun: support function attributes on native functions
- builtin: remove unnecessary module declarations
- builtinhelp: don't show help for an MP_MODULE_ATTR_DELEGATION_ENTRY
- mkrules.cmake: improve printing of git-submodules error
- scheduler: de-inline and fix race with pending exception / scheduler
- vm: document internal SELECTIVE_EXC_IP option
- emitnative: fix STORE_ATTR viper code-gen when value is not a pyobj
- vm: remove check for ip being NULL when handling StopIteration
- vm: in YIELD_FROM opcode, expand helper macros and remove them
- vm: consistently indent #if guards to match the code they surround
- objnamedtuple: fix segfault with empty namedtuple
- misc: add MP_STATIC_ASSERT_NOT_MSC()
- obj: add static safety checks to mp_obj_is_type()
- obj: add debug-only runtime checks to mp_obj_is_type()
- make_root_pointers: add MP_REGISTER_ROOT_POINTER parser/generator
- mpstate: drop MICROPY_PORT_ROOT_POINTERS from mp_state_vm_t
- persistentcode: use MP_REGISTER_ROOT_POINTER()
- modsys: use MP_REGISTER_ROOT_POINTER()
- scheduler: use MP_REGISTER_ROOT_POINTER()
- misc: fix msvc compilation with compressed error messages
- qstr: make mp_decompress_rom_string decl and def the same
- gc: allow the GC heap to be split over multiple memory areas
- gc: reduce code size when MICROPY_GC_SPLIT_HEAP is disabled
- obj: add support for __float__ and __complex__ functions
- obj: make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first
- compile: support large integers in inline-asm data directive
- modio: remove FileIO and TextIOWrapper from io module
- formatfloat: format all whole-number floats exactly
- builtinimport: remove duplicate static function argument
- mkenv.mk: use micropython-lib from submodule by default
- runtime: fix crash in star arg unpacking
- mpprint: fix formatting typo with mp_print_ext_t struct name
- objstr: reformat str access macros to make them readable
- mkrules.mk: keep all build artefacts inside $(BUILD) directory
- dynruntime.mk: allow building assembly source in natmods
- nlrpowerpc: fix generation of ppc64 code on ppc32 build
- qstr: change qstr hash type from mp_uint_t to size_t
- objstr: consolidate methods for str/bytes/bytearray/array
- objstr: add hex/fromhex to bytes/memoryview/bytearray
- objstr: remove str function object declarations from header file
- mkrules: use abspath to find directory for mpy-cross dependency
- parsenum: ensure that trailing zeros lead to identical results
- formatfloat: use pow(10, e) instead of pos/neg_pow lookup tables
- dynruntime: add mp_obj_is_true
- clean up formatting of union definitions
- builtinimport: allow overriding of mp_builtin___import__
- objstr: split mp_obj_str_from_vstr into bytes/str versions
- objstr: always ensure mp_obj_str_from_vstr is unicode-safe
- objstr: optimise mp_obj_new_str_from_vstr for known-safe strings
- objstr: always validate utf-8 for mp_obj_new_str
- persistentcode: clarify ValueError when native emitter disabled
- objpolyiter: add a new polyiter type with finaliser support
- mpconfig: add LFS1/LFS2 options to match FAT/posix
- mpconfig: make feature levels available to mpconfigport.h
- mpconfig: add "everything" features from unix coverage
- objpolyiter: fix comment about finaliser method
- mkrules.mk: add link to build troubleshooting on failure
- obj: add macro to declare ROM mp_obj_type_t instances
- objexcept: make MP_DEFINE_EXCEPTION use MP_DEFINE_CONST_OBJ_TYPE
- obj: add "full" and "empty" non-variable-length mp_obj_type_t
- obj: add accessors for type slots and use everywhere
- obj: add slot-index mp_obj_type_t representation
- obj: remove basic mp_obj_type_t sparse representation
- objtype: optimise slot RAM usage for instance types
- objnamedtuple: optimise slot RAM usage for namedtuple
- obj: merge getiter and iternext mp_obj_type_t slots
- obj: convert make_new into a mp_obj_type_t slot
- obj: optimise code size and performance for make_new as a slot
- persistentcode: introduce .mpy sub-version
- objmodule: add support for __dict__
- runtime: add mp_raise_OSError_with_filename helper function
- include filename in errors from loading/saving files via "open"
- parse: allow const types other than int to optimise as true/false
- objstr: don't treat bytes as unicode in str.count
- mkenv.mk: make CPP definition explicit for consistency
- objstr: add a helper to set mp_obj_str_t data
- modsys: add support for sys.executable
- py.mk: make user-C-module handling self-contained in py.mk
- misc: remove use of bitfield from vstr_t
- obj: verify floating point type is correct for repr C
- persistentcode: only emit sub-version if generated code has native
- obj: add comments explaining the slot index scheme
- makeversionhdr: fall back to py/mpconfig.h instead of docs/conf.py
- builtinimport: fix crash handling "weak link" module names
- objarray: detect bytearray(str) without an encoding
- emitnative: ensure load_subscr does not clobber existing REG_ARG_2
- nlrmips: add native NLR support for MIPS architecture
- makeversionhdr.py: allow running outside of repo
- objdict: implement dictionary union (PEP 584)
- bc: fix checking for duplicate **kwargs
- modmicropython: make module optional
- mpconfig: include micropython module in core features
- remove the word "yet" from exception messages
- pass in address to compiled module instead of returning it
- gc: avoid valgrind false positives
- gc: ensure a gap of one byte after the ATB
- gc: fix debug printing of GC layout
- obj: remove unused MP_DEFINE_CONST_OBJ_FULL_TYPE macro
- emitnative: initialise locals as Python object type for native code
- map: clear value when re-using slot with ordered dictionaries
- gc: increase the address length in gc_dump_alloc_table()
- objarray: raise error on out-of-bound memoryview slice start
- lexer: wrap in parenthesis all f-string arguments passed to format
- add parenthesis to default impl of MP_OBJ_TO_PTR, MP_OBJ_FROM_PTR
- objint_mpz: catch and reject @ and @= operating on big integers
- mkrules: support mpy-tool-flags in cmake frozen code generation
- mkrules.cmake: force build mpversion.h and frozen_content.c
- modmath: fix two-argument math function domain check
- emitnative: explicitly compare comparison ops in binary_op emitter
- makeversionhdr.py: optionally get git tag and git hash from env vars
- compile: fix scope of assignment expression target in comprehensions
- gc: make gc_dump_info/gc_dump_alloc_table take a printer as argument
- mpconfig: provide config option for internal printf printer
- builtinimport: fix unix port build with external imports disabled
- makeversionhdr.py: always add micro to version string even if it's 0
- obj: add MP_NOINLINE to mp_obj_malloc_helper
- mpstate: add mp_thread_is_main_thread() helper macro
- scheduler: implement VM abort flag and mp_sched_vm_abort()
- obj: fix spelling of staticmethod
- makeqstrdefs.py: fix handling GreenHills C/C++ preprocessor output

extmod:
- network_cyw43: rename WLAN keyword args to ssid/security/key
- network_ninaw10: rename WLAN connect argument from essid to ssid
- modlwip: clean up inclusion of modlwip in build process
- extmod.cmake: only include modbtree in build if it's enabled
- extmod.mk: separate out extmod file list from py.mk to extmod.mk
- modbtree: use buffer protocol for keys/values
- uasyncio: attempt to write immediately in Stream.write method
- uasyncio: implement stream read(-1) to read all data up to EOF
- vfs: prevent uninitialized variable warning for path_out
- network_cyw43: support new cyw43-driver
- modnetwork: include cyw43-driver header if it's enabled
- network_cyw43: add "security" config option to get/set auth mode
- btstack: use MP_REGISTER_ROOT_POINTER()
- nimble: use MP_REGISTER_ROOT_POINTER()
- modnetwork: use MP_REGISTER_ROOT_POINTER()
- uos_dupterm: use MP_REGISTER_ROOT_POINTER()
- modlwip: use MP_REGISTER_ROOT_POINTER()
- vfs: use MP_REGISTER_ROOT_POINTER()
- modbluetooth: use MP_REGISTER_ROOT_POINTER()
- always use custom mbedtls error message code
- modussl_mbedtls: implement cert_reqs and cadata arguments
- btstack: fix descriptor discovery handle range and events
- network_ninaw10: move ninaw10 root pointer registrations here
- modbluetooth: add support for running sync irq on system thread
- webrepl: allow the page to run from the device (over HTTP)
- uasyncio: handle gather with no awaitables
- ntptime: factor out ntptime module from esp8266 port
- modussl_mbedtls: set a more sensible default debug log level
- network_cyw43: add hostname config option
- network_wiznet5k: register NIC when the lwIP stack is used
- network_wiznet5k: drop obsolete argument count check
- network_wiznet5k: deinit the NIC before (re-)initialisation
- network_wiznet5k: schedule clearing of interrupt flags
- network_wiznet5k: rearrange the function wiznet5k_poll()
- network_wiznet5k: extract SPI transfer function dynamically
- uasyncio: add clear method to ThreadSafeFlag
- uasyncio: rename internal _flag to state, to save a qstr
- modlwip: add support for leaving multicast groups
- vfs_posix_file: remove unused MICROPY_VFS_POSIX_FILE
- modframebuf: optimise argument handling
- modframebuf: add fill argument to rect()
- modframebuf: add ellipse drawing method
- modframebuf: add polygon drawing methods
- modframebuf: improve poly-fill boundary pixels
- network_wiznet5k: use the configured DNS address if available
- machine_i2c: call MICROPY_PY_EVENT_HOOK during i2c.scan()
- modure: convert byte offsets to unicode indices when necessary
- modbluetooth: fix descriptor registration with empty tuple
- modbluetooth: replace def_handle with end_handle in char IRQ
- vfs: add finaliser to ilistdir to close directory handle
- vfs_posix_file: implement finaliser for files
- modbluetooth: change data_len type from size_t to uint16_t
- modbluetooth: do GATTC reassembly in protected uPy context
- modbluetooth: run BLE IRQ callback in protected NLR context
- extmod.mk: make extmod.mk handle GIT_SUBMODULES
- make extmod.mk self-contained
- utime_mphal: make ticks_add check for overflow of delta
- btstack: update BTstack bindings to work with latest BTstack
- mbedtls: add common configuration file, and use it in all ports
- mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
- mbedtls: enable elliptic curve DH and DSA cryptography
- mbedtls: remove MBEDTLS_ECP_DP_CURVE25519_ENABLED config
- mbedtls: remove brainpool curves from config
- machine_timer: move stm32's implementation of machine.Timer here
- vfs_posix: include errno.h and unistd.h headers
- extmod.cmake: allow overriding the default MBEDTLS_CONFIG_FILE
- modlwip: use actual errno in exception for error in listen
- extmod.mk: set default mbedtls config file in extmod Makefile
- btstack: allow the BTstack config to be overridden by a board
- add and reorganise compilation guards and includes
- extmod.cmake: add MICROPY_PY_BTREE compiler definition
- moduplatform: remove _M_IX86 test for xtensa
- moduplatform: fix MSVC x86_64 check
- modframebuf: fix crash in FrameBuffer scrolling beyond extents
- uasyncio: fix syntax of generator functions
- modnetwork: use a type protocol to implement NIC functions
- modussl_mbedtls: fix support for ioctl(MP_STREAM_POLL)
- network_cyw43: fix handling of networks with open security
- axtls-include: add back needed header files for building axTLS
- utime_mphal: fix comment re delta range check in time_ticks_add
- modbtree: move system includes within MICROPY_PY_BTREE guard
- modnetwork: add network.hostname() and network.country()
- modnetwork: allow more extensive port-specific customisation
- network_cyw43: use CYW43_CHANNEL_NONE for default arg in connect
- vfs_posix: do not filter '..*' in ilistdir when filtering '..'
- network_ninaw10: check socket types when creating new sockets
- network_cyw43: fix setting hostname using config() method
- network_cyw43: add support to get STA RSSI using status() method
- network_ninaw10: add missing raw socket type to socket()
- btstack: switch to use hci_dump_init instead of hci_dump_open
- modbluetooth: merge gatts_notify/indicate implementation
- btstack: fix indicate/notify queuing
- btstack: include value handle in client read/write events
- btstack: fix MTU handling
- btstack: add support for CCCD to allow client subscriptions
- nimble: fix flags for descriptor registration
- modbluetooth: make all HCI transports trace in the same format
- btstack/modbluetooth_btstack: add default services

shared:
- runtime/tinyusb_helpers: add TinyUSB helper functions
- netutils/dhcpserver: match default DNS to server IP
- readline: use MP_REGISTER_ROOT_POINTER()
- runtime/pyexec: use MP_REGISTER_ROOT_POINTER()
- runtime/softtimer: move softtimer.[ch] to shared/runtime
- runtime/softtimer: remove obsolete #include statement
- runtime/sys_stdio_mphal: make func static and remove some TODOs
- runtime/gchelper_native: fix pointer cast on x86_64
- netutils: add "py/obj.h" header include
- tinyusb: create common TinyUSB code for reuse by ports
- tinyusb: further refactor static USB device implementation
- tinyusb: fix CDC bNumInterfaces value
- runtime: use mp_printf consistently, instead of printf
- runtime/gchelper: drop cpu directive from ARM asm helpers
- runtime/softtimer: use consistently the same clock source
- runtime/softtimer: fix ticks range when computing ticks diff
- tinyusb: allow max USB descriptor string to be configured
- runtime/pyexec: don't allow Ctrl+C to interrupt frozen boot code
- tinyusb: revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256

drivers:
- hts221: add HTS221 humidity sensor driver
- lsm9ds1: add LSM9DS1 IMU driver
- lps22h: add LPS22HB/HH pressure sensor driver
- lps22h: use machine.idle for power saving
- ninaw10/nina_wifi_bsp: use MP_REGISTER_ROOT_POINTER()
- fix a few typos in comments
- cyw43: allow configuring the netif/mDNS hostname
- sdcard: add delay in init_card_v1 to make timeout work
- wiznet5k: remove old Wiznet driver
- cc3000: remove CC3000 WiFi driver files
- display: don't include tests by default
- remove drivers that are now in micropython-lib
- ninaw10: connect to WiFi asynchronously
- bus: detect QSPI transfer errors and pass up to spiflash driver
- bus: change QSPI read_cmd signature to return an error code
- ninaw10: implement machine.Pin external pin controls
- cyw43: use board-defined BLE UART secondary baudrate
- cyw43: use a different baudrate for BT firmware download
- ninaw10: fix machine_pin GPIO read
- cyw43: include CYW43 config file
- ninaw10: add missing external pins 34 and 39
- ninaw10: fix ESP32 input-only pins

mpy-cross:
- Makefile: respect existing CFLAGS and LDFLAGS
- remove .gitignore file
- include alloca.h for NetBSD
- mpy_cross: add Python wrapper for mpy-cross
- mpy_cross: fix default path to mpy-cross binary
- mpy_cross: add a way to query the mpy version
- mpy_cross: add list of architectures to `__all__`
- mpy_cross: add docstrings to public methods
- main: don't set a default native architecture
- main: add MSVC-compatible architecture checks
- force forward slashes in paths
- main: fix return type of mp_import_stat

lib:
- cyw43-driver: add new submodule for CYW43xx WiFi driver
- pico-sdk: update to version 1.4.0
- cyw43-driver: update cyw43-driver to fix ap_auth mode setting
- tinyusb: update to the most recent master
- cyw43-driver: update driver to latest version
- micropython-lib: add micropython-lib as a submodule
- lwip: update lwIP to v2.1.3, tag STABLE-2_1_3_RELEASE
- micropython-lib: update to latest version with manifest changes
- micropython-lib: update submodule to latest
- stm32lib: update library to get L1 v1.10.3, and some other fixes
- micropython-lib: update submodule to latest
- btstack: update to v1.5.3
- micropython-lib: update submodule to latest
- libm: use __asm__ instead of asm
- btstack: update to v1.5.4
- cyw43-driver: update driver to latest version
- re1.5: reduce code size when checking for named class char
- re1.5: add support for named classes in class sets
- micropython-lib: update submodule to latest
- cyw43-driver: update driver to latest version
- pico-sdk: update to version 1.5.0
- cyw43-driver: update driver to latest version v0.9.0
- micropython-lib: update submodule to latest
- stm32lib: update library to get H7 v1.11.0
- cyw43-driver: update driver to latest version v1.0.0
- micropython-lib: update submodule to latest

Support components
==================

docs:
- update to use new WLAN argument names for ssid/security/key
- library/pyb.Timer: document `brk` argument and its constants
- library: remove unnecessary "pyb." prefix on class names
- set LaTeX engine to XeLaTeX for PDF generation
- library/machine: add note on interrupts being critical to system
- library/uasyncio: consistently use "uasyncio" instead of "asyncio"
- library/bluetooth: add link to aioble
- library/neopixel: add note that neopixel is included in rp2 builds
- library/time: provide more info about which epoch is used
- library/pyb.Pin: fix out-of-context paragraphs, and AF_PP typo
- library/pyb.Pin: add Pin.ALT constant
- library/pyb.Timer: document how to use BKIN pin with example
- update links for Arm GCC toolchain
- library/rp2: fix pull_thresh docs to use pull instead of push
- esp32: fix string quoting consistency in SDCard mount example
- update CPython differences and improve the look of table layouts
- esp32: update UART quickref on input-only pins
- library/machine.UART: add notes about UART init and deinit
- library: fix nested rst styles not rendering
- library/micropython: fix spelling of compiler
- templates/topindex.html: update forum link
- library/machine.I2C: add a note about I2C pull-up resistors
- library/machine.UART: add docs for uart.flush() and uart.txdone()
- renesas-ra: add pin drive keyword argument description
- Makefile: enable parallel compilation for Sphinx
- templates/layout.html: indicate latest vs release docs
- samd: add documentation for the samd port
- library/machine: add machine.memX to docs with brief example
- samd/pinout: fix the pin numbering for the default assignments
- develop: fix mp_compile snippet to match latest code
- renesas-ra: correct the internal file system size of EK-RA6M2
- library/array: add docs for dunder methods
- library/pyb.CAN: update the recv example to take a 5-tuple
- library/uasyncio: describe restriction on ThreadSafeFlag
- library/framebuf: clarify docs for blit regarding palette
- library/struct: fix buffer argument description
- library/struct: embed format tables
- library/neopixel: update GitHub URL for neopixel.py link
- differences: update Python 3.9 status
- differences: add Python 3.10 page
- rp2: make LED have exactly 50% duty cycle in PIO 1Hz example
- library/rp2.StateMachine: expand put() documentation
- library/socket: use correct sockaddr variable name
- esp32/quickref: add docs for the LAN interface constructor
- library/machine.Timer: add freq argument to machine.Timer
- reference/constrained: add missing heap-dump symbols to mem_info()
- zephyr/quickref: fix zsensor module usage examples
- library/network: update docs for network.country, network.hostname
- update copyright year range to include 2023

examples:
- embedding: remove obsolete axtls build target
- usercmodule: add example of a native C class
- embedding: rework example to use ports/embed
- rp2: add comment that examples using IO25 don't work on Pico W
- bluetooth: fix check for _conn_handle being None
- usercmodule/cexample: use mp_obj_malloc()
- bluetooth/ble_temperature_central.py: remove service tuple

tests:
- extmod: add heap-lock test for stream writing
- basics: add tests for __name__ and __globals__ attrs on closures
- perf_bench: add some configurations for N=32, M=10
- add an explanation of run-perfbench.py
- fix run-perfbench parsing "no matching params" case
- micropython: add test for builtin execfile() function
- extmod/ussl_basic: make test run on axtls and mbedtls
- cpydiff: fix formatting of code snippet to use double quotes
- run-tests.py: provide better default MPYCROSS value for Windows
- extmod/ubinascii: add tests for bytes.hex etc
- update path to unix micropython executable
- unicode: add test for invalid utf-8 file contents
- renesas-ra: update pin test to support all boards
- extmod/uasyncio_heaplock.py: force SKIP on stackless
- frozen: move frozentest.mpy from ports/ to tests/
- run-multitests: extend usage information
- run-multitests: make paths more deterministic
- allow 'special' tests to output "SKIP" on a single line
- extmod: add test for sleep_ms value that overflows ticks
- run-perfbench: support --heapsize argument and pass to executable
- basics: add exp file for builtin_str_hex test
- run-tests.py: use host arch for mpy-cross for target=unix
- misc: add test for cexample module
- misc/cexample_module: test class presence
- misc/cexample_class: fix timing sensitivity
- extmod/framebuf_scroll: add tests for FrameBuffer scrolling
- unix/mod_os: add test for os module
- extmod/ure_namedclass: add tests for named classes in class sets
- float: skip new complex tests if complex unavailable
- extmod: get DecompIO test running on low-memory targets
- extmod: skip vfs tests if target doesn't have enough memory
- micropython: split viper_misc test into two files
- float: add domain checks for log and also -inf
- float: make output of math function tests more readable
- run-multitests.py: add ability to test instance over reboot
- multi_bluetooth: add bluetooth multi-test for deepsleep
- run-multitests.py: support outputting test metrics
- multi_bluetooth: use multitest.output_metric in BLE perf tests
- extmod/vfs_fat_ilistdir_del.py: use 512-byte erase block size
- multi_bluetooth: use time.sleep_ms instead of time.sleep
- multi_bluetooth/ble_mtu: split peripheral/central-initiated
- multi_bluetooth/ble_subscribe: use end_handle in desc discovery
- multi_bluetooth: add test for descriptors
- multi_bluetooth/ble_characteristic.py: add write-no-response
- multi_bluetooth: use multitest.broadcast instead of sleep

tools:
- metrics.py: add mimxrt and renesas-ra to list of available ports
- ci.sh: drop ppa requirement for code formatting CI
- pyboard.py: add verbose option to filesystem_command
- mpremote: don't be verbose when using cat command
- autobuild: add nrf port to autobuild scripts
- ci.sh: initialise submodules for more ports
- ci.sh: force mpy-cross build for samd and teensy
- update path to unix micropython executable
- mpremote: allow + terminator for fs commands
- pyboard.py: add "touch" filesystem command
- mpremote: add "edit" command
- ci.sh: split the stm32 builds for wiznet5k and cc3k
- mpremote: print a nicer error when a filesystem command fails
- pyboard.py: remove implicit fs_put if source starts with ./
- pyboard.py: add fs_cp function for direct device-to-device copy
- mpremote: print nicer errors for unsupported 'cp -r' arguments
- manifestfile.py: add library for working with manifests
- makemanifest.py: update to use mpy_cross module
- manifestfile.py: allow include of directory path
- manifestfile.py: allow require() to specify unix packages
- manifestfile.py: allow manifests to set metadata
- autobuild: use distinct directory for building stm32 variants
- makemanifest.py: force the repo version of the mpy_cross package
- pyboard.py: support Windows pathname separators
- manifestfile.py: add `author` kwarg to metadata()
- manifestfile.py: replace recursive glob with os.walk
- mpremote: simplify dispatch of commands
- mpremote: use argparse for command line parsing
- mpremote: add `mpremote mip install` to install packages
- pyboard.py: handle unsupported fs command
- add note about uncrustify versions
- add pre-commit support
- mpremote: fix argument handling for follow and add help strings
- mpremote: bump version to 0.4.0
- verifygitlog.py: ignore comment lines in commit messages
- verifygitlog.py: add additional help for subject line issues
- mpremote: handle FileNotFound exceptions in listdir
- mpremote: make RemoteFile objects iterable
- makemanifest.py: fix printing of mpy_cross.CrossCompileError
- gen-cpydiff.py: use os.path.join and os.path.isdir
- gendoc.py: remove unused script
- ci.sh: add ARDUINO_NANO_RP2040_CONNECT to rp2 CI build
- ci.sh: remove one build from zephyr CI to speed it up
- ci.sh: don't print python2 version
- mpremote: allow EDITOR environment variable to work on Windows
- mpremote: only auto connect to serial device with USB VID/PID
- autobuild: create .uf2 file for seeed_xiao_nrf52
- pyboard.py: fix Python 2 compatibility
- pyboard.py: add parse kwarg to eval
- pyboard.py: add fs_{listdir,readfile,writefile,stat}
- pyboard.py: set DTR on Windows to avoid ESPxx hard reset
- mpy-tool.py: initialize line_info_top
- ci.sh: install pkg-config for macos builds
- ci.sh: add unix, stm32 and rp2 ports to code size check
- mpremote: use hatch to build mpremote package
- pyboard.py: use '/' exclusively when dealing with paths
- pyboard.py: fix joining of path in filesystem_command
- pyboard.py: fix ESPxx boards hanging in bootloader after reset
- manifestfile.py: add support for publishing packages to PyPI
- mpremote: add ctrl-x as additonal mpremote disconnect shortcut

CI:
- ISSUE_TEMPLATE: make minor improvements to placeholder text
- ISSUE_TEMPLATE: replace forum with Discussions
- workflows: print test failures for webassembly workflow
- workflows: bump actions/checkout to v3
- add dependabot to update GitHub Actions
- workflows: bump codecov/codecov-action from 1 to 3
- workflows: bump actions/setup-python from 1 or 2 to 4
- workflows: run unix port workflow if mpy-cross changes
- workflows: use ubuntu-20.04 when python2 is required
- workflows: run mpy-format CI when tests and examples change
- workflows: comment on code size change instead of failing CI
- workflows: fix code size comment workflow for non-PR
- workflows: cancel when branch is updated
- workflows: update existing comments for code_size_comment
- workflows/code_size: print code size change
- workflows: add "shared/**" to list of paths that trigger CI
- workflows: add workflow to build mpremote wheel
- workflows: bump actions/setup-python from 1 to 4
- workflows: bump actions/checkout from 2 to 3
- workflows: bump actions/upload-artifact from 2 to 3

The ports
=========

all ports:
- adapt mimxrt, nrf and rp2 ports to work with latest TinyUSB
- fix a few typos in comments
- remove unused mp_type_{fileio/textio} macros in mpconfigport.h
- always include debug information in the ELF
- always append to GIT_SUBMODULES
- use micropython-lib version of drivers in manifests
- make generated pin.c handling more consistent across ports
- make all network-capable boards use bundle-networking
- make BOARD default from BOARD_DIR in Makefile's
- rename remaining "Micro Python" to "MicroPython"
- fix MCU tags in Arduino board.json files
- implement simple write polling for stdout

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

cc3200 port:
- mpconfigport: remove mp_const_user_interrupt
- use MP_REGISTER_ROOT_POINTER()
- fix various array-based compiler warnings
- mods/pybuart: implement uart.flush() and uart.txdone()
- remove unused NIC type customisation

embed port:
- add new "embed" port which builds a simple C package
- fix arguments to mp_raw_code_load_mem

esp8266 port:
- modnetwork: rename WLAN keyword args to ssid/security/key
- mpconfigport: switch to ROM feature level configuration
- mpconfigport: disable MICROPY_PY_UTIMEQ
- rename WLAN dhcp_hostname config to hostname
- boards: enable reverse-special-methods on GENERIC board
- use MP_REGISTER_ROOT_POINTER()
- modnetwork: add support for WLAN.config(protocol=XX) option
- README: update build instructions to match ci.sh
- machine_uart: implement uart.flush() and uart.txdone()
- modmachine: move dht_readinto() to the machine module
- machine_pwm: enable real open drain output on pin driven by PWM
- machine_pin: disable open drain when pin becomes input/output
- modnetwork: add ability to set tx power for WLAN interface
- README: remove notice about port being "experimental"
- use extmod/modnetwork.c instead of port-specific version

esp32 port:
- network_wlan: rename WLAN keyword args to ssid/security/key
- machine_uart: implement the functionality of timeout_char arg
- boards: increase 512 bytes limit on ULP programs to 2040
- modesp32: add wake_on_ulp() so ULP can wake CPU from deepsleep
- network_wlan: don't raise exception when scan returns no results
- rename WLAN dhcp_hostname config to hostname
- modmachine: fix machine.freq to allow maximum 160MHz on ESP32-C3
- use MP_REGISTER_ROOT_POINTER()
- mpconfigport: enable BLE synchronous events and pairing/bonding
- Makefile: force micropython-lib as a required submodule
- network_wlan: use esp_wifi_set/get_channel to config wifi channel
- network_wlan: add support to set/get the wifi protocol
- modnetwork: add network.MODE_LR constant
- machine_uart: change sendbreak time to be at least 15 bit times
- machine_timer: support all init arguments in Timer constructor
- boards: merge manifest_release modules into standard manifest
- machine_sdcard: free SPI bus when deiniting SD card
- machine_uart: implement uart.flush() and uart.txdone()
- mphalport: fix calculation of large sleep by using 64-bit arith
- Makefile: add link to build troubleshooting on failure
- modsocket: use mp_obj_is_integer to test port type
- machine_pwm: don't use LEDC_USE_REF_TICK on ESP32-C3 variants
- machine_i2s: add I2S finaliser which calls deinit()
- machine_hw_spi: use auto DMA channel on S2, S3, C3 chips
- rename machine I2C and SPI types consistently across ports
- machine_i2c: fix clocks and timeouts for ESP32-C3, ESP32-S3
- machine_pin: fix size of machine_pin_irq_handler array
- machine_pwm: verify PWM is active when config methods are called
- add 32MiB partition table templates
- usb: add a timeout to usb_tx_strn()
- modmachine: move dht_readinto() to the machine module
- boards/GENERIC_S3_SPIRAM: enable BLE support
- boards/GENERIC_S3_SPIRAM: enable BLE
- machine_timer: fix ESP32C3 timer period doubling
- machine_touchpad: fix TouchPad for ESP32S2, ESP32S3
- main: don't call usocket_events_deinit if unavailable
- usb: cleanup connection detection
- boards/GENERIC_S3_SPIRAM_OCT: add ESP32S3 board with Octal SPIRAM
- network_lan: add support for LAN8710 PHY
- network_lan: support configuration of ETH ref_clk pin
- network_lan: add support for SPI-based ethernet chips
- network_lan: fix setting MAC address of ethernet devices
- network_lan: fix compilation on IDF lower than v4.4
- machine_sdcard: change dma_channel to SPI_DMA_CH_AUTO for ESP32S3
- boards: add board definition for Olimex ESP32 PoE boards
- boards/GENERIC_UNICORE: add board definition for unicore chips
- network_lan: add support for Ethernet PHY KSZ8081
- add a small delay before leaving wlan.active()
- boards/OLIMEX_ESP32_POE: remove id from and update board.json
- Makefile: allow specifying BOARD_DIR on make command line
- use extmod/modnetwork.c instead of port-specific version
- machine_pin: use const for size of machine_pin_irq_handler array
- esp32_rmt: fix looping behaviour for RMT on ESP32-S3

mimxrt port:
- Makefile: refactor Makefile and divide it into sections
- Makefile: modify handling of SDRAM option
- Makefile: modify handling of SDCARD option
- Makefile: rework board flash type handling
- Makefile: rework floating point config
- Makefile: fix some minor formatting inconsistencies
- boards: remove conditional assignment of flash type/size
- use MP_REGISTER_ROOT_POINTER()
- machine_uart: implement uart.flush() and uart.txdone()
- machine_uart: drop a few commented lines about TX ring buffer
- format the firmware image to match the new teensy loader
- machine_spi: allow a setting of -1 for cs in the constructor
- machine_uart: set the UART ioctl write poll flag properly
- machine_uart: fix a bug in UART.write()
- Makefile: split up SRC_C variables
- machine_pin: add the Pin.toggle() method
- fix CPU freeze when calling __WFE() in MICROPY_EVENT_POLL_HOOK
- machine_timer: use soft-timer implementation for machine.Timer
- machine_timer: use extmod version of machine.Timer
- mphalport: add a timeout to mp_hal_stdout_tx_strn()
- modmachine: move dht_readinto() to the machine module
- add support for MIMXRT1176 MCUs, and MIMXRT1170_EVK board
- README: add build and flashing instructions
- usb: change macro name MICROPY_HW_USB_STR_MANUF
- network: rename the argument clock_mode to ref_clk_mode
- Makefile: set MPY_CROSS_FLAGS
- mpconfigport: remove config options that are set by default
- machine_rtc: set the microsecond value to 0
- sdcard: fix an error when writing large blocks
- sdcard: remove obsolete code already excluded by preprocessor
- set MICROPY_GC_STACK_ENTRY_TYPE to uint32_t for large RAM
- Makefile: move the FROZEN_MANIFEST setting after board config
- enable ROM text compression
- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
- pendsv: clean up PendSV code
- Makefile: fix internal flash configuration and build
- boards/MIMXRT1064_EVK: fix board config to use internal flash
- mpconfigport: allow configuring different network interfaces
- modmachine: implement machine.bootloader()
- fix the build for boards without ROM API

minimal port:
- Makefile: avoid terminal reset, use BUILD variable
- Makefile: set linker to $(CC)
- increase heap size for Linux builds

nrf port:
- main: add startup and early-init board hook macros
- modmachine: add machine.bootloader() and make it customisable
- enable optional support for Arduino 1200bps touch
- Makefile: drop unused MPY_CROSS and MPY_TOOL variables
- boards/arduino_nano_33_ble: add Arduino Nano 33 BLE sense board
- modmachine: add machine.idle() function
- mpconfigport: remove obsolete module declarations
- drivers/bluetooth: handle PHY_UPDATE messages, used in Bluetooth 5
- drivers/usb: probe for interrupt char in USB CDC task
- drivers/usb: add a tud_cdc_rx_cb() callback to check interrupt char
- mpconfigport: call tud_task() in MICROPY_EVENT_POLL_HOOK
- drivers/usb: fix reading of a single USB CDC character
- use MP_REGISTER_ROOT_POINTER()
- boards/arduino_nano_33_ble_sense: update deploy instructions
- main: call usb_cdc_init() before executing boot.py and main.py
- modules/ubluepy: use mp_obj_str_get_data to extract str data
- don't enable debug info by default if LTO is on
- modules/machine/uart: implement uart.flush() and uart.txdone()
- Makefile: split up SRC_C variables
- rename machine I2C, PWM, SPI, UART types consistently across ports
- rename MICROPY_PY_MACHINE_TIMER to MICROPY_PY_MACHINE_TIMER_NRF
- boards/seeed_xiao_nrf52: add defn for Seeed XIAO NRF52840 Sense
- mpconfigport: enable seeding of the PRNG by the hardware RNG
- Makefile: add support for BOSSAC flasher
- boards/arduino_nano_33_ble_sense: add support for REV-2 chipset
- modules/machine/pwm: add paramter checks and error messages
- modules/machine/pwm: use extmod/machine_pwm.c for PWM module
- modules/machine/soft_pwm: add PWM for nrf51x boards using soft PWM
- modules/machine/pwm: support using all 4 channels of a PWM module
- modules/machine/uart: add timeout keyword options and "any" method
- nrfx_config: use the UARTE definitions and drivers for the NRF52xx
- modules/machine: use a dedicated function for machine.idle()
- modules/machine: support the freq=n argument for machine.I2C
- modules/machine/pwm: fix resource conflict, and change id to device
- nrfx_config: use UARTE for nrf52xxx devices
- modules/machine/uart: prevent UART lock-up after a receive error

pic16bit port:
- pic16bit_mphal: use MP_REGISTER_ROOT_POINTER()

powerpc port: no changes specific to this component/port

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

renesas-ra port:
- modmachine: allow boards to provide custom bootloader code
- machine_i2c: remove unnecessary start/stop dummy functions
- mpconfigport: drop pyb_hid_report_desc root pointer
- use MP_REGISTER_ROOT_POINTER()
- softtimer: switch to use softtimer code from shared/runtime
- machine_pin: support drive keyword and fix GPIO setting
- rename machine SPI type consistently across ports
- machine_timer: use extmod version of machine.Timer
- boards: update linker script to detect code flash overflow
- disable debugging option for RA4 to reduce code size
- change file system size to 64KB for RA6M1
- add the UART methods uart.txdone() and uart.flush()

rp2 port:
- modmachine: allow boards to provide custom bootloader code
- boards/ARDUINO_NANO_RP2040_CONNECT: enable Arduino 1200bps touch
- modmachine: implement lightsleep() with optional sleep period
- mpthreadport: ensure core1 doesn't hold gc lock in deinit
- mbedtls: enable some more mbedtls options
- lwip_inc: enable lwIP status callback
- rp2_flash: add asserts for size of flash filesystem partition
- mpnetworkport: convert network task scheduling to use PendSV IRQ
- integrate CYW43xx WiFi driver
- boards/PICO_W: add new Pico W board, an RP2040 with WiFi
- boards/GARATRONIC_PYBSTICK26_RP2040: change pico-sdk board name
- main: set default AP auth mode to WPA2_AES_PSK
- mpconfigport: factor core event handling to EVENT_POLL_HOOK_FAST
- Makefile: regenerate cmake if generated Makefile missing
- CMakeLists: give error if required submodules are missing
- CMakeLists: don't override cyw43-driver unless necessary
- boards/ARDUINO_NANO_RP2040_CONNECT: add urequests module
- run USB stack task exclusively from core 0
- make atomic sections suspend the other core (if active)
- mpconfigport: make networking options consistent across boards
- mphalport: fix missing storage_read_blocks symbol in debug build
- CMakeLists: use armv6m mpy-cross arch for rp2
- use MP_REGISTER_ROOT_POINTER()
- mpbthciport: remove mp_bthci_uart from set of root pointers
- cyw43_configport: set CYW43_EVENT_POLL_HOOK value
- cyw43_configport: set CYW43_WIFI_NVRAM_INCLUDE_FILE value
- rp2_pio: fix StateMachine.restart when PIO program is shared
- cyw43_configport: add event hook into cyw43_delay_ms
- Makefile: always use cmake to discover submodules
- mbedtls: enable certificate validity time validation
- machine_spi: add mp_hal_get_spi_obj helper function
- boards/W5500_EVB_PICO: add new board definition for W5500_EVB_PICO
- mark gc_heap NOLOAD for faster boot
- correctly determine path to arm-none-eabi-size
- machine_wdt: check for the maximum timeout value of watchdog
- machine_uart: implement uart.flush() and uart.txdone()
- mbedtls: fix missing time.h include
- rp2_flash: add start/len support to rp2.Flash() constructor
- boards: set PICO_BOARD correctly for each board
- machine_spi: use pico-sdk's default pins for SPI
- machine_i2c: use pico-sdk's default pins for I2C
- boards: remove all I2C,SPI pin defs that already match pico-sdk
- Makefile: add link to build troubleshooting on failure
- Makefile: add support for BOARD_VARIANTS
- boards/WEACTSTUDIO: add WEACTSTUDIO with multiple variants
- fatfs_port: fix the modification date of files
- rename machine I2C type consistently across ports
- mphalport: add a timeout to mp_hal_stdout_tx_strn()
- cyw43_configport: make sure only core0 executes a __WFI()
- modmachine: move dht_readinto() to the machine module
- allow enabling USB device without enabling USB-CDC
- boards/ARDUINO_NANO_RP2040: add more modules and enable MD5 hash
- fix lightsleep to work with interrupts and cyw43 driver
- machine_pwm: use more accurate formulas for freq and duty_u16
- machine_pwm: fix overflows with freq > 268 MHz
- mphalport: change order of pin operations to prevent glitches
- rp2_flash: call MICROPY_EVENT_POLL_HOOK_FAST after reading flash
- machine_pin: refactor the machine.Pin class for external GPIO
- machine_pin: add support for named pins and alternate functions
- boards: add pin CSV files to board definitions
- fix crash in a pin.irq handler
- main: use mp_printf in nlr_jump_fail
- machine_pin: fix configuring OPEN_DRAIN with initial value
- boards/NULLBITS_BIT_C_PRO: add Bit-C PRO board
- rp2_pio: track use of PIO resources and free them on soft reset
- boards/ARDUINO_NANO_RP2040_CONNECT: use default aioble
- mpconfigport: enable os.dupterm and hashlib.sha1 on all boards
- cyw43_configport: specify the chipset firmware include file
- Makefile: allow specifying BOARD_DIR on make command line
- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
- boards/ARDUINO_NANO_RP2040_CONNECT: include "time" in manifest
- boards/ARDUINO_NANO_RP2040_CONNECT: add more external pins
- boards/ARDUINO_NANO_RP2040_CONNECT: include "senml" in manifest
- modrp2: support reading the BOOTSEL button on the Pico board
- modrp2: disable other core, shorten delay to 8us in bootsel_button
- allocate GC heap from unused RAM
- allow disabling USB via MICROPY_HW_ENABLE_USBDEV config
- main: keep UART REPL with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1
- machine_uart: fix setting of UART LCR parameters
- machine_i2c: add timeout parameter for machine.I2C()
- memmap_mp.ld: allow a board to reserve memory for the C heap

samd port:
- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
- remove the existing provisional support for REPL on UART
- boards: replace pins.c and pins.h by pins.csv
- boards: move mcu-specific settings into a mpconfig_samdXX.h file
- Makefile: alphabetically sort the source code files in Makefile
- boards: add ADAFRUIT_FEATHER_M4_EXPRESS and _ITSYBITSY_M0_EXPRESS
- clock_config: set up the clock configuration
- modmachine: allow changing the CPU freq with machine.freq(f)
- mphalport: add pin open-drain funcs, and improve delay and ticks
- samd_isr: extend systick_ms to 64 bit
- machine_pin: add OPEN_DRAIN mode for pins
- machine_pin: allow specifying a pin or LED by its name as a string
- modmachine: enable SoftSPI and SoftI2C
- boards: create pin_af_table.c from pin_af_table_SAMDxx.csv files
- pin_af: add the pin af table and its helper functions
- machine_adc: add the machine.ADC class
- machine_pwm: add the machine.PWM class
- samd_isr: rework the interrupt tables
- machine_pin: add pin.irq() to the machine.Pin class
- modmachine: add disable_irq(), enable_irq() and idle() to machine
- machine_uart: add the machine.UART class
- machine_spi: add the machine.SPI class
- machine_i2c: add the machine.I2C class
- moduos: add uos.dupterm()
- moduos: add uos.urandom() for SAMD51
- main: use the common execution mode of boot.py and main.py
- mpconfigport: enable a few more MicroPython features
- samd_isr: change the way a Sercom ISR is registered and called
- machine_timer: add machine.Timer based on the shared soft-timer
- machine_wdt: add the machine.WDT class
- modsamd: add pininfo() function to the samd module
- machine_led: optimise size of the machine.LED class
- machine_dac: add the machine.DAC class
- modmachine: add machine.time_pulse_us
- mcu: factor out MCU policy for SAMD21 and SAMD51
- mphalport: add a mp_hal_ticks_ms_64() function
- modutime: enable time.time() based on systick_ms()
- machine_uart: support buffered TX for UART
- boards: add missing/lost board config and pin definitions
- mphalport: use CYCCNT for SAMD51's mp_hal_ticks_cpu()
- machine_bitstream: add the machine.bitstream() function
- mpconfigport: restructure to use ROM feature levels
- clock_config: split clock_config.c to separate SAMD21/SAMD51 files
- clock_config: add HW_DFLL_USB_SYNC and HW_MCU_OSC32KULP extensions
- pin_af: simplify the pin-af-table handling
- samd_flash: remove obsolete printf's and return values instead
- Makefile: fix a dependency problem with "make -j"
- mphalport: fix USB endpoint handling ignoring Ctrl-C
- change the symbol names for the peripheral clocks
- mcu: add floating point suport for SAMD21 devices
- mcu: enable the math module on SAMD51
- boards: move the flash filesystem definitions to the linker files
- boards: use the same linker file for all SAMD51x19 variants
- main: initialize readline on start up
- mcu: use lf2s for SAMD51 and lfs1 for SAMD21
- machine_pin: change the printing of Pin and LED objects
- Makefile: split up SRC_C variables
- rename machine I2C type consistently across ports
- clock_config: extend the range of machine.freq()
- clock_config: support changing machine.freq() for SAMD21
- modmachine: add machine.reset_cause()
- boards/SPARKFUN_SAMD51_THING_PLUS: add board files for Thing Plus
- modmachine: add machine.dht_readinto and enable on SAMD51
- mcu/samd51: enable onewire support for SAMD51
- mcu/samd51: enable FAT support for SAMD51
- modmachine: implement machine.lightsleep()
- modmachine: get the bootloader magic address from the lib
- clock_config: document the #defines use in init_clocks()
- machine_uart: implement uart.txdone() and uart.flush()
- mcu: make some settings in mpconfigmcu.h conditional
- machine_rtc: add the machine.RTC class
- clock_config: extend the SAMD51 us-counter to 60 bit
- boards/SEEED_WIO_TERMINAL: declare more pins for SEEED WIO board
- machine_pin: change the pin handling and naming/numbering
- make ADC, DAC, PWM, SPI objects consistent in how they print out
- modmachine: replace the LED class by the Signal class
- boards: rework the pins.csv files
- machine_pwm: serialize fast update of PWM settings
- machine_uart: use a finaliser to tidy up UART on soft reset
- machine_spi: implement spi.deinit() and simplify sercom_deinit_all
- machine_spi: register SerCom objects as root pointers
- modmachine: add machine.softreset()
- machine_timer: use extmod version of machine.Timer
- mcu/samd51: use an additional manifest.py for SAMD51 boards
- README: update README to reflect recent changes to the port
- boards/SEEED_WIO_TERMINAL: enable using the 32kHz crystal
- mphalport: add a timeout to mp_hal_stdout_tx_strn()
- move MCU-specific CFLAGS to mpconfigmcu.mk
- Makefile: set MPY_CROSS_FLAGS
- mpconfigport: support MICROPY_HW_SOFTSPI_MIN_DELAY
- mpconfigport: use __WFE() in MICROPY_EVENT_POLL_HOOK
- avoid under-/overflow in I2C and SPI baudrate calculations
- machine_uart: fix IRQ flag setting and clearing
- machine_uart: simplify machine_uart_any() and machine_uart_read()
- machine_uart: check the UART TX pin assignment
- machine_uart: fix uart.deinit() and save some RAM
- add a vref=num option to the ADC and DAC constructor
- support entering bootloader via USB CDC 1200bps touch
- boards/SEEED_XIAO: rename to SEEED_XIAO_SAMD21
- add Pin.board and Pin.cpu classes to Pin
- boards: clean up comments and some pins in pins.csv files
- mcu: rework the comments in clock_config.c
- mcu: use the FDPLL96M clock for the SAMD21 CPU
- mcu: implement a hardware seed for the SAMD21 random module
- mcu: set the SAMD21 us-counter to 2 MHz for better resolution
- moduos: add uos.urandom() using the phase-jitter rng
- pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation
- always provide the machine.RTC class

stm32 port:
- modmachine: allow boards to provide custom bootloader code
- modmachine: factor out mboot enter code to a function
- boards/stm32f091xc.ld: allocate space for a small filesystem
- boards/NUCLEO_F091RC: enable LFS1 filesystem
- Makefile: set CSUPEROPT to -Os for F0 and G0 MCUs to save space
- usbd_cdc_interface: add support for Arduino 1200bps touch
- usb: expose USB HID device instance via usbd_hid_get()
- use a separate symbol name for the bootloader state pointer
- Makefile: enable link-time-optimisation via LTO=1 make option
- boards: enable LTO by default on boards with smaller flash size
- Makefile: fix setting of define that enables WIZNET5K driver
- mboot: remove redundant code in mboot_state_change function
- boardctrl: allow boards to override fatal-error handler
- sdram: include boardctrl.h for fatal-error handler
- use MP_REGISTER_ROOT_POINTER()
- Makefile: workaround LTO linker order bug in binutils <2.35
- softtimer: switch to use softtimer code from shared/runtime
- boards/LEGO_HUB_NO6: fix typo in README
- boards/LEGO_HUB_NO6: use named pins
- boards/LEGO_HUB_NO6/appupdate: detect filesystem size at runtime
- boards/LEGO_HUB_NO6/spiflash: pick command type at runtime
- boards/LEGO_HUB_NO6/cc2564: make timer configurable
- boards/LEGO_HUB_NO7: add LEGO Hub No. 7 board definition
- boards/NUCLEO_WB55: add error handling to firmware update scripts
- don't enable debug info by default if LTO is on
- switch Wiznet to use lib/wiznet5k and extmod/network_wiznet5k
- add definitions required for lwIP version of Wiznet NIC
- mphalport: add mp_hal_get_spi_obj() helper function
- sdram: enable MPU for unaligned access on H7 MCUs
- boards: increase mboot region to 32k for WB55 boards
- move board variant config to mpconfigboard.mk
- boardctrl: use HAL_Delay instead of mp_hal_delay_ms
- remove support for CC3000 WiFi driver
- machine_uart: implement uart.flush() and uart.txdone()
- boards/LEGO_HUB_NO6: update manifest to new format
- boards: only freeze LCD160CR driver in PYB board firmware
- adc: make ADCAll.read_channel reject invalid channels
- pyb_i2c: fix pyb.I2C to work with dma=True on F4 MCUs
- timer: fix use of timer channel callback() method on L4 MCUs
- boards: add alternate function list for STM32F446RE
- boards/PYB: fix handling of BOARD_VARIANT selection
- make-stmconst.py: support TypeDef's with a single char prefix
- add support for STM32L1 MCUs
- boards/NUCLEO_L152RE: add NUCLEO-L152RE board support
- rename machine I2C and SPI types consistently across ports
- boards/ARDUINO_PORTENTA_H7: revert to single-precision float
- mbedtls: enable mbedtls certificate time validation
- Makefile: allow overriding the default MBEDTLS_CONFIG_FILE
- boards/ARDUINO_PORTENTA_H7: add custom mbedtls config
- modmachine: move dht_readinto() to the machine module
- spi: downgrade SPIHandle definitions to static
- boards/ARDUINO_PORTENTA_H7: add more modules, I2C1 and SE pin
- usbd_desc: support USB strings on CDC interface descriptors
- Makefile: set MPY_CROSS_FLAGS based on MCU type
- pyb_i2c: fix failing pyb.I2C(dma=True) after receiving 1 byte
- i2c: fix I2C frequency calc so it doesn't exceed requested rate
- adc: fix reading internal ADC channels on L4 MCUs
- adc: fix ADCAll.read_core_temp() on L4 MCUs
- i2c: add hardware I2C implementation for STM32L1
- i2c: add hardware I2C implementation for STM32L4
- mboot: make all mboot sectors erase/write protected
- boards: add missing LPUART macros for H7 HAL
- boards/NUCLEO_F429ZI: enable I2C1 and I2C2 with default pins
- powerctrl: improve standby mode entry code for H7 MCUs
- boards/NUCLEO_F756ZG: add board definition for NUCLEO-F756ZG
- powerctrl: fix build on STM32G0xx and STM32H7Bx MCUs
- boards: consolidate linker snippets to reduce duplication
- Makefile: leave DFU mode after download when using dfu-util
- boards/NUCLEO_H743ZI2: refer to NUCLEO_H743ZI for frozen manifest
- boards/STM32F769DISC: fix building with USE_QSPI_XIP=1
- boards/ARDUINO_PORTENTA_H7: fix macro value check for QSPI
- boards/ARDUINO_PORTENTA_H7: use default aioble
- Makefile: clean up nested if-else to chained if-else-if
- update to use the open-source lib version of cyw43-driver
- boards: update linker scripts now that big_const is gone
- add a default implementation of pyb.country
- cyw43_configport: fix build for boards without an RF switch
- boards/PYBD_SF2: set CYW43 Bluetooth fimrware download baudrate
- cyw43_configport: allow boards to override default resource files
- boards/ARDUINO_PORTENTA_H7: update board config files
- Makefile: include HAL HSEM driver on H747 MCUs
- boards/ARDUINO_NICLA_VISION: add support for Arduino Nicla Vision
- boards/ARDUINO_GIGA: add support for Arduino Giga H7 board
- cyw43_configport: add cyw43_sdio_enable_high_speed_4bit function
- powerctrl: add sleep RCC semaphore management for WB55 MCUs
- powerctrl: disable WB55 BLE before entering deepsleep
- powerctrlboot: provide custom SystemInit for WB55
- powerctrl: don't compile WB helpers on WL MCUs
- boards: include "senml" in manifest for ARDUINO boards
- remove commented-out printf's and debugging code
- main: use mp_printf instead of printf for MPY start-up messages
- i2c: return error code and raise exception if I2C init fails
- spi: return error code and raise exception if SPI init fails
- modmachine: make machine.info print using mp_printf
- extint: make ExtInt.regs print using mp_printf
- pin: make pin_find debug output use mp_printf
- pybthread: make pyb_thread_dump take a printer as its argument
- boards/NUCLEO_H743ZI2: fix MCU tag in board.json file
- mphalport: update HAL version to 1.11.0 to match stm32lib
- add support for STM32H723 MCUs
- boards: add ld and af.csv for H723
- boards/NUCLEO_H723ZG: add new H723 board
- add support for USB on G0 MCUs
- mboot: add support for G0 MCUs
- boards/NUCLEO_G0B1RE: add config for USB and mboot
- boards/ARDUINO_NICLA_VISION: fix incorrect bootloader PID
- flash: fix get_bank function for STM32H750
- cyw43_configport: provide cyw43_hal_pin_config_irq_falling func

teensy port:
- mpconfigport: drop unused root pointers
- teensy_hal: use MP_REGISTER_ROOT_POINTER()

unix port:
- variants: move setting of MICROPY_PY_USELECT to port config file
- variants: enable remaining options on dev,coverage from ROM extra
- variants/coverage: change config to use ROM level everything
- variants/dev: allow all config options to be overridden
- moduos: include errno.h
- main: restore tty settings on nlr_jump_fail()
- alloc: use MP_REGISTER_ROOT_POINTER() for mmap_region_head
- mpconfigport: make MICROPY_EVENT_POLL_HOOK call usleep directly
- mbedtls: add custom config for mbedtls
- mpconfigport: switch ussl from axtls to mbedtls
- Makefile: only include axtls in GIT_SUBMODULES list when enabled
- Makefile: only checkout libffi submodule when used
- mpconfigport: allow overriding MICROPY_EVENT_POLL_HOOK
- enable MICROPY_GC_SPLIT_HEAP on coverage build
- unix_mphal: allow overriding hal time functions
- variants: remove variant suffix from executable filename
- modjni: add missing const qualifier
- remove .gitignore file
- modusocket: support proto and flags arguments to getaddrinfo
- include alloca.h for NetBSD
- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
- variants: remove freedos and fast variants
- refactor mpconfigport.h and mpconfigvariant.h
- refactor mpconfigvariant.mk
- variants/coverage: add test for manifest freeze_mpy()
- enable sys.executable
- Makefile: don't use _MOD variable names
- modffi: move header includes inside MICROPY_PY_FFI guard
- variants: change mip package to mip-cmdline
- coverage: add extra GC coverage test for ATB gap byte
- moduos: implement 2-arg version of os.getenv()
- Makefile: disable building the shared library of libffi
- main: free pathbuf when there's an error opening a file

webassembly port:
- Makefile: remove obsolete disable of array-bounds warning
- rename this port from 'javascript' to 'webassembly'
- mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES
- add support for VFS and enable VFS_POSIX
- use Date's now() instead of getTime()
- change "stack" argument to "heapsize"
- support piping in a program on stdin
- dispatch micropython-print via document not mp_js_stdout
- README: update README to describe new stdout behaviour
- Makefile: change compiler optimisation from O3 to Os
- library: make use of CustomEvent detail property
- library: extract and send data to print as UInt8Array

windows port:
- provide a definition for MP_ALWAYSINLINE
- msvc: support compressed ROM text for error messages
- Makefile: update test dependency on $(PROG)
- make project file read-only for IDE
- .gitignore: simplify by removing build artefacts
- msvc: remove variant suffix from executable filename
- msvc: make mpy-cross independent of micropython variant
- msvc: fix qstr generation dependency
- msvc: fix module freezing

zephyr port:
- update include paths to use the zephyr namespace
- upgrade to Zephyr v3.1.0
- use MP_REGISTER_ROOT_POINTER()
- machine_uart: use mp_obj_str_get_str to get device name
- boards: add config for bbc_microbit_v2
- mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used
- rename machine I2C and SPI types consistently across ports

v1.19.1

Toggle v1.19.1's commit message
Bug fix for esp32 SoftI2C

This is a bug fix release.  The changes are:

- extmod/machine_i2c: only use WRITE1 option if transfer supports it

  This fixes the machine.SoftI2C.readfrom_mem() method on esp32, so it
  writes the address to read from.

v1.19

Toggle v1.19's commit message
New mpy 6 file format with improved bytecode, addition of renesas-ra …

…port

In this release of MicroPython the .mpy file format has been significantly
reworked and bumped to version 6.  The new format now contains data and
bytecode organised to be mostly static and ready to run in-place.  To
achieve this, qstr references from bytecode (and native machine code) now
go through a lookup table, to convert from local qstr number in the module
to global qstr number in the runtime that the module executes within.  This
means bytecode (and most native code) does not need rewriting when it is
imported.  Along with this change, the jump opcodes have been optimised to
emit 1-byte jump offsets when possible, which gives a good reduction in
bytecode size, saving RAM and reducing the size of .mpy files.

The change to the bytecode means that code constants (like long strings,
bytes objects and floats) are now shared and de-duplicated across the whole
module, rather than each code object having a separate constant table.  The
parser can also now turn a tuple of constants into a constant object, so
the tuple doesn't need to be built at runtime each time it is used.
Furthermore, any constant object can now be used in "X = const(obj)"
statements.

With these bytecode changes, .mpy files see around a 10% reduction in size
and frozen .mpy code sees about a 5% size reduction.  Heap memory use after
import is also down by around 5% (more savings are seen if the code uses
lots of constants).  Due to the qstr indirection performance of the VM is
slightly reduced on some benchmarks by a few percent, but the benefits of
smaller code and reduced RAM usage are deemed to outweigh this.  See commit
f2040bf for more details.

In the runtime, support has been added for multiple *args and **args in a
function call, following PEP 448.  Built-in modules can now have (optional)
mutable attributes, and this is used to implement sys.ps1/sys.ps2 which
allow the user to customise the REPL prompt.  This can be useful, for
example, to configure a different REPL for different boards so they can be
easily distinguished.  The sys module has also had the MicroPython git
version and build date appended to sys.version, sys.implementation._machine
has been added, and sys.implementation.mpy renamed to
sys.implementation._mpy.  The sys module can now be used to fully identify
the MicroPython version and target it is running on (and the platform
module provides additional information when it's available).

The MP_REGISTER_MODULE macro is now used to register all built-in C modules
and the third argument to this macro has been removed.  Any user-C-modules
will need to be updated.  Also support for MICROPY_PORT_BUILTIN_MODULES is
removed because this is no longer needed, and should be replaced by usage
of MP_REGISTER_MODULE (see commit 0a92469
for example).

The MP_REGISTER_MODULE macro is now used to register all built-in C modules
and the third argument to this macro has been removed.  Also support for
MICROPY_PORT_BUILTIN_MODULES is removed because this is no longer needed.

mpy-cross now supports the -march=armv6m option, which can be used with the
rp2 port.  The -mno-unicode has been removed.

The littlefs2 library has been updated to v2.5.0 which includes some
performance improvements and minor fixes.

At the REPL, a tab will now insert an indent when it follows whitespace,
and auto-indent is automatically disabled if a space or tab follows an
auto-indent.  This means that Python code can be pasted into the standard
REPL without messing up the indentation.

mpremote is now at version 0.3.0, with a progress indicator shown when
copying large files, and recursive copy fixed on Windows.  It also has the
following commands added: --help, --version, version, resume, soft-reset,
umount.

The esp32 port has a new machine.ADCBlock class and updated ADC class.
Fixes have been made to ADC2 channel mapping, low PWM frequencies,
UART initialisation of unspecified parameters, and RMT channel on S2/S3/C3
variants.  The Pin.PULL_HOLD constant has been replaced by a "hold" keyword
argument to the Pic constructor, and it's now possible to configure pin
drive strength.  I2C write-then-read transfers have been optimised to be
faster.  WLAN.config() now supports setting/getting the txpower.  New
boards include LOLIN C3 MINI ESP32-C3, LilyGO LoRa32, and UM ESP32-S3 based
boards.

The mimxrt port has updated the nxp_driver to v2.10 and fixed USB CDC RX
handling to not block.  Pin drive constants have been renamed to DRIVE_x to
match other ports, and the machine.I2S class has been added.  New boards
include Olimex RT1010 and MIMXRT1015_EVK.

The nrf port now includes uasyncio in the default board manifest, and
additional features have been enabled on nrf52840 and nrf9160 boards to
match the features on stm32, rp2 and esp32.  This includes enabling the
json, re, zlib and framebuf modules.

There is a new renesas-ra port which targets Renesas RA4M1, RA4W1, RA6M1
and RA6M2 MCUs, with board definitions for evaluation kits for these MCUs,
along with RA4M1 clicker.  This port currently supports Pin, ADC, SoftI2C,
I2C, SoftSPI, SPI, UART, Timer and RTC classes in the machine module, along
with the VFS and an internal flash filesystem.

The rp2 port now has optional USB MSC support, and optional dupterm
support.  The machine.UART class has init and deinit methods added, and
the ucryptolib module is now available.  The lwIP network stack has been
integrated, along with mbedtls for the ssl module, and these can be used
with the new Wiznet driver to provide Ethernet support.  The Wiznet
W5100S-EVB-Pico board has been added which makes use of this driver.  The
day-of-week value reported by time.localtime() has been fixed, memory
corruption when a thread is created on core1 has been fixed, and the UART
now uses a mutex when reading/writing to prevent character duplication in
code that uses both cores.

The stm32 port has added support for G0, G4 and WL MCUs.  The new boards
for these MCUs are NUCLEO_G0B1RE, NUCLEO_G474RE and NUCLEO_WL55.  The
ARDUINO_PORTENTA_H7 board has also been added, with full WiFi and BLE
support.  The rfcore on WB55 MCUs has been improved by removing an extra
layer of buffering, and the restriction on the use of address resolution
has been removed, meaning that the rfcore WS firmware should be updated
to v1.12.0 or later; see commit 26b1d31.
The board-level configuration of mboot has been significantly improved to
allow more control over system clocks, more hooks into the start up
process, and a hook for state change.  And the CRC32 of DFU files is now
verified before writing them.

The pyb.CAN class has been improved to support FD frames and buses with
mixed classic/extended-ID nodes, allowing extended IDs to be specified on a
per-message basis.  CAN.recv also now returns a value indicating if the
received message had an extended ID or not.  And CAN.initfilterbanks has
been removed, replaced with the num_filter_banks keyword argument to
CAN.init.  These are all breaking changes to the pyb.CAN class API and code
will need to be updated accordingly; see commit
5cdf964 for details.

The unix port now shows compiler information in the REPL banner to make it
consistent with how bare-metal ports work, and the "-X realtime"
command-line option has been added for macOS to get improved timing.  All
variants have switched to use the VFS subsystem, and use the VfsPosix class
for mounting the host's filesystem.  The os module has been consolidated
with all other ports and the minimal and standard variants gain the unlink,
chdir, getcwd and listdir functions.

The windows port has also switched to the VFS subsystem and VfsPosix.  It
adds support for micropython.schedule and uasyncio on the dev variant.  And
BCryptGenRandom has been used to implement os.urandom.

The zephyr port upgraded Zephyr to v3.0.0.

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

       bare-arm:   +792  +1.394%
    minimal x86:  +2091  +1.286%
       unix x64: +10231  +1.995%
    unix nanbox:  +9777  +2.162%
          stm32:   +184  +0.047% PYBV10
         cc3200:   +904  +0.493%
        esp8266:  -1240  -0.177% GENERIC
          esp32:  +6464  +0.425% GENERIC
            nrf: +11288  +6.472% pca10040
            rp2: +14432  +2.929% PICO
           samd:  +1352  +0.970% ADAFRUIT_ITSYBITSY_M4_EXPRESS

The changes that dominate these numbers are:
- bare-arm, minimal, cc3200, samd: reworked bytecode and mpy format,
  optimisation of jump opcodes to use 1-byte offsets, de-duplication of
  constants at the module level, and PEP 448 support
- unix: switching to use VFS, and new mpy format and related changes
- esp8266: removal of esp.info and machine.WDT.deinit
- esp32: addition of machine.ADCBlock, and new mpy format changes
- nrf: enabling uasyncio, enabling MICROPY_PY_IO
- rp2: enabling ucryptolib with mbedtls

Note that the stm32 port's size remained roughly unchanged.  This is
because it has a decent amount of frozen Python code and the reduction in
frozen code size due to the reworked bytecode has offset the increase in
runtime/VM size due to this change.  Ports like bare-arm, minimal, cc3200
and samd do not have any frozen code so only see the increase in runtime/VM
size.  Production-level projects that have a significant amount of frozen
code have seen around a 4% overall reduction in their firmware size.

Thanks to everyone who contributed to this release: Algy Tynan, Andrew
Leech, Andrew Scheller, Artyom Skrobov, Asensio Lorenzo Sempere, Bradley
Wogsland, Cem Eliguzel, Chris Wilson, Christian Decker, Christian Zietz,
Christophe Priouzeau, Clayton Mills, Damien George, Daniel Jour, Daniël van
de Giessen, Dave Hylands, David Lechner, Emil Kondayan, Herwin Grobben,
iabdalkader, IhorNehrutsa, Jan, Jared Hancock, jason, Jeff Epler, Jeremy
Herbert, Jim Mussared, Jon Bjarni Bjarnason, Jonathan Hogg, Jos Verlinde,
Kattni Rembor, Lars Kellogg-Stedman, Luiz Brandao, marcidy, Martin Fischer,
Maureen Helm, Meriç SARIIŞIK, Michael Himing, Michael O'Cleirigh,
MikeTeachman, Peter D. Gray, Peter Hinch, Peter Züger, Phil Howard, Philipp
Ebensberger, Rob Knegjens, robert-hh, Sean Coates, Seon Rozenblum, Stephane
Smith, stijn, Takeo Takahashi, ubi de feo, Waterlens, wemos, YoungJoon
Chun, Yukai Li.

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

Main components
===============

all:
- fix MICROPY_OBJ_REPR_D compilation with msvc
- update Python formatting to latest Black version 22.1.0
- use mp_obj_malloc everywhere it's applicable
- reformat remaining C code that doesn't have a space after a comma
- remove third argument to MP_REGISTER_MODULE
- rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K

py core:
- objstr: support '{:08}'.format("Jan") like Python 3.10
- modmath: add math.tau, math.nan and math.inf constants
- qstr: separate hash and len from string data
- qstr: use `const` consistently to avoid a cast
- gc: update debug code to compile with changes to qstr pool types
- rework bytecode and .mpy file format to be mostly static data
- bc.h: fix C++ compilation of public API
- objmodule: support delegating failed attr lookups
- modsys: add optional attribute delegation
- modsys: add optional sys.tracebacklimit attribute
- modsys: add optional mutable attributes sys.ps1/ps2 and use them
- parse: simplify handling of const int parse nodes
- parse: put const bytes objects in parse tree as const object
- parse: handle check for target small-int size in parser
- showbc: remove global variables and make DECODE_PTR work correctly
- smallint: introduce MP_SMALL_INT_BITS macro
- objgenerator: fix unused variables when native gen extracts prelude
- change jump opcodes to emit 1-byte jump offset when possible
- emitbc: add check for bytecode jump offset overflow
- change jump-if-x-or-pop opcodes to have unsigned offset argument
- builtinimport: alias sys to usys if import weak links aren't enabled
- bc.h: fix C++20 compilation with "volatile"
- compile: only show raw code that is bytecode
- asmxtensa: fix use of l32i/s32i when offset won't fit in encoding
- emitnative: don't store prelude at end of machine code if not needed
- vm: prevent array bound warning when using -MP_OBJ_ITER_BUF_NSLOTS
- runtime: allow multiple **args in a function call
- runtime: allow multiple *args in a function call
- runtime: do not overallocate when len is known
- runtime: drop new_alloc < 4 check
- runtime: use size_t/ssize_t instead of uint/int
- emitbc: assert that a small int fits its encoding when emitting one
- fix compiling and decoding of *args at large arg positions
- runtime: remove unnecessary check for kw_value == MP_OBJ_NULL
- makeqstrdefs: cleanup and extend source file classification
- emitinlinethumb: use 16 bit encodings for PUSH LR and POP PC
- scheduler: add support for scheduling static C-based callbacks
- emitnative: revert "don't store prelude at end of machine code if..."
- persistentcode: define enum values for obj types instead of letters
- parse: factor obj extract code to mp_parse_node_extract_const_object
- parse: print const object value in mp_parse_node_print
- parse: add MICROPY_COMP_CONST_TUPLE option to build const tuples
- persistentcode: support loading and saving tuples in .mpy files
- objtype: convert result of user __contains__ method to bool
- modsys: append MicroPython git version and build date to sys.version
- modsys: rename sys.implementation.mpy to sys.implementation._mpy
- modsys: introduce sys.implementation._machine constant
- emitcommon: don't implicitly close class vars that are assigned to
- obj: introduce mp_obj_malloc macro to allocate, and set object type
- objfloat: explain why mp_obj_malloc isn't used
- malloc: introduce m_tracked_calloc, m_tracked_free functions
- objmodule: move stray #include to top of file
- persistentcode: remove obsolete comment about qstr window size
- persistentcode: remove unicode feature flag from .mpy file
- asmx64: support full range of regs in asm_x64_lea_disp_to_r64
- bc: provide separate code-state setup funcs for bytecode and native
- emitnative: put a pointer to the native prelude in child_table array
- compile: allow new qstrs to be allocated at all compiler passes
- compile: de-duplicate constant objects in module's constant table
- parse: allow all constant objects to be used in "X = const(o)"
- makemoduledefs.py: allow multiple ways to register a module
- make builtin modules use MP_REGISTER_MODULE
- remove support for MICROPY_PORT_BUILTIN_MODULES
- asmthumb: fix PC relative load by sign extending the constant
- emitnative: simplify generation of code that loads prelude pointer
- emitnative: provide dedicated local for exception unwind handler ptr
- asmthumb: fix offset variable name in ldr, ldrh and strh functions
- asmthumb: add asm_thumb_ldrh_reg_reg_i12_optimised() helper func
- asmarm: add asm_arm_ldrh_reg_reg_offset() helper func
- asm: add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset
- emitnative: access qstr values using indirection table qstr_table
- asmthumb: make ARMv7-M instruction use dynamically selectable
- persistentcode: select ARMV6M as maximum when __thumb2__ not defined
- dynruntime.mk: add basic support for armv6m architecture
- asmthumb: provide implementations of clz/ctz for msvc
- builtin: clean up and simplify import_stat and builtin_open config
- emitinlinethumb: make ARMv7-M instruction use dynamically selectable
- emitinlinethumb: make float instruction use dynamically selectable
- change makemoduledefs process so it uses output of qstr extraction
- persistentcode: remove remaining native qstr linking support
- bc: remove unused mp_opcode_format function
- compile: give the compiler a hint about num nodes being non-zero
- makemoduledefs.py: remove shebang line and adjust style of comment
- parse: work around xtensa esp-2020r3 compiler bug
- dynruntime: add macros to create a new dict and store to dicts
- dynruntime: add macros to access more types and mp_const_empty_bytes
- makemoduledefs.py: emit useful error for legacy MP_REGISTER_MODULE

extmod:
- network_ninaw10: implement MP_STREAM_POLL in ioctl
- modusocket: make setsockopt return if NIC is not connected
- modusocket: add makefile() method and common socket options
- modusocket: create new sockets in blocking mode
- modusocket: support additional args to getaddrinfo
- machine_i2c: increase default SoftI2C timeout to 50ms
- modubinascii: add newline keyword to b2a_base64 function
- moduplatform: move platform PP definitions into a header
- moduzlib: fix parsing zlib header dict size
- moduos: create general uos module to be used by all ports
- modure: set subject begin_line so ^ doesn't match interior
- uasyncio: allow task state to be a callable
- uasyncio: fix gather cancelling and handling of exceptions
- extmod.cmake: add micropy_lib_mbedtls component
- modusocket: implement optional socket.listen backlog argument
- modusocket: provide config macro for socket.listen backlog deflt
- uasyncio: make Python Task match C version with use of asserts
- uasyncio: fix bug with task ending just after gather is cancel'd
- uasyncio: rename and merge TaskQueue push/pop methods
- move font_petme128_8x8.h from ports/stm32 to extmod
- make extmod modules use MP_REGISTER_MODULE
- make port-included extmod modules use MP_REGISTER_MODULES
- revert accidental usocket->socket rename
- webrepl: fix setting password in foreground mode and factor code
- modusocket: fix polling of a new socket
- modusocket: bind unconnected socket to default NIC in setsockopt
- modusocket: fix errcode returned from socket read/write
- modusocket: add socket type print function
- modusocket: add support for socket events callback
- modusocket: fix socket_make_new argument parsing
- modusocket: add timeout and callback to socket object
- modusocket: add sendall function
- network_ninaw10: add support for socket events callback
- machine_i2c: add optional support for write-then-read transfers
- uasyncio: fix edge case for cancellation of wait_for
- nimble: add support for reading whole HCI UART packets
- network_wiznet5k: add Wiznet Ethernet network interface
- modussl_mbedtls: poll EVENT_POLL_HOOK in ssl handshake loop
- modurandom: fix missing void in empty argument list
- extmod.cmake: require components to be explicitly enabled
- modusocket: add socket state to track new/listening/conn/closed
- modusocket: fix polling of closed sockets
- extmod.cmake: fix hard-coded mbedtls config file path

shared:
- readline: make tab insert an indent when it follows whitespace
- readline: disable auto-indent if space/tab follows added indent

drivers:
- ninaw10: add function to check socket state/data availability
- ninaw10: fix timeout handling to match modusocket
- ninaw10: return standard error numbers
- ninaw10: add NIC-level ioctl function
- sdcard: allow setting the final SPI baudrate
- codec: add driver for the WM8960 codec
- ninaw10: fix isconnected to return False when inactive
- dht/dht.py: change default import module as machine
- ninaw10: update driver to support firmware 1.5.0
- bus: rename MP_SPI_ADDR_IS_32B to MICROPY_HW_SPI_ADDR_IS_32BIT
- lsm6dsox: add support for SPI mode
- sdcard: fix CSD version 1.0 device size calculation
- sdcard: make ioctl(4), ioctl(5) return num blocks, block size
- sdcard: fix address calculation on v2 SDSC cards

mpy-cross:
- add armv6m architecture option

lib:
- re1.5: distinguish between subject start-of-line and start-of-srch
- stm32lib: update library for G0 v1.5.1
- fsp: add renesas fsp git repository as submodule
- littlefs: update littlefs2 to v2.5.0
- littlefs: guard lfs2_file_rawopen with LFS2_NO_MALLOC
- littlefs: remove assignment of variables to themselves
- nxp_driver: update nxp_driver to v2.10
- wiznet5k: add submodule for Wiznet Ethernet drivers

Support components
==================

docs:
- library: specify additional ADC methods and new ADCBlock class
- esp32: document expanded ADC API in quickref
- differences: update differences now that math.tau/inf/nan exist
- differences: update python_36 now that b2a_base64 accepts newline
- remove reference to obsolete neopixel_write function
- develop/porting.rst: fix build and import problems in the example
- reference/isr_rules.rst: fix inconsistent variable name in example
- esp32/quickref: update ADC documentation
- reference/isr_rules.rst: describe uasyncio-IRQ interface
- library/collections.rst: use class for deque and OrderedDict
- use the correct * keyword-only notation
- library/socket.rst: document socket as a class
- library/pyb.Timer.rst: add pyb.Timer class constants
- library/pyb.rst: add pyb.hid_mouse and pyb.hid_keyboard constants
- library/pyb.DAC.rst: add DAC class constants
- library/machine.SPI.rst: add class constant SoftSPI.MSB and .LSB
- library/machine.WDT.rst: use correct case for WDT.feed
- library/esp.rst: document the osdebug function
- library/pyb.SPI.rst: document default for prescaler argument
- library/machine.Pin.rst: document defaults for Pin.init
- library/uasyncio.rst: fix description of ThreadSafeFlag.wait
- library/machine.UART.rst: add details for `invert` parameter
- differences/python_35: mark PEP 486 as not applicable
- library/esp32.rst: mark esp32.Partition as not taking kw args
- esp32/quickref: document GPIO drive strength
- library/machine.Pin: update to use preferred DRIVE_x constants
- esp32/quickref: refine deep-sleep power-saving notes
- library/machine.I2S: clarify what rate refers to
- library/pyb.CAN: update CAN docs to match revised API
- add quickref and docs for mimxrt, including network.LAN docs
- reference/mpremote: add details about mount usage over soft reboot
- differences: update Python 3.5 diff, with optional listen backlog
- reference: update constrained docs now that tuples can be const
- library/network.WLAN: add "txpower" to list of known WLAN configs
- renesas-ra: add renesas-ra docs files
- update files for renesas-ra port
- renesas-ra: remove unused image files
- reference/mpyfiles: remove docs about mpy flags and qstr win size
- mimxrt: add i.MX RT1015 to general.rst, and a few clarifications
- mimxrt: move the pinout tables to a separate document
- reference/manifest: add link to details about opt-level for freeze
- reference/mpyfiles: update .mpy description to match latest format
- update Raspberry Pi URLs from .org to .com

examples:
- embedding: fix build with updated sys and os modules
- natmod/features3: add example to test more natmod features

tests:
- run-multitests.py: ignore lld_pdu_get_tx_flush_nb msgs from IDF
- run-multitests.py: set HOST_IP so tests work between PC and board
- multi_net: add testing key/cert to SSL server/client test
- multi_net: close accepted sockets when tests are done
- multi_net/udp_data.py: allow reusing port before bind
- multi_net/udp_data.py: make UDP test more reliable
- run-perfbench.py: allow a test to SKIP, and to have a .exp file
- perf_bench: add perf tests for qstr interning and importing .mpy
- perf_bench: add perf test for yield-from execution
- run-perfbench.py: use SKIP consistently, and increase print width
- extmod/vfs_fat_finaliser.py: make finalisation more robust
- run-tests.py: skip repl tests when running windows underneath
- perf_bench: skip bm_chaos test if random.randrange is unavailable
- unix: add coverage test for freezing various objects
- basics: add test for creating small-ints in nan-box builds
- run-tests.py: include test files ending in _set as set tests
- micropython: switch from set.pop to raise-0 to test exc strings
- extmod/vfs_posix.py: only test statvfs if it exists
- cmdline/cmd_showbc: fix spelling of sequence
- extmod: add test for machine.I2S data rate
- extmod: update I2S rate test to work on mimxrt
- basics/fun_callstardblstar: add coverage test
- basics/fun_callstardblstar: add test for large arg allocation
- pyb: update CAN tests to match revised CAN API
- inlineasm: add test for PUSH LR and POP PC
- perf_bench: update import tests for changes to .mpy consts
- micropython: add tests that const tuples don't use the heap
- extmod/uasyncio_gather: make double-raise gather test reliable
- run-tests.py: add timeout for running PC-based MicroPython test
- cmdline: add test for REPL auto-indent
- renesas-ra: add tests for renesas-ra port
- run-tests.py: update for renesas-ra port
- renesas-ra: remove unsupported feature test of Pin
- extmod: increase timing on uasyncio tests to make more reliable
- fix tests to use sys.implementation._mpy
- perf_bench: update .mpy file header to remove old unicode flag
- run-perfbench.py: return error code if any test fails on target
- thread: use less resources for stress_aes if settrace enabled
- run-tests.py: exclude settrace tests when using native emitter
- multi_net: skip SSL test if relevant modules aren't available
- micropython: fully unlink nested list in extreme exc test
- extmod: use bytearray instead of bytes for uctypes test
- micropython: add more test cases for native generators
- run-tests.py: allow running tests via mpy-cross on remote targets
- run-perfbench.py: allow running tests via mpy and native emitter
- basics: unlock heap if skipping nanbox small-int test
- run-tests.py: handle case where mpy-cross fails to compile script
- run-tests.py: enable `-X realtime` option for macOS tests
- extmod: change expected errno code from 36 to 30 in VfsLfs2 test
- multi_net: fix TCP accept test when using system error numbers
- run-multitests.py: use LAN for IP address if WLAN doesn't exist
- micropython: make import_mpy_native_gc run on ARMv6-M and above
- micropython: make import_mpy_native test run on all architectures
- run-tests.py: add rp2 test target
- move native while test from pybnative to micropython
- net_inet: remove broken api.telegram.org from tests
- run-multitests.py: read IP address from boot nic if available
- basics: add .exp file for sys.tracebacklimit test
- stress: adjust bytecode_limit test so it can SKIP if no memory

tools:
- mpremote: use machine instead of umachine in commands
- ci: test math constants with MICROPY_OBJ_REPR_D
- uf2conv.py: update to latest version
- autobuild: provide .uf2 images for esp32 builds when available
- mpremote: fix "fs cp -r" on Windows
- mpremote: make ConsolePosix work without .raw attribute
- mpremote: during soft reboot wait long enough for 115200 data
- mpremote: accept both --help and help to show usage
- mpremote: correctly manage mounted flag during soft-reset
- mpremote: fix special handling of ctrl-D when host FS is mounted
- verifygitlog.py: ignore line length in body if it's a URL
- ci.sh: update IDF v4.4 build to use v4.4 tag
- ci.sh: run urandom test scripts as part of native module tests
- mpremote: add "resume" and "soft-reset" commands
- mpremote: add "umount" command
- upip.py: remove unused op_basename() function
- mpy-tool.py: fix frozen comment generation to escape chars
- ci.sh: run performance benchmark as part of all unix test runs
- mpremote: bump version to 0.2.0
- gen-cpydiff: skip Black fmt comments
- mpremote: support any prompt string when detecting soft reset
- mpremote: allow running mpremote with `python -m`
- mpremote: improve reliability of mount after soft reboot
- mpremote: show progress indicator when copying large files
- mpremote: add option to mount cmd to allow "unsafe" symlinks
- mpy-tool.py: support loading tuples from .mpy files
- mpy-tool.py: support freezing tuples and other consts
- mpy-tool.py: optimise freezing of ints that can fit a small int
- mpy-tool.py: optimise freezing of empty str and bytes objects
- mpy-tool.py: make global qstr list a dedicated class
- mpy-tool.py: optimise freezing of str when str data is a qstr
- mpy-tool.py: intern more strings when freezing
- codeformat.py: remove ports/unix/*.py from exclusion list
- codeformat.py: include more ports .c/.h files in formatting
- ci.sh: don't run uasyncio_gather test on macOS
- ci.sh: update for ports/renesas-ra
- uncrustify: make sure a space exists after a comma
- autobuild: update for ports/renesas-ra
- mpy_ld.py: remove obsolete QSTR_WINDOW_SIZE constant
- ci.sh: run full test suite on stackless and settrace builds
- ci.sh: for esp8266 CI install esptool 3.3.1
- mpy-tool.py: remove obsolete unicode flag in .mpy header
- ci.sh: add build of W5100S_EVB_PICO board to rp2 CI
- mpy-tool.py: rework .mpy merging feature
- ci.sh: add test for mpy-tool's merging feature
- mpy-tool.py: improve generated frozen identifiers
- mpremote: add command to print the version
- mpremote: bump version to 0.3.0
- ci.sh: build NUCLEO_H743ZI with -O2 optimisation level
- mpy_ld.py: support R_XTENSA_PDIFF32 relocation
- ci.sh: build native .mpy examples for armv7emsp, xtensawin in CI
- mpy_ld.py: support GOT entries that reference inside mp_fun_table

CI:
- workflows: show context for qemu-arm test failures
- workflows: add new workflow to test .mpy file format and tools
- workflows: add new workflow to test embedding example
- workflows: add workflow for renesas-ra port

The ports
=========

all ports:
- consolidate inclusion of umachine module in built-ins
- recompile bytecode tests now that .mpy format changed
- allow boards to define additional network interfaces
- recompile bytecode tests now that .mpy format changed
- reformat more C and Python source code
- rename thread_t to mp_thread_t
- use default VFS config for import_stat and builtin_open

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

cc3200 port:
- make port-specific modules use MP_REGISTER_MODULE

esp8266 port:
- moduos: convert module to use extmod version
- mpconfigport.h: remove config values that are the defaults
- modesp: remove esp.info() function
- make port-specific modules use MP_REGISTER_MODULE
- machine_wdt: remove deinit method for watchdog
- etshal.h: remove unneeded function declaration

esp32 port:
- machine_adcblock: add new machine.ADCBlock class and update ADC
- pin MicroPython to core 1 again
- esp32_rmt: call rmt_driver_install directly if running on core 1
- main: allocate at most 1/2 of available IDF heap for MP heap
- README.md: fix URL for esp-idf installation
- modnetwork: fix test for WIFI_AUTH_MAX for IDF v4.3.0
- main: use heap_caps_get_info on IDF <4.1 to compute total heap
- boards: provide custom deploy_c3.md for ESP32-C3 boards
- partitions: increase size of app-part from 0x180000 to 0x1F0000
- machine_pwm: fix PWM not allowing frequencies < 611 Hz
- machine_pwm: clean up macro names and their use
- esp32_rmt: select correct last RMT channel on S2, S3, C3 variants
- main: automatically size SPIRAM heap when allocated using malloc
- adc: fix wrong mapping between ADC2 channel and GPIO number
- remove unneeded modesp.h
- create .uf2 binaries for S2 and S3 chips
- partitions-16MiB.csv: increase 14MiB filesystem to maximum size
- machine_adcblock: fix ADC bit width for ESP32-S3
- machine_adc: fix configuration of default ADC atten value
- boards: add three UM ESP32-S3 based boards
- mpconfigport.h: use the "extra" feature level
- mpconfigport.h: enable remaining features to get to "extra" level
- esp32_partition: add support for specifying block_size
- modules: create ffat partition object with block_size=512
- README.md: update list of supported IDF versions
- boards: add specific deploy instructions for S3 variant
- uart: correctly init low-level UART driver for REPL
- machine_uart: allow limited configuration of REPL UART
- sleep one tick in MICROPY_EVENT_POLL_HOOK
- machine_pwm: always set the duty cycle when setting the frequency
- machine_uart: make UART.init preserve unspecified parameters
- machine_pin: add support for pin drive strength
- moduos: convert module to use extmod version
- machine_pin: add new hold keyword argument and remove PULL_HOLD
- modesp32: add new gpio_deep_sleep_hold function
- boards/UM_TINYPICO: remove use of PULL_HOLD
- boards: add LOLIN C3 MINI ESP32-C3 based board
- machine_hw_spi: use automatic DMA channel selection for SPI on C3
- boards: add support for LilyGO LoRa32 boards
- machine_pin: expose pin 20 for ESP32
- allow overriding cmake frozen manifest from the command line
- boards: add test manifest to test freezing during build
- add MICROPY_HW_ENABLE_UART_REPL and enable on generic S2/S3
- boards: compile GENERIC_SPIRAM and UM_TINYPICO with -Os
- machine_pin: don't expose pins 33-37 when octal SPIRAM is enabled
- modesp32: properly define RTC_VALID_EXT_PINS on S2/S3 variants
- network_wlan: support setting/getting txpower in WLAN.config()
- modnetwork: fix build when MICROPY_PY_NETWORK_WLAN is disabled
- make port-specific modules use MP_REGISTER_MODULE
- boards/UM_FEATHERS3: use correct sdkconfig.board
- boards/LILYGO_TTGO_LORA32: remove ID from TTGO Lora32 board json
- machine_pin: fix ESP32C3 IDFv4.4.1 build
- track allocated iRAM and free it on soft reset
- machine_i2c: implement write-then-read I2C transfers
- machine_pin: only expose IO20 on esp32 for IDF 4.3.2 and above

javascript port:
- make port-specific modules use MP_REGISTER_MODULE

mimxrt port:
- support gaps in the SPI an I2C device numbers
- allow for board-specific flash driver files
- compensate for a bug in the fsl_lpspi.c file
- remove two files from the Seeed Arch Mix directory
- replace Pin-config constants by a function call
- allow to select cs0 or cs1 for SPI
- add USB ID elements
- add support for the Olimex RT1010 board
- simplify Makefile in selection of flash type
- machine_pin: change pin drive constants to DRIVE_x naming
- machine_spi: add omitted GPIO config
- boards: add board files for MIMXRT1015 and MIMXRT1015_EVK
- eth: fix an Ethernet transmit error
- boards/TEENSY41: use the same SPI1 pins for Teensy 4.0 and 4.1
- boards: support using an optional board-specific manifest.py
- eth: avoid a race condition for Ethernet
- hal/pwm_backport: make PWM symmetric, and round division calcs
- moduos: convert module to use extmod version
- mbedtls: add NULL pointer check in m_free_mbedtls
- machine_i2s: add I2S protocol support
- boards: add board.json file for OLIMEX RT1010Py
- modules: append /flash/lib to the default sys.path
- machine_rtc: start RTC at boot and set datetime if not set
- machine_spi: improve handling of busy SPI peripheral
- mphalport: fix USB CDC RX handling to not block when unprocessed
- mbedtls: use core-provided tracked alloc instead of custom funcs
- make port-specific modules use MP_REGISTER_MODULE
- boards/OLIMEX_RT1010: document the initial deploy procedure
- boards: extend the deploy_teensy.md instructions
- mphalport: fix strict aliasing error with unique id
- update port to work with new nxp_driver v2.10
- machine_uart: fix an inconsistency for UART.init() arg handling

minimal port: no changes specific to this component/port

nrf port:
- drivers/usb: fix background events/scheduling while at USB REPL
- drivers/usb: fix MP_STREAM_POLL_RD support on USB CDC
- modules: include uasyncio in default board manifest
- make port-specific modules use MP_REGISTER_MODULE
- mpconfigport: set MICROPY_CONFIG_ROM_LEVEL defines for each MCU
- mpconfigport: enable extra features as defined by ROM levels
- mpconfigport: fix MICROPY_VFS IO build support
- modules/uos/microbitfs: fix MICROPY_MBFS build to use mp_obj_malloc

pic16bit port:
- make port-specific modules use MP_REGISTER_MODULE
- use 1 byte for qstr hash len and include header to fix build

powerpc port: no changes specific to this component/port

qemu-arm port:
- add tests for freezing viper and asm_thumb code
- moduos: convert module to use extmod version
- test-frzmpy: add test for freezing constant tuples
- mpconfigport: define MICROPY_PY_SYS_PLATFORM

renesas-ra port:
- add new port to Renesas RA
- boards: change device name information to show properly
- rename pyb_uart_ to machine_uart_
- rename pyb_rtc_ to machine_rtc_
- make port-specific modules use MP_REGISTER_MODULE
- modmachine: add missing MP_REGISTER_MODULE for umachine
- machine_pin: remove code for unsupported Pin features

rp2 port:
- machine_i2c: provide more specific error codes from I2C transfer
- mpconfigport.h: use internal error numbers
- mphalport: add optional dupterm support
- machine_uart: add machine.UART init/deinit methods
- machine_i2c: use soft I2C only for len=0, and increase timeout
- modutime: fix time.localtime day-of-week value
- machine_uart: fix UART RTS behaviour so RTS is deasserted
- Makefile: add FROZEN_MANIFEST Makefile option, to override default
- mpthreadport: fix memory corruption when thread is created in core1
- add USB MSC support
- allow Overriding cmake frozen manifest from the command line
- enable ucryptolib, using mbedtls for backend functions
- mphalport: fix USB CDC RX handling to not block when unprocessed
- Makefile: add mbedtls to GIT_SUBMODULES list and use it in CI func
- machine_uart: use read/write mutex to prevent char duplication
- mpconfigport: enable execfile, NotImplemented and REPL EMACS keys
- make port-specific modules use MP_REGISTER_MODULE
- mpconfigport.h: enable static scheduler nodes
- mpconfigport.h: allow boards to override internal errno config
- boards/ARDUINO_NANO_RP2040_CONNECT: disable internal errno
- boards/ARDUINO_NANO_RP2040_CONNECT: enable webrepl
- mbedtls: add support for ssl module with MICROPY_SSL_MBEDTLS
- machine_pin: add mp_hal_pin_interrupt C interface
- Makefile: use cmake for "make submodules" task when needed
- integrate lwIP network stack
- add support for using Wiznet hardware as an Ethernet NIC
- boards/W5100S_EVB_PICO: add Wiznet W5100S-EVB-Pico board
- Makefile: build in debug mode with "make DEBUG=1"
- boards/ARDUINO_NANO_RP2040_CONNECT: update USB PID
- mpnetworkport: fix lwip alarm callback timing to use microseconds
- CMakeLists: simplify qstr sources when enabling extmod components

samd port:
- moduos: convert module to use extmod version
- make port-specific modules use MP_REGISTER_MODULE

stm32 port:
- mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
- mboot: remove custom HAL_RCC_GetHCLKFreq and use HAL provided one
- pin: change remaining uses of "af" to "alt"
- dac: deinit all DACs on soft reset
- fdcan: fix FIFO1 usage and handling of error interrupts
- fdcan: fix naming with regards to G4 series
- usbd_conf: set lpm_enable and battery_charging_enable on all MCUs
- powerctrlboot: set HAL uwTickPrio variable when needed
- powerctrl: write bootloader-state as 64-bit word to work on H7
- mboot: use PLL3 for USB clock source on H7 MCUs
- mboot: include hal_rcc_ex.c in source file list
- mboot: support H7 MCUs in fwupdate.py
- mboot: compute and check CRC32 of dfu file in fwupdate.py
- add support for G4 MCUs, and add NUCLEO_G474RE board defn
- mboot: allow HSI to be used as the main clock source
- mboot: add MBOOT_BOARD_ENTRY_INIT for a board to add entry code
- mboot: add support for F469/479 MCUs in fwupdate.py
- rtc: use LL_RTC functions to simplify some MCU-specific code
- Makefile: make stm32lib configurable
- add initial support for STM32WL MCUs
- boards/NUCLEO_WL55: add new board definition
- system_stm32: make SystemClock_Config() a weak symbol
- adc: fix L4 ADC channel numbers
- adc: remove obsolete FIRST/LAST GPIO channel macros
- boards/NUCLEO_L432KC: disable MICROPY_OPT_COMPUTED_GOTO
- boards/NUCLEO_WB55: add Arduino pin alias definitions
- mboot: allow a board to fully configure system clocks
- mboot: allow a board more control over entry initialisation
- moduos: convert module to use extmod version
- boards: convert F4xx and F7xx to new flash FS config
- mbedtls: add NULL pointer check in m_free_mbedtls
- sdcard: use mp_hal_pin_input instead of HAL function
- sdcard: add sdcard_select_sd/mmc functions
- main: support SD cards without a partition table
- dma: add option to disable auto-DMA-turn-off
- mboot: add pragma for GCC to ignore array bounds warning
- mboot: always check the magic number to enter filesystem loading
- mboot: add support for 64-bit mboot address space for reads
- mboot: add support for reading from SD card
- boards/PYBD_SF2: turn on SD card in mboot init if SD enabled
- mboot/fwupdate.py: simplify calculation of CRC32
- mboot: verify signature of fsload packed DFU files before writing
- mboot: verify CRC32 of fsload DFU files before writing
- support building for STM32F745
- machine_i2s: set FullDuplexMode to disabled on F4
- machine_i2s: allow I2S.deinit to be called multiple times
- machine_i2s: fix 16-bit stereo i2s_frame_map
- sdio: use runtime calculation for clock divider of sdio on H7
- modmachine: add deepsleep support to reset_cause() for WB55
- pyb_can: enable CAN FD frame support and BRS
- pyb_can: add support for CAN FD extended frame ID
- pyb_can: add support for bus with mixed Classic/FD nodes
- pyb_can: return the filter ID and type of received messages
- pyb_can: define the maximum bit timing parameters
- pyb_can: replace CAN.initfilterbanks with CAN.init keyword arg
- Makefile: allow overriding COPT in Makefile
- mpconfigport.h: let MICROPY_PY_IO_FILEIO take its default value
- machine_bitstream: include all clobbered regs in Cortex-M0 impl
- mboot: consolidate all UI and add general state change hooks
- mboot: add macros for use in led_state_all()
- sdram: add function to enable SDRAM power-down mode
- Makefile: add H747 to Makefile's MCU flags
- system_stm32: add H7 switched-mode-power-supply support
- system_stm32: set voltage scaling level 0 for H7 Rev-V devices
- system_stm32: allow boards to configure PLL VCI, VCO and FRACN
- system_stm32: improve H7 PLL and OSC configuration
- boards/PYBD_SFx: allow FROZEN_MANIFEST to be overridden
- mpbthciport: switch scheduling callback to use node scheduler
- boards/SPARKFUN_MICROMOD_STM32: fix incorrect UART and I2C config
- mphalport: fix I/O glitches when switching GPIO mode to alt-func
- boards/ADAFRUIT_F405_EXPRESS: use external SPI flash for storage
- boards/LEGO_HUB_NO6: exclude BTstack code from formatting
- qspi: support common flash sizes in MPU configuration
- qspi: wait for a free FIFO location before writing to DR
- qspi: workaround for SR set immediately after setting AR
- ulpi: add USB3320 ULPI low-power functions
- ulpi: include missing py/mperrno.h header
- boards/ARDUINO_PORTENTA_H7: add support for Arduino Portenta H7
- storage: add support for internal storage on Cortex-M0 MCUs
- add support for G0 MCUs
- boards/NUCLEO_G0B1RE: add NUCLEO_G0B1RE board definition
- mbedtls: use core-provided tracked alloc instead of custom funcs
- make port-specific modules use MP_REGISTER_MODULE
- rfcore: revert "intercept addr-resolution HCI cmd to work arou..."
- mboot: move remaining led_state_all call into mboot_state_change
- mboot: add update_app_elements to return mboot fsload elements
- mboot: make 0x70ad0000 values named constants with macros
- mboot: pass initial_r0 to early-init and get-reset-mode funcs
- boards/LEGO_HUB_NO6: make all SPI flash transfers use 32-bit addr
- boards/LEGO_HUB_NO6: add support for mboot to access SPI flash
- boards/LEGO_HUB_NO6: use multi-colour LED for mboot status
- boards/LEGO_HUB_NO6: implement robust filesystem-load updates
- boards/LEGO_HUB_NO6: add helper scripts to update app firmware
- rfcore: remove extra layer of buffering on BLE IPCC
- flash: remove FLASH_OPTR_DBANK condition in L4, H7 get_bank func
- machine_i2c: enable timingr constructor keyword on H7 MCUs
- powerctrl: disable sys tick interrupt in stop mode on some STM32s
- usbd_conf: remove disable of SYSCFG clock
- mboot: add board-configurable SysTick hook
- mboot: remove MP_WEAK on led funcs and make some of them static
- boards/LEGO_HUB_NO6: add comment to readme about powering off
- mboot: only include UI code if at least one board LED is defined

teensy port:
- make port-specific modules use MP_REGISTER_MODULE
- mpconfigport.h: remove obsolete macros

unix port:
- Makefile: remove explicit addition of -std=c++ flag
- show compiler info in REPL banner
- .gitignore: remove *.py from ignore list
- moduos: convert module to use extmod version
- mpconfigport.h: collect together config options from extra level
- variants: use rom feature config for standard, dev, coverage
- variants: enable a few optimisations and features on dev, coverage
- make port-specific modules use MP_REGISTER_MODULE
- implement `-X realtime` command-line option on macOS
- factor out code that generates random bytes to a new func
- variants: enable seeding random module on import in dev, coverage

windows port:
- README.md: fix broken mingw link
- add micropython.schedule support
- mingw: include extmod/shared/lib sources properly
- uselect: enable micropython select in dev variant
- uasyncio: add support for uasyncio to windows dev variant
- appveyor: fix printing of test failures
- Makefile: specify CXXFLAGS in the Makefile
- unify project file headers
- switch to VFS subsystem and use VfsPosix
- consolidate all sleep-related functions into windows_mphal.c
- avoid busy loop when using scheduler
- use BCryptGenRandom to implement os.urandom
- factor out code that generates random bytes to a new func

zephyr port:
- update include path to disk_access.h
- upgrade to Zephyr v3.0.0
- prj.conf: enable CONFIG_BUILD_OUTPUT_HEX to generate .hex output
- moduos: convert module to use extmod version
- make port-specific modules use MP_REGISTER_MODULE
- modusocket: fix function object wrapper for listen method

v1.18

Toggle v1.18's commit message
Boosted performance, board.json metadata, more mimxrt, rp2, samd feat…

…ures

This release of MicroPython sees a boost to the overall performance of the
VM and runtime.  This is achieved by the addition of an optional cache to
speed up general hash table lookups, as well as a fast path in the VM for
the LOAD_ATTR opcode on instance types.  The new configuration options are
MICROPY_OPT_MAP_LOOKUP_CACHE and MICROPY_OPT_LOAD_ATTR_FAST_PATH.  As part
of this improvement the MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE option has
been removed, which provided a similar map caching mechanism but with the
cache stored in the bytecode, which made it not useful on bare metal ports.
The new mechanism is measured to be at least as good as the old one,
applies to more map lookups, has a constant RAM overhead, and applies to
native code as well as bytecode.

These performance options are enabled on the esp32, mimxrt, rp2, stm32 and
unix ports.  For esp32 and mimxrt some code is also moved to RAM to further
boost performance.  On stm32, performance increases by about 20% for
benchmarks that are heavy on name lookups, like misc_pystone.py and
misc_raytrace.py.  On esp32 performance can increase by 2-3x, and on mimxrt
it is up to 6x.

All boards in all ports now have a board.json metadata file, which is used
to automatically build firmware and generate a webpage for that board
(among other possibilities).  Auto-build scripts have been added for this
purpose and they build all esp32, mimxrt, rp2, samd and stm32 boards.  The
generated output is available at https://micropython.org/download.

Support for FROZEN_DIR and FROZEN_MPY_DIR has been deprecated for some time
and was finally removed in this release.  Instead of these, FROZEN_MANIFEST
can be used.  The io.resource_stream() function is also removed, replaced
by the pure Python version in micropython-lib.

The search order for importing frozen Python modules is now controlled by
the ".frozen" entry in sys.path.  This string is added by default in the
second position in sys.path.  User code should adjust sys.path depending on
the desired behaviour.  Putting ".frozen" first in sys.path will speed up
importing frozen modules.

A bug in multiple precision integers with bitwise of -0 was fixed in commit
2c139bb.

The platform module has been added to allow querying the compiler and
underlying SDK/HAL/libc version.  This is enabled on esp32, mimxrt and
stm32 ports.

The mpremote tool now supports seek, flush, mkdir and rmdir on PC-mounted
filesystems.  And a help command has been added.

The documentation has seen many additions and improvements thanks (for a
second time) to the Google Season of Docs project.  The rp2 documentation
now includes a reference for PIO assembly instructions, a PIO quick
reference and a PIO tutorial.  The random and stm modules have been
documented, along with sys.settrace, manifest.py files and mpremote.  There
is also now more detail about the differences between MicroPython and
standard Python 3.5 and above.

The esp32 port sees support for ESP32-S3 SoCs, and new boards GENERIC_S3,
ESP32_S2_WROVER, LOLIN_S2_MINI, LOLIN_S2_PICO and UM_FEATHERS2NEO.  The PWM
driver has been improved and now supports all PWM timers and channels, and
the duty_u16() and duty_ns() methods, and it keeps the duty constant when
changing frequency.  The machine.bitstream() function has been improved to
use RMT, with an option to select the original bit-banging implementation.

The mimxrt port gained new hardware features: SDRAM and SD card support, as
well as network integration with a LAN driver.  The machine.WDT class was
added along with the machine.reset_cause(), machine.soft_reset(),
machine.unique_id() add machine.bitstream() functions.  DHT sensor support
was added, and f-strings were enabled.

The rp2 port now has support for networking, and bluetooth using NimBLE.
The Nina-W10 WiFi/BT driver is fully integrated and supported by the new
Arduino Nano RP2040 connect board.  I2S protocol support is added along
with a machine.bitstream() driver and DHT sensor support.  The PWM driver
had a bug fix with the accuracy of setting/getting the frequency, and the
duty value is now retained when changing the frequency.

On the samd port there is now support for the internal flash being a block
device, and for filesystems and the os module.  Pin and LED classes have
been implemented.  There are more time functions, more Python features
enabled, and the help() function is added.  SEEED_WIO_TERMINAL and
SEEED_XIAO board definitions are now available.

The stm32 port now has support for F427, F479 and H7A3(Q)/H7B3(Q) MCUs, and
new board definitions for VCC_GND_H743VI, OLIMEX_H407, MIKROE_QUAIL,
GARATRONIC_PYBSTICK26_F411, STM32H73B3I_DK.  A bug was fixed in the SPI
driver where a SPI transfer could fail if the CYW43 WiFi driver was also
active at the same time.

On the windows port the help() function has been enabled, and support for
build variants added, to match the unix port.

The zephyr port upgraded Zephyr to v2.7.0.

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

       bare-arm:  -1520  -2.605%
    minimal x86:  -2256  -1.531%
       unix x64:   -457  -0.089%
    unix nanbox:   -925  -0.204%
          stm32:   +312  +0.079% PYBV10
         cc3200:   -176  -0.096%
        esp8266:   +532  +0.076% GENERIC
          esp32: +27096  +1.820% GENERIC
            nrf:   -212  -0.121% pca10040
            rp2:  +9904  +2.051% PICO
           samd: +35332 +33.969% ADAFRUIT_ITSYBITSY_M4_EXPRESS

The changes that dominate these numbers are:
- bare-arm, minimal: use of new MICROPY_CONFIG_ROM_LEVEL_MINIMUM option and
  subsequent disabling of remaining optional features
- unix, cc3200, nrf: general code size reductions of the core
- stm32: performance improvements, addition of platform module
- esp8266: enabling f-strings
- esp32: use of -O2 instead of -Os
- rp2: machine.I2S and other new hardware features
- samd: filesystem support and other new hardware features

Thanks to everyone who contributed to this release: Alan Dragomirecký,
Alexey Shvetsov, Andrew Leech, Andrew Scheller, Antoine Aubert, Boris
Vinogradov, Chris Boudacoff, Chris Fiege, Christian Decker, Damien George,
Daniel Gorny, Dave Hylands, David Michieli, Emilie Feral, Frédéric Pierson,
gibbonsc, Henk Vergonet, iabdalkader, Ihor Nehrutsa, Jan Hrudka, Jan Staal,
jc_.kim, Jim Mussared, Jonathan Hogg, Laurens Valk, leo chung, Lorenzo
Cappelletti, Magnus von Wachenfeldt, Matt Trentini, Matt van de Werken,
Maureen Helm, Michael Bentley, Michael Buesch, Mike Causer, Mike Teachman,
Mike Wadsten, Ned Konz, NitiKaur, oli, patrick, Patrick Van Oosterwijck,
Peter Boin, Peter Hinch, Peter van der Burg, Philipp Ebensberger, Pooya
Moradi, retsyo, robert-hh, roland van straten, Scott Armitage, Sebastian
Wicki, Seon Rozenblum, Sergei Silnov, Simon Baatz, Stewart Bonnick, stijn,
Tobias Thyrrestrup, Tomas Vanek, YoungJoon Chun.

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

Main components
===============

all:
- remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE
- update Python formatting to latest Black version 21.12b0
- remove support for FROZEN_DIR and FROZEN_MPY_DIR

py core:
- parse: simplify parse nodes representing a list
- emitnative: ensure load_subscr does not clobber existing REG_RET
- mpconfig.h: define initial templates for "feature levels"
- vm: add a fast path for LOAD_ATTR on instance types
- map: add an optional cache of (map+index) to speed up map lookups
- builtinimport: forward all debug printing to MICROPY_DEBUG_PRINTER
- add wrapper macros so hot VM functions can go in fast code location
- runtime: fix crash when exc __new__ doesn't return an exc instance
- mpconfig.h: define the "extra" feature level
- mpconfig.h: revert MICROPY_REPL_INFO to disabled at all levels
- gc: add hook to run code during time consuming GC operations
- showbc: print unary-op string when dumping bytecode
- modsys: replace non-ASCII quote char with ASCII char
- runtime: allow types to use both .attr and .locals_dict
- lexer: support nested [] and {} characters within f-string params
- objfun.h: remove obsolete comments about entries in extra_args
- builtinimport: refactor module importing
- showbc: fix printing of raw bytecode header on nanbox builds
- modio: remove io.resource_stream function
- only search frozen modules when '.frozen' is found in sys.path
- mkrules.cmake: set frozen preprocessor defs early
- runtime: allow initialising sys.path/argv with defaults
- mpstate.h: only include sys.path/argv objects in state when enabled
- mpz: fix bugs with bitwise of -0 by ensuring all 0's are positive
- qstr: reset mpstate.qstr_last_chunk before raising an error
- modbuiltins: add additional macro for extending builtins
- mpconfig.h: define MICROPY_PY_USSL_FINALISER only if not defined

extmod:
- machine_i2c: make SoftI2C configurable via macro option
- machine_spi: make SoftSPI configurable via macro option
- modonewire: make _onewire module configurable via macro option
- machine_pwm: factor out machine.PWM bindings to common code
- move modnetwork and modusocket from stm32 to extmod
- modnetwork: add STA_IF and AP_IF constants
- modnetwork: add extended socket state
- modusocket: add read/write stream methods to socket object
- modnetwork: define network interfaces in port config files
- network_cyw43: make consistent use of STA and AP constants
- modnetwork: remove STM32 references
- modnetwork: remove modnetwork socket u_state member
- mpbthci.h: add mp_bluetooth_hci_uart_any prototype
- nimble: add nimble CMake fragment file
- add platform module
- moduplatform: improve implementation for PC ports
- vfs_posix_file: support MP_STREAM_POLL in vfs_posix_file_ioctl
- modbluetooth: add connection interval to gap_connect
- nimble: update to NimBLE v1.4
- nimble: remove workaround for OS_ENOMEM
- uasyncio: fix gather returning exceptions from a cancelled task
- uplatform: remove unused definitions
- uplatform: use generic custom platform string
- network_ninaw10: fix scan list order to match other NICs
- modbluetooth: support gap_connect(None) to cancel a connection
- modure: redirect regex debug printing to mp_printf
- network_ninaw10: fix config of AP mode
- network_ninaw10: disable active connections before connecting
- network_ninaw10: make NIC state persistent
- network_ninaw10: return -1 on timeout from recv/send
- network_ninaw10: make recv/recvfrom interchangeable
- moduplatform: detect xtensa arch
- modusocket: allow setting timeout on unbound sockets
- modusocket: initialise accepted socket state
- network_ninaw10: use socket timeout preset in modusocket
- modbluetooth: fix conditional compilation of ringbuf_put_uuid
- modbluetooth: put declaration of connect_cancel in correct place

shared:
- libc/string0: don't include string.h, and provide __memcpy_chk
- runtime/pyexec: cleanup EXEC_FLAG flag constants

drivers:
- ninaw10: add ublox Nina-W10 WiFi/BT module driver
- lsm6dsox: add LSM6DSOX driver and examples
- neopixel: avoid heap alloc in fill()
- ninaw10: fix BSSID byte order, and add null byte to ESSID
- ninaw10/nina_wifi_drv: fix DNS resolution

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

lib:
- mynewt-nimble: switch to the MicroPython fork of NimBLE
- asf4: point submodule to latest commit on circuitpython branch
- update pico-sdk to 1.3.0 and tinyusb to 0.12.0
- stm32lib: update library for L4 v1.17.0, new G4, WL, and MMC fixes
- stm32lib: update library for fix to F7 USB HS

Support components
==================

docs:
- library/os.rst: clarify littlefs requirements for block erase
- library/bluetooth.rst: update incorrect link to gatts_write
- make.bat: change Windows output dir from '_build' to 'build'
- library/machine.I2S.rst: specify that I2S.shift args are kw-only
- esp32: explain ESP32 PWM modes, timers, and channels
- rp2: add reference for PIO assembly instructions, and PIO tutorial
- library/random.rst: document the random module
- reference/mpremote.rst: add docs for mpremote
- reference/manifest.rst: add docs for manifest.py files
- library/stm.rst: document the stm module
- esp32/tutorial: add an example of peripheral control via regs
- rp2/general.rst: fix typo with missing spaces
- library/framebuf.rst: adjust dimensions in example
- library/rp2.rst: update function asm_pio_encode to add sideset_opt
- reference/filesystem.rst: add detail on how to use littlefs fuse
- rp2/quickref.rst: add section on PIO
- library/sys.rst: add docs for sys.settrace
- esp8266/tutorial: fix comments of FrameBuffer examples
- library/uasyncio.rst: detail exception behaviour in cancel/timeout
- library/machine.Timer.rst: document 'id' as positional-only arg
- library/machine.SPI.rst: add example SPI usage
- library/machine.Timer.rst: document `period` and `callback` args
- library/machine.Pin.rst: add Pin.ANALOG mode constant
- remove trailing spaces and convert tabs to spaces
- library/sys.rst: add note about '.frozen' as an entry in sys.path
- differences: document details of new PEPs/features in Python 3.5+
- update copyright year range to include 2022
- esp32: update RMT quickref example to match latest code

examples: no changes specific to this component/port

tests:
- perf_bench: use math.log instead of math.log2
- basics: add tests for type-checking subclassed exc instances
- micropython/const.py: add comment about required config for test
- cpydiff: clarify f-string diffs regarding concatenation
- basics/int_big_cmp.py: add more tests for big-int comparison
- extmod: skip uselect_poll_udp when poll() is not available

tools:
- autobuild: add auto build for GENERIC_C3_USB
- ci.sh: use IDF v4.4 as part of esp32 CI and build GENERIC_S3
- autobuild: add the MIMXRT1010_EVK board to autobuild
- ci.sh: use a specific ESP IDF v4.4 commit
- autobuild: add script to generate website board metadata
- dfu.py: make tool work with python3 when parsing DFU files
- autobuild: automatically build all mimxrt, rp2 and samd boards
- autobuild: automatically build all stm32 boards
- mpremote: implement seek and flush in ioctl method
- autobuild: automatically build all esp32 boards
- upip.py: support == to specify exact package version
- makemanifest.py: make str conversion compatible with Python 2
- makemanifest.py: merge make-frozen.py
- mpremote: add mkdir and rmdir to RemoteFS
- mpremote: add help command
- mpremote: add link to mpremote docs URL in help message
- upip.py: skip '.frozen' entry in sys.path for install path
- autobuild: build esp8266 OTA image with GENERIC_1M board
- ci.sh: upgrade Zephyr docker image to v0.21.0
- ci.sh: build zephyr nucleo_wb55rg to test zephyr bluetooth build

CI:
- workflows: use Python 3.8 for macos workflow
- workflows: add new workflow to build ports download metadata

The ports
=========

all ports:
- add board.json for all boards
- add images, features and urls to board.json
- add '.frozen' as the first entry in sys.path
- move '.frozen' to second entry in sys.path

bare-arm port:
- mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM
- mpconfigport.h: disable remaining optional features

cc3200 port: no changes specific to this component/port

esp8266 port:
- boards/GENERIC: enable f-strings
- extract qstr from object when comparing keys in config()
- etshal.h: remove unneeded function declarations
- allow building a board to any dest directory

esp32 port:
- boards: add new FeatherS2-Neo board definition
- machine_timer: use tx_update member for IDF 4.4 and above
- add support for ESP32-S3 SoCs
- boards: add new GENERIC_S3 board definition
- machine_hw_spi: fix hardware SPI DMA channels for S2/S3
- boards: add board definition for ESP32-S2-WROVER module
- boards: add LOLIN_S2_MINI ESP32-S2 board
- machine_pwm: add support for all PWM timers and channels
- README: updated readme with req IDF vers for ESP32-S2, C3 and S3
- usb: add USB host connection detection for CDC serial output
- machine_pin: block out IO16 and IO17 when using SPIRAM on ESP32
- mpthreadport: fix TCB cleanup function so thread_mutex is ready
- main: add option for a board to hook code into startup sequence
- split out WLAN code from modnetwork.c to network_wlan.c
- enable optimisations and move code to iRAM to boost performance
- usb: improve speed of USB CDC output
- add specific deploy_s2.md instructions for esp32-s2
- boards/LOLIN_S2_MINI: add image to board.json
- boards: update board and deploy metadata for UM_xxx boards
- usb: further improve speed of USB CDC output
- boards/LOLIN_S2_PICO: add LOLIN_S2_PICO board definition files
- boards/ESP32_S2_WROVER: link to specific deploy_s2 instructions
- support building with latest IDF v5
- in machine_i2s, send null samples in underflow situations
- in machine_i2s, make object reference arrays root pointers
- add SDCard support for S3, and a GENERIC_S3_SPIRAM board
- boards/GENERIC_S3: enable BLE on ESP32 S3
- machine_pwm: implement duty_u16() and duty_ns() PWM methods
- extract qstr from object when comparing keys in config()
- machine_pin: make GPIO 26 usable for S2,S3 if SPIRAM not config'd
- machine_hw_spi: fix SPI default pins reordering on ESP32-S2/S3
- machine_hw_spi: set proper default SPI(id=1) pins on S2,S3 and C3
- machine_hw_spi: set proper default SPI(id=2) pins on S2 and S3
- boards: remove SPI pin defaults from GENERIC S2/S3 boards
- modnetwork: synchronize WiFi AUTH_xxx constants with IDF values
- machine_pwm: keep duty constant when changing frequency
- machine_bitstream: replace bit-bang code with RMT-based driver
- machine_i2s: add support for ESP-IDF 4.4
- machine_bitstream: fix signal duplication on output pins
- esp32: enable platform module with IDF version
- boards/GENERIC_D2WD: build with -Os optimisation
- esp32_rmt: install RMT driver on core 1
- machine_bitstream: reinstate bitstream bit-bang implementation

javascript port: no changes specific to this component/port

mimxrt port:
- sdcard: implement SDCard driver
- machine_bitstream: add bitstream function to machine module
- rework flash configuration
- sdram: add SDRAM support
- eth: add LAN support and integrate the network module
- modmachine: implement machine.WDT() and machine.reset_cause()
- boards: fix the D14/D15 pin assignment of MIMXRT1050/60/64_EVK
- hal: remove duplicate definitions from flexspi_hyper_flash.h
- dma_channel: fix the DMA channel management
- fix cycle counter for time.ticks_cpu() and machine.bitstream()
- add dht_readinto() to the mimxrt module, and freeze dht.py
- extend the help() message and README.md
- mpconfigport.h: enable f-strings
- modmachine: implement soft_reset() and unique_id() functions
- boards/make-pins.py: allow empty lines and comments in pins.csv
- optimize the runtime speed
- enable the platform module
- boards: add the Seeed ARCH MIX board
- boards: update the board.json files and add deploy_xx.md files
- fix mp_hal_quiet_timing_enter()/exit() so timer still runs
- support PWM using the FLEXPWM and QTMR modules
- define UART 0 on MIMXRT boards
- support selection of PHY type and address
- re-enable eth checksum creation by HW
- fix a tiny unnoticed bug in sdcard.c
- add a driver for the DP83848 PHY device
- refactor the reading of the machine id
- enable ticks_cpu at boot time for NDEBUG builds only
- use -Og instead of -O0 for DEBUG builds
- tidy up the board flash related files
- hal: allow readSampleClkSrc to be configured by a board
- enable MICROPY_PY_USSL_FINALISER

minimal port:
- mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM
- Makefile: don't force a 32-bit build
- mpconfigport.h: disable features that are not needed

nrf port:
- Makefile: improve Black Magic Probe commands
- main: use VFS helper function to mount fs and chdir

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

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

rp2 port:
- mpconfigport.h: enable heapq module
- add support for bluetooth module using NimBLE
- add framework for networking
- mpconfigport.h: use the "extra" feature level
- enable optimisations (comp goto, map cache, fast attr)
- machine_i2s: add I2S protocol support
- add support for Nina-W10 WiFi/BT module
- boards: add support for Arduino Nano RP2040
- machine_bitstream: implement the machine.bitstream driver
- boards: add neopixel.py to manifest.py
- rp2_pio: support exec with sideset
- boards/PIMORONI_PICOLIPO_16MB: fix 16MB flash size
- boards: add PYBSTICK26 RP2040 board definition
- machine_uart: handle and clear UART RX timeout IRQ
- boards/ARDUINO_NANO_RP2040_CONNECT: set default I2C pins
- machine_pwm: fix PWM frequency setting
- machine_pwm: keep duty value when changing the frequency
- add support for DHT11 and DHT22 sensors
- CMakeLists.txt: allow a board to override PICO_BOARD
- boards/GARATRONIC_PYBSTICK26_RP2040: use correct pico-sdk board cfg

samd port:
- integrate latest asf4, add help, more time funcs and uPy features
- samd_soc: allow a board to configure the low-level MCU config
- add internal flash block device, filesystem and uos support
- add Pin and LED classes, and machine.unique_id
- boards/ADAFRUIT_FEATHER_M0_EXPRESS: update for flash and pins
- boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS: update for flash and pins
- boards/MINISAM_M4: update for flash and pins
- boards/ADAFRUIT_TRINKET_M0: update for flash and pins
- boards/SAMD21_XPLAINED_PRO: update for flash and pins
- boards/SEEED_WIO_TERMINAL: add new board definition
- boards/SEEED_XIAO: add new board definition
- README.md: update README to reflect new features and boards

stm32 port:
- pin: enable GPIO clock of pin if it's constructed without init
- main: don't unconditionally enable GPIO A,B,C,D clocks
- boards/VCC_GND_H743VI: add board definition for VCC_GND_H743VI
- boards/OLIMEX_E407: add Ethernet RMII support
- boards/LEGO_HUB_NO6: remove user paths from cc2564 init file
- boards: remove trailing spaces, and add newline at end of file
- add basic support for STM32H750
- add support for H7A3(Q)/H7B3(Q), and STM32H73B3I_DK board defn
- suggest putting code in main.py not boot.py
- boards/make-pins.py: allow a CPU pin to be hidden
- boards/make-pins.py: allow empty lines and comments in pins.csv
- dma: add functions for external users of DMA to enable clock
- enable LOAD_ATTR fast path, and map lookup caching on >M0
- boards: add OLIMEX H407 board definition
- enable platform module
- extended flash filesystem space to 512K on H743 boards
- boards/NUCLEO_H743ZI: enable VfsLfs2 on NUCLEO_H743ZI(2) boards
- boards: add PF11-BOOT0 to stm32f091_af.csv
- machine_i2c: use hardware I2C for STM32H7
- sdram: enforce gcc opt, and use volatile and DSB in sdram_test
- usbd_cdc_interface: allow a board to hook into USBD CDC RX events
- mpbthciport: allow a board to hook BT HCI poll functions
- pendsv: allow a board to add entries for pendsv_schedule_dispatch
- boards: add images to board.json for Adafruit and VCC_GND boards
- uart: fix race conditions and clearing status in IRQ handler
- mpconfigport.h: use the "extra" feature level
- in machine_i2s, send null samples in underflow situations
- in machine_i2s, make object reference arrays root pointers
- led: support an extra 2 LEDs in board configuration
- boards/MIKROE_CLICKER2_STM32: add more detail to board.json
- boards: add new board MikroElektronika Quail, and F427 support
- main: run optional frozen module at boot
- sdio: don't explicitly disable DMA2 on deinit of SDIO
- dma: make DMA2_Stream3 exclusive to SDIO when CYW43 enabled
- boards: build NUCLEO_WB55 and STM32F769DISC without mboot enabled
- boards: add PYBSTICK26 F411 board definition
- boards/NADHAT_PYBF405: rename board to GARATRONIC_NADHAT_F405
- usb: use a table of allowed values to simplify usb_mode get/set
- boards/NUCLEO_WB55: update rfcore_firmwre for new WS
- flashbdev: support generic flash storage config via link symbols
- boards: convert F413,F439,H743,L4xx,WB55 to new flash FS config
- add support for F479 MCUs
- include HAL MMC code in F4 builds
- boards/make-pins.py: use cpu pins to define static alt-fun macros
- boards/NUCLEO_WB55: fix LED ordering
- boards/LEGO_HUB_NO6: set filesystem label as HUB_NO6
- boards: remove stray '+' characters at start of lines in ld files
- boards: remove unused MICROPY_HW_ENABLE_TIMER config
- boards: enable MICROPY_HW_ENABLE_SERVO on various boards
- update L4 code to build with latest stm32lib and L4 HAL 1.17.0
- main: call sdcard_init when only MICROPY_HW_ENABLE_MMCARD enabled
- sdcard: support 8-bit wide SDIO bus
- sdcard: add config option to force MM card capacity
- factoryreset: init vfs flags before calling pyb_flash_init_vfs
- qspi: fix typo in address comment
- boards/make-pins.py: generate empty ADC table if needed
- boards/OLIMEX_H407: fix typo in OLIMEX H407 board.json
- network_wiznet5k: fix build error with wiznet5k and lwip enabled
- enable MICROPY_PY_USSL_FINALISER

teensy port:
- switch to use manifest.py instead of FROZEN_DIR

unix port:
- enable LOAD_ATTR fast path, and map lookup caching
- modusocket: support MP_STREAM_POLL in unix socket_ioctl
- modos: add support for uos.urandom(n)
- coverage: change remaining printf to mp_printf
- Makefile: use -Og instead of -O0 for debug builds

windows port:
- README: remove unsupported Python instructions for Cygwin
- mpconfigport.h: enable help and help("modules")
- add support for build variants to windows port
- run tests via Makefile
- appveyor: build both standard and dev variants
- appveyor: build mpy-cross only once for mingw-w64
- msvc: run qstr preprocessing phase in parallel

zephyr port:
- mphalport.h: remove unused and unimplemented C-level pin API
- increase minimum CMake version to 3.20.0
- update include path to reboot.h
- get UART console device from devicetree instead of Kconfig
- use CONFIG_USB_DEVICE_STACK for conditional USB device support
- upgrade to Zephyr v2.7.0
- modbluetooth_zephyr: provide dummy connect_cancel function

v1.17

Toggle v1.17's commit message
F-strings, new machine.I2S class, ESP32-C3 support and LEGO_HUB_NO6 b…

…oard

This release of MicroPython adds support for f-strings (PEP-498), with a
few limitations compared to normal Python.  F-strings are essentially
syntactic sugar for "".format() and make formatting strings a lot more
convenient.  Other improvements to the core runtime include pretty printing
OSError when it has two arguments (an errno code and a string), scheduling
of KeyboardInterrupt on the main thread, and support for a single argument
to the optimised form of StopIteration.

In the machine module a new I2S class has been added, with support for
esp32 and stm32 ports.  This provides a consistent API for transmit and
receive of audio data in blocking, non-blocking and asyncio-based
operation.  Also, the json module has support for the "separators" argument
in the dump and dumps functions, and framebuf now includes a way to blit
between frame buffers of different formats using a palette.  A new,
portable machine.bitstream function is also added which can output a stream
of bits with configurable timing, and is used as the basis for driving
WS2812 LEDs in a common way across ports.

There has been some restructuring of the repository directory layout, with
all third-party code now in the lib/ directory.  And a new top-level
directory shared/ has been added with first-party code that was previously
in lib/ moved there.

The docs have seen further improvement with enhancements and additions to
the rp2 parts, as well as a new quick reference for the zephyr port.
The terms master/slave have been replaced with controller/peripheral,
mainly relating to I2C and SPI usage.  And u-module references have been
replaced with just the module name without the u-prefix to help clear up
the intended usage of modules in MicroPython.

For the esp8266 and esp32 ports, hidden networks are now included in WLAN
scan results.  On the esp32 the RMT class is enhanced with idle_level and
write_pulses modes.  There is initial support for ESP32-C3 chips with
GENERIC_C3 and GENERIC_C3_USB boards.

The javascript port has had its Makefile and garbage collector
implementation reworked so it compiles and runs with latest the Emscripten
using asyncify.

The mimxrt port sees the addition of hardware I2C and SPI support, as well
as some additional methods to the machine module.  There is also support
for Hyperflash chips.

The nrf port now has full VFS storage support, enables source-line on
traceback, and has .mpy features consistent with other ports.

For the rp2 port there is now more configurability for boards, and more
boards added.

The stm32 port has a new LEGO_HUB_NO6 board definition with detailed
information how to get this LEGO Hub running stock MicroPython.  There is
also now support to change the CPU frequency on STM32WB MCUs.  And USBD_xxx
descriptor options have been renamed to MICROPY_HW_USB_xxx.

Thanks to everyone who contributed to this release: Amir Gonnen, Andrew
Scheller, Bryan Tong Minh, Chris Wilson, Damien George, Daniel Mizyrycki,
David Lechner, David P, Fernando, finefoot, Frank Pilhofer, Glenn Ruben
Bakke, iabdalkader, Jeff Epler, Jim Mussared, Jonathan Hogg, Josh Klar,
Josh Lloyd, Julia Hathaway, Krzysztof Adamski, Matúš Olekšák, Michael
Weiss, Michel Bouwmans, Mike Causer, Mike Teachman, Ned Konz, NitiKaur,
oclyke, Patrick Van Oosterwijck, Peter Hinch, Peter Züger, Philipp
Ebensberger, robert-hh, Roberto Colistete Jr, Sashkoiv, Seon Rozenblum,
Tobias Thyrrestrup, Tom McDermott, Will Sowerbutts, Yonatan Goldschmidt.

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

Main components
===============

all:
- fix signed shifts and NULL access errors from -fsanitize=undefined
- update to point to files in new shared/ directory

py core:
- mpstate: make exceptions thread-local
- mpstate: schedule KeyboardInterrupt on main thread
- mperrno: add MP_ECANCELED error code
- makeqstrdefs.py: don't include .h files explicitly in preprocessing
- mark unused arguments from bytecode decoding macros
- objexcept: pretty print OSError also when it has 2 arguments
- makeversionhdr: add --tags arg to git describe
- vm: simplify handling of MP_OBJ_STOP_ITERATION in yield-from opcode
- objexcept: make mp_obj_exception_get_value support subclassed excs
- support single argument to optimised MP_OBJ_STOP_ITERATION
- introduce and use mp_raise_type_arg helper
- modsys: optimise sys.exit for code size by using exception helpers
- objexcept: make mp_obj_new_exception_arg1 inline
- obj: fix formatting of comment for mp_obj_is_integer
- emitnative: reuse need_reg_all func in need_stack_settled
- emitnative: ensure stack settling is safe mid-branch
- runtime: fix bool unary op for subclasses of native types
- builtinimport: fix condition for including do_execute_raw_code()
- mkrules: automatically build mpy-cross if it doesn't exist
- implement partial PEP-498 (f-string) support
- lexer: clear fstring_args vstr on lexer free
- mkrules.mk: do submodule sync in "make submodules"

extmod:
- btstack: add missing call to mp_bluetooth_hci_uart_deinit
- btstack: check that BLE is active before performing operations
- uasyncio: get addr and bind server socket before creating task
- axtls-include: add axtls_os_port.h to customise axTLS
- update for move of crypto-algorithms, re1.5, uzlib to lib
- moduselect: conditionally compile select()
- nimble: fix leak in l2cap_send if send-while-stalled
- btstack/btstack.mk: use -Wno-implicit-fallthrough, not =0
- utime: always invoke mp_hal_delay_ms when >= to 0ms
- modbluetooth: clamp MTU values to 32->UINT16_MAX
- nimble: allow modbluetooth binding to hook "sent HCI packet"
- nimble: add "memory stalling" mechanism for l2cap_send
- uasyncio: in open_connection use address info in socket creation
- modujson: add support for dump/dumps separators keyword-argument
- modlwip: fix close and clean up of UDP and raw sockets
- modbluetooth: add send_update arg to gatts_write
- add machine.bitstream
- modframebuf: enable blit between different formats via a palette

lib:
- tinyusb: update to version 0.10.1
- pico-sdk: update to version 1.2.0
- utils/stdout_helpers: make mp_hal_stdout_tx_strn_cooked efficient
- axtls: switch to repo at micropython/axtls
- axtls: update to latest axtls 2.1.5 wih additional commits
- re1.5: move re1.5 code from extmod to lib
- uzlib: move uzlib code from extmod to lib
- crypto-algorithms: move crypto-algorithms code from extmod to lib
- update README's based on contents of these dirs

drivers:
- neopixel: add common machine.bitstream-based neopixel module
- neopixel: optimize fill() for speed
- neopixel: reduce code size of driver
- cyw43: fix cyw43_deinit so it can be called many times in a row
- cyw43: make wifi join fail if interface is not active

mpy-cross:
- disable stack check when building with Emscripten

Support components
==================

docs:
- library: document new esp32.RMT features and fix wait_done
- library: warn that ustruct doesn't handle spaces in format strings
- esp8266/tutorial: change flash mode from dio to dout
- replace master/slave with controller/peripheral in I2C and SPI
- rp2: enhance quickref and change image to Pico pinout
- rp2: update general section to give a brief technical overview
- library/utime.rst: clarify behaviour and precision of sleep ms/us
- library/uasyncio.rst: document stream readexactly() method
- library/machine.I2S.rst: fix use of sd pin in examples
- zephyr: add quick reference for the Zephyr port
- library/zephyr: add libraries specific to the Zephyr port
- templates: add unix and zephyr quickref links to top-index
- rename ufoo.rst to foo.rst
- replace ufoo with foo in all docs
- library/index.rst: clarify module naming and purpose
- library/builtins.rst: add module title
- library/network.rst: simplify socket import
- add docs for machine.bitstream and neopixel module
- library: fix usage of :term: for frozen module reference
- esp8266: use monospace for software tools
- reference: mention that slicing a memoryview causes allocation

examples: no changes specific to this component/port

tests:
- extmod: make uasyncio_heaplock test more deterministic
- cpydiff/modules_struct_whitespace_in_format: run black
- extmod/ujson: add tests for dump/dumps separators argument
- run-multitests.py: add broadcast and wait facility
- multi_bluetooth/ble_subscribe.py: add test for subscription
- extmod/vfs_fat_finaliser.py: ensure alloc at never-used GC blocks
- basics: split f-string debug printing to separate file with .exp
- pybnative: make while.py test run on boards without pyb.delay

tools:
- autobuild: add scripts to build release firmware
- remove obsolete build-stm-latest.sh script
- ci.sh: run apt-get update in ci_powerpc_setup
- makemanifest.py: allow passing flags to mpy-tool.py
- autobuild: add mimxrt port to build scripts for nightly builds
- pyboard.py: add cmd-line option to make soft reset configurable
- mpremote: swap order of PID and VID in connect-list output
- ci.sh: build unix dev variant as part of macOS CI
- ci.sh: build GENERIC_C3 board as part of esp32 CI
- autobuild: use separate IDF version to build newer esp32 SoCs
- autobuild: add FeatherS2 and TinyS2 to esp32 auto builds
- mpremote: add seek whence for mounted files
- mpremote: raise OSError on unsupported RemoteFile.seek
- autobuild: add the MIMXRT1050_EVKB board to the daily builds
- ci.sh: add mpy-cross build to nrf port
- codeformat.py: include ports/nrf/modules/nrf in code formatting
- gen-cpydiff.py: don't rename foo to ufoo in diff output
- autobuild: add auto build for Silicognition wESP32
- mpremote: fix connect-list in case VID/PID are None
- mpremote: add "devs" shortcut for "connect list"
- mpremote: remove support for pyb.USB_VCP in/out specialisation
- autobuild: don't use "-B" for make, it's already a fresh build
- pyboard.py: move --no-exclusive/--soft-reset out of mutex group
- pyboard.py: make --no-follow use same variable as --follow
- pyboard.py: add --exclusive to match --no-exclusive
- pyboard.py: make --no-soft-reset consistent with other args
- uncrustify: force 1 newline at end of file
- mpremote: bump version to 0.0.6

CI:
- workflows: add workflow to build and test javascript port
- workflows: switch from Coveralls to Codecov
- workflows: switch from lcov to gcov
- workflows: add workflow to build and test unix dev variant

The ports
=========

all ports:
- use common mp_hal_stdout_tx_strn_cooked instead of custom one
- update for move of crypto-algorithms, uzlib to lib
- rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID

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

cc3200 port: no changes specific to this component/port

esp8266 port:
- add __len__ to NeoPixel driver to support iterating
- Makefile: add more libm files to build
- include hidden networks in WLAN.scan results
- replace esp.neopixel with machine.bitstream
- remove dead code for end_ticks in machine_bitstream

esp32 port:
- boards/sdkconfig.base: disable MEMPROT_FEATURE to alloc from IRAM
- add __len__ to NeoPixel driver to support iterating
- main: allow MICROPY_DIR to be overridden
- esp32_rmt: fix RMT looping in newer IDF versions
- esp32_rmt: enhance RMT with idle_level and write_pulses modes
- add new machine.I2S class for I2S protocol support
- machine_spi: calculate actual attained baudrate
- machine_hw_spi: use a 2 item SPI queue for long transfers
- machine_dac: add MICROPY_PY_MACHINE_DAC option, enable by default
- machine_i2s: add MICROPY_PY_MACHINE_I2S option, enable by default
- fix use of mp_int_t, size_t and uintptr_t
- add initial support for ESP32C3 SoCs
- boards/GENERIC_C3: add generic C3-based board
- modmachine: release the GIL in machine.idle()
- mphalport: always yield at least once in delay_ms
- machine_uart: add flow kw-arg to enable hardware flow control
- boards: add Silicognition wESP32 board configuration
- mpconfigport.h: enable reverse and inplace special methods
- include hidden networks in WLAN.scan results
- makeimg.py: get bootloader and partition offset from sdkconfig
- enable MICROPY_PY_FSTRINGS by default
- machine_hw_spi: release GIL during transfers
- machine_pin: make check for non-output pins respect chip variant
- replace esp.neopixel with machine.bitstream
- remove dead code for end_ticks in machine_bitstream
- boards: add GENERIC_C3_USB board with USB serial/JTAG support

javascript port:
- rework Makefile and GC so it works with latest Emscripten
- Makefile: suppress compiler errors from array bounds
- Makefile: change variable to EXPORTED_RUNTIME_METHODS

mimxrt port:
- move calc_weekday helper function to timeutils
- machine_spi: add the SPI class to the machine module
- moduos: seed the PRNG on boot using the TRNG
- boards: set vfs partition start to 1 MBbyte
- main: skip running main.py if boot.py failed
- main: extend the information returned by help()
- mimxrt_flash: remove commented-out code
- modmachine: add a few minor methods to the machine module
- machine_led: use mp_raise_msg_varg helper
- machine_i2c: add hardware-based machine.I2C to machine module
- add support for Hyperflash chips
- boards: add support for the MIMXRT1050_EVKB board
- machine_pin: implement ioctl for Pin

minimal port:
- Makefile: add support for building with user C modules

nrf port:
- modules: replace master/slave with controller/peripheral in SPI
- boards/common.ld: calculate unused flash region
- modules/nrf: add new nrf module with flash block device
- drivers: add support for using flash block device with SoftDevice
- mpconfigport.h: expose nrf module when MICROPY_PY_NRF is set
- README: update README.md to reflect internal file systems
- mpconfigport.h: tune FAT FS configuration
- Makefile: add _fs_size linker script override from make
- modules/uos: allow a board to configure MICROPY_VFS_FAT/LFS1/LFS2
- mpconfigport.h: enable MICROPY_PY_IO_FILEIO when an FS is enabled
- qstrdefsport.h: add entries for in-built FS mount points
- main: add auto mount and auto format hook for internal flash FS
- boards: enable needed features for FAT/LFS1/LFS2
- facilitate use of freeze manifest
- boards: set FROZEN_MANIFEST blank when SD present on nrf51 targets
- modules/scripts: add file system formatting script
- Makefile: set default manifest file for all targets
- mphalport: add dummy function for mp_hal_time_ns()
- boards: enable MICROPY_VFS_LFS2 for all target boards
- modules/uos: add ilistdir to uos module
- modules/nrf: add function to enable/disable DCDC
- enable source line on tracebacks
- set .mpy features consistent with documentation and other ports

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

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

rp2 port:
- use 0=Monday datetime convention in RTC
- machine_rtc: in RTC.datetime, compute weekday automatically
- CMakeLists.txt: suppress compiler errors for pico-sdk and tinyusb
- tusb_config.h: set CFG_TUD_CDC_EP_BUFSIZE to 256
- machine_uart: add hardware flow control support
- machine_uart: allow overriding default machine UART pins
- machine_i2c: allow boards to configure I2C pins using new macros
- machine_spi: allow boards to configure SPI pins using new macros
- machine_uart: fix poll ioctl to also check hardware FIFO
- machine_uart: fix read when FIFO has chars but ringbuf doesn't
- tusb_port: allow boards to configure USB VID and PID
- boards/ADAFRUIT_FEATHER_RP2040: configure custom VID/PID
- boards/ADAFRUIT_FEATHER_RP2040: configure I2C/SPI default pins
- boards/SPARKFUN_PROMICRO: configure UART/I2C/SPI default pins
- boards/SPARKFUN_THINGPLUS: configure I2C/SPI default pins
- boards: add Adafruit ItsyBitsy RP2040
- boards: add Adafruit QT Py RP2040
- boards: add Pimoroni Pico LiPo 4MB
- boards: add Pimoroni Pico LiPo 16MB
- boards: add Pimoroni Tiny 2040
- CMakeLists.txt: allow a board's cmake to set the manifest path
- enable MICROPY_PY_FSTRINGS by default
- Makefile: add "submodules" target, to match other ports
- rp2_flash: disable IRQs while calling flash_erase/program
- CMakeLists.txt: add option to enable double tap reset to bootrom
- mpconfigport.h: allow boards to add root pointers

samd port:
- add support for building with user C modules

stm32 port:
- softtimer: add soft_timer_reinsert() helper function
- mpbthciport: change from systick to soft-timer for BT scheduling
- provide a custom BTstack runloop that integrates with soft timer
- usb: make irq's default trigger enable all events
- boardctrl: skip running main.py if boot.py had an error
- sdio: fix undefined reference to DMA stream on H7
- dma: add DMAMUX configuration for H7 to fix dma_nohal_init
- main: call mp_deinit() at end of main
- adc: allow using ADC12 and ADC3 for H7
- adc: define the ADC instance used for internal channels
- adc: simplify and generalise how pin_adcX table is defined
- add new machine.I2S class for I2S protocol support
- boards/NUCLEO_F446RE: fix I2C1 pin assignment to match datasheet
- replace master/slave with controller/peripheral in I2C and SPI
- systick: always POLL_HOOK when delaying for milliseconds
- sdram: make SDRAM test cache aware, and optional failure with msg
- boards/NUCLEO_F446RE: enable CAN bus support
- boards: add support for SparkFun STM32 MicroMod Processor board
- uart: fix LPUART1 baudrate set/get
- uart: support low baudrates on LPUART1
- boards/STM32F429DISC: set correct UART2 pins and add UART3/6
- boards/NUCLEO_F439ZI: add board definition for NUCLEO_F439ZI
- boards/LEGO_HUB_NO6: add board definition for LEGO_HUB_NO6
- Makefile: update to only pull in used Bluetooth library
- README.md: update supported MCUs, and submodule and mboot use
- usbd_desc: rename USBD_xxx descriptor opts to MICROPY_HW_USB_xxx
- usbd_cdc_interface: rename USBD_CDC_xx opts to MICROPY_HW_USB_xx
- powerctrl: support changing frequency on WB MCUs
- boards/NUCLEO_H743ZI2: add modified version of NUCLEO_H743ZI
- mbedtls: fix compile warning about uninitialized val
- enable MICROPY_PY_FSTRINGS by default
- add implementation of machine.bitstream
- Makefile: allow GIT_SUBMODULES and LIBS to be extended
- stm32_it: support TIM17 IRQs on WB MCUs
- disable computed goto on constrained boards
- storage: make extended-block-device more configurable
- boards/LEGO_HUB_NO6: change SPI flash storage to use hardware SPI
- boards/LEGO_HUB_NO6: skip first 1MiB of SPI flash for storage
- boards/LEGO_HUB_NO6: add make commands to backup/restore firmware

teensy port: no changes specific to this component/port

unix port:
- modffi: add option to lock GC in callback, and cfun access
- Makefile: add back LIB_SRC_C to list of object files
- variants: enable help and help("modules") on standard and dev
- Makefile: disable error compression on arm-linux-gnueabi-gcc

windows port:
- Makefile: add .exe extension to executables name
- appveyor: update to VS 2017 and use Python 3.8 for build/test

zephyr port:
- machine_spi: add support for hardware SPI

v1.15

Toggle v1.15's commit message
The esp32 port moves to CMake and has S2 support, new features for rp2

This release of MicroPython adds general support in the core for using
CMake as a build system.  The rp2 port is consolidated to use the new
CMake files, and the esp32 and zephyr ports have switched to build as
pure CMake projects.  These three ports have SDKs which are built around
CMake and this change should make them easier to maintain and use.

As part of this work, CMake based ports now have support for user C
modules. Authors of user C modules should now provide both .mk and .cmake
configuration files (following the documentation and examples).

A bug was fixed in the multiple precision integer library, an arithmetic
overflow in the long division routine.  Prior to this fix certain integer
divisions would take excessive time and produce incorrect results.  See
commit 0a59938 for details.  There was
also a fix for regular expressions, to check and report byte overflow
errors when compiling expressions.  See commit
172fb52.

In the uasyncio library, a new MicroPython extension has been added,
ThreadSafeFlag, which can be set from outside the asyncio event loop,
such as other threads, IRQs or scheduler context.  It allows preemptive
code like IRQs to signal asyncio tasks, which are by nature cooperative
(non-preemptive).  asyncio.current_task() has also been added, with the
same semantics as CPython.

As mentioned above, the esp32 port has switched to a full CMake-based
project, and traditional make capability has been removed (although a
simple helper Makefile remains to keep top-level build/deploy commands
consistent with other ports).  Because of the move to CMake, network.LAN
support has been removed, to be added back in the future (use a prior
release if LAN is needed).  Basic support for Non-Volatile-Storage is added
to the esp32 module.  And there is also preliminary support for ESP32S2
SoCs and USB, with a GENERIC_S2 board defined.

On the mimxrt and samd ports, USB CDC TX handling has been fixed so that it
now works reliably.

The rp2 port has had many more core Python features enabled, along with the
enabling of ubinascii.crc32(), the uos.VfsFat and machine.Signal classes,
and the uerrno module.  uos.urandom() has been added and machine.freq() can
now change the CPU clock frequency.  The machine.UART class now has support
for timeout/timeout_char, inverted TX/RX lines, and buffered TX/RX with
configurable sized buffers.  For PIO, StateMachine has added restart(),
rx_fifo() and tx_fifo() helper functions, and support for FIFO joining.
There is now support for user C modules (via CMake) and for building
different board configurations (the default remains the PICO board).  USB
reliability has been improved.

For the stm32 port, there is now more configuration options for boards,
such as USBD VID/PID and fine-grained selection of modules.  The UART class
now supports LPUART on L0, L4, H7 and WB MCUs.  WB MCUs have a fix for a
race condition accessing the BLE ACL free buffer list, and a workaround for
a low-level BLE bug.

The zephyr port has been updated to use zephyr v2.5.0, and now builds
MicroPython as a CMake target.

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

Main components
===============

all:
- rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD
- add .git-blame-ignore-revs for fixing up git blame output

py core:
- gc: don't include mpconfig.h and misc.h in gc.h
- remove BITS_PER_WORD definition
- rename BITS_PER_BYTE to MP_BITS_PER_BYTE
- rename WORD_MSBIT_HIGH to MP_OBJ_WORD_MSBIT_HIGH
- gc: change include of stdint.h to stddef.h
- mpz: fix overflow of borrow in mpn_div
- add core cmake rule files
- expand lists in core cmake custom commands
- mkrules.cmake: rename QSTR_DEFS variables to QSTRDEFS
- mkrules.cmake: add MICROPY_QSTRDEFS_PORT to qstr build process
- nlr: implement NLR for AArch64
- nlrx64: fix typo in comment
- vm: for tracing use mp_printf, and print state when thread enabled
- rename remaining object types to be of the form mp_type_xxx
- py.cmake: move qstr helper code to micropy_gather_target_properties
- py.cmake: introduce MICROPY_INC_CORE as a list with core includes
- profile: resolve name collision with STATIC unset
- runtime: make sys.modules preallocate to a configurable size

extmod:
- vfs_posix_file: allow closing an already closed file
- btstack: add HCI trace debugging option in btstack_hci_uart
- btstack: add stub functions for passkey, l2cap bindings
- btstack: enable SYNC_EVENTS, PAIRING_BONDING by default
- uasyncio: add asyncio.current_task()
- add core cmake rule files
- nimble: ensure handle is set on read error
- moduselect: fix unsigned/signed comparison for timeout!=-1
- uasyncio: add ThreadSafeFlag
- nimble/hal/hal_uart: fix HCI_TRACE format specifiers
- modbluetooth: allow NimBLE to use Zephyr static address
- modussl: fix ussl read/recv/send/write errors when non-blocking
- btstack: use MICROPY_HW_BLE_UART_BAUDRATE for first UART init
- modbluetooth: separate enabling of "client" from "central"
- extmod.cmake: add modonewire.c to MICROPY_SOURCE_EXTMOD list
- modbluetooth: free temp arrays in gatts register services
- re1.5: check and report byte overflow errors in _compilecode
- extmod.cmake: add support to build btree module with CMake

lib:
- tinyusb: update to version 0.8.0
- mbedtls: switch to currently latest commit of LTS branch v2.16
- utils/gchelper_generic: implement AArch64 support
- pico-sdk: update to latest version 1.1.0

drivers: no changes specific to this component/port

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

Support components
==================

docs:
- library/uasyncio.rst: add docs for ThreadSafeFlag
- develop/cmodules.rst: document C-modules and micropython.cmake
- develop: improve user C modules to properly describe how to build

examples:
- usercmodule: add micropython.cmake to the C and CPP examples
- usercmodules: simplify user C module enabling
- embedding: fix example so it compiles again

tests:
- extmod/vfs_posix.py: add more tests for VfsPosix class
- extmod: add test for ThreadSafeFlag
- multi_bluetooth: add basic performance tests
- rename run-tests to run-tests.py for consistency
- run-tests.py: reformat with Black
- multi_bluetooth: skip tests when BLE features are unsupported
- extmod/vfs_fat_fileio2.py: close test file at end of test
- run-tests.py: provide more info if script run via pyboard crashes
- feature_check: check for lack of pass result rather than failure
- net_inet: add 'Strict-Transport-Security' to exp file

tools:
- add filesystem action examples to pyboard.py help
- ci.sh: change esp32 CI to work with idf.py and IDF v4.0.2
- makemanifest.py: allow passing option args to include()
- ci.sh: update zephyr docker image to v0.11.13
- verifygitlog.py: show required format regexp in error message
- pydfu.py: support DFU files with elements of zero size
- ci.sh: add CI for CMake USER_C_MODULE support
- ci.sh: build user C modules for esp32
- metrics.py: fix esp32 output filename due to move to CMake
- ci.sh: build esp32 using IDF v4.0.2 and v4.3

The ports
=========

all ports:
- remove def of MP_PLAT_PRINT_STRN if it's the same as the default
- update to build with new tinyusb

bare-arm port:
- clean up the code, make it run on an F405, and add a README

cc3200 port: no changes specific to this component/port

esp8266 port:
- modules: fix fs_corrupted() to use start_sec not START_SEC

esp32 port:
- add support to build using IDF with cmake
- esp32_rmt: don't do unnecessary check for unsigned less than zero
- add explicit initialisers to silence compiler warnings
- remove traditional "make" capability
- boards: remove old IDF v3 sdkconfig values
- boards: enable BLE on all boards
- README: update based on new IDF v4 cmake build process
- add support to build with ESP-IDF v4.1.1
- add support to build with ESP-IDF v4.2
- remove obsolete IDF v3 code wrapped in MICROPY_ESP_IDF_4
- modsocket: remove unix socket error code translation
- set MICROPY_USE_INTERNAL_ERRNO=0 to use toolchain's errno.h
- boards: enable size optimisation for builds
- add support to build with ESP-IDF v4.3 pre-release
- add basic support for Non-Volatile-Storage in esp32 module
- make machine.soft_reset() work in main.py and reset_cause()
- define MICROPY_QSTRDEFS_PORT to include special qstrs
- Makefile: specify port and baud on erase_flash command
- machine_hw_spi: use default pins when making SPI if none given
- restore USER_C_MODULE support with new CMake build system
- fix multiple definition errors with mp_hal_stdout_tx functions
- enable btree module
- modsocket: correctly handle poll/read of unconnected TCP socket
- add initial support for ESP32S2 SoCs
- add support for USB with CDC ACM
- boards: add GENERIC_S2 board definition
- machine_pin: use rtc_gpio_deinit instead of gpio_reset_pin

javascript port: no changes specific to this component/port

mimxrt port:
- fix USB CDC handling so it works reliably
- boards: add MIMXRT1050_EVK board, based on MIMXRT1060_EVK
- enable CPYTHON_COMPAT, PY_ASYNC_AWAIT, PY_ATTRTUPLE options

minimal port: no changes specific to this component/port

nrf port:
- drivers/usb: add USBD_IRQHandler which calls tud_int_handler

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

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

rp2 port:
- machine_adc: only initialise the ADC periph if not already enabled
- micropy_rules.cmake: fix makemoduledefs vpath to work with abs path
- use local tinyusb instead of the one in pico-sdk
- enable MICROPY_PY_UBINASCII_CRC32 to get ubinascii.crc32()
- enable VfsFat class for FAT filesystem support
- machine_uart: add timeout/timeout_char to read and write
- machine_uart: add support for inverted TX and RX lines
- rp2_pio: allow more than 8 consecutive pins for PIO out/set/sideset
- rp2_pio: fix sm.get(buf) to not wait after getting last item
- modmachine: allow changing CPU clock frequency
- modmachine: re-init UART for REPL on frequency change
- rp2_flash: prevent MICROPY_HW_FLASH_STORAGE_BASE being set negative
- enable uerrno module
- enabled more core Python features
- modmachine: enable machine.Signal class
- use core-provided cmake fragments instead of custom ones
- mpthreadport.h: cast core_state to _mp_state_thread_t
- add support for USER_C_MODULES to CMake build system
- don't advertise remote wakeup for USB serial
- CMakeLists.txt: enable USB enumeration fix
- import uarray instead of array in rp2 module
- rp2_pio: validate state machine frequency in constructor
- moduos: implement uos.urandom()
- rp2_pio: add StateMachine restart,rx_fifo,tx_fifo helper functions
- machine_uart: add buffered transfer of data with rxbuf/txbuf kwargs
- add support for building different board configurations
- rp2_pio: add fifo_join support for PIO

samd port:
- mphalport: fix USB CDC tx handling to work reliably

stm32 port:
- uart: add uart_set_baudrate function
- mpbthciport: only init the uart once, then use uart_set_baudrate
- mboot: add unpack-dfu command to mboot_pack_dfu.py tool
- usb: allow a board to configure USBD_VID and all PIDs
- make pyb, uos, utime, machine and onewire modules configurable
- boards: disable onewire module on boards with small flash
- mpbthciport: fix initial baudrate to use provided value
- mpbthciport: use mp_printf instead of printf for error message
- mpbtstackport: allow chipset and secondary baudrate to be set
- mboot: after sig verify, only write firmware-head if latter valid
- uart: add support for LPUART1 on L0, L4, H7 and WB MCUs
- boards/NUCLEO_WB55: enable LPUART1 on PA2/PA3
- enable MICROPY_PY_UBINASCII_CRC32 to get ubinascii.crc32()
- rfcore: allow BLE settings to be changed by a board
- storage: prevent attempts to read/write invalid block addresses
- make-stmconst.py: allow "[]" chars when parsing source comments
- main: fix passing state.reset_mode to init_flash_fs
- powerctrl: save and restore EWUP state when configuring standby
- spi: fix baudrate calculation for H7 series
- boardctrl: add MICROPY_BOARD_STARTUP hook
- Makefile: fix C++ linker flags when toolchain has spaces in path
- Makefile: allow QSTR_DEFS,QSTR_GLOBAL_DEPENDENCIES to be extended
- include .ARM section in firmware for C++ exception handling
- powerctrl: allow a board to configure AHB and APB clock dividers
- powerctrl: support using PLLI2C on STM32F413 as USB clock source
- boards/pllvalues.py: relax PLLQ constraints on STM32F413 MCUs
- mpconfigport.h: add support for a board to specify root pointers
- boardctrl: give boards control over execution of boot.py,main.py
- boards/NUCLEO_L476RG: add 5 remaining UARTs
- rfcore: fix race condition with C2 accessing free buffer list
- rfcore: intercept addr-resolution HCI cmd to work around BLE bug
- boards: split UARTx_RTS_DE into UARTx_RTS/UARTx_DE in pin defs
- uart: use LL_USART_GetBaudRate to compute baudrate
- sdram: make MICROPY_HW_FMC_BA1,MICROPY_HW_FMC_A11 optional pins

teensy port: no changes specific to this component/port

unix port:
- mpbtstackport_common: implement mp_bluetooth_hci_active
- moduselect: don't allow both posix and non-posix configurations
- improve command line argument processing
- main: make static variable that's potentially clobbered by longjmp

windows port: no changes specific to this component/port

zephyr port:
- update to zephyr v2.5.0
- disable frozen source modules
- remove unused build files
- build MicroPython as a cmake target
- boards: add support for the nucleo_h743zi board
- modusocket: fix parameter in calls to net_context_get_XXX()

v1.14

Toggle v1.14's commit message
New rp2 port, BLE pairing, bonding and l2cap APIs, and docs on internals

This release of MicroPython sees the addition of a new "rp2" port for the
new Raspberry Pi RP2040 microcontroller, a dual-core Cortex-M0+ MCU with
programmable IO.  This port is built on the pico-sdk and MicroPython sits
very close to the bare metal.  The programmable IO is supported via the
@rp2.asm_pio decorator which allows writing inline assembler to be run on
the PIO state machines.

The ubluetooth module has seen significant improvements, fixes and
additions.  BLE events are now synchronous on unix and stm32 so that user
Python callbacks are called directly from the BLE stack (from NimBLE).
This helps with the new pairing and bonding API.  There is also a new l2cap
API for much faster raw data transfer between BLE devices.

Many new sections have been added to the existing "Developing and building
MicroPython" chapter to make it all about the internals of MicroPython,
including details about the MicroPython compiler, and how to port to a new
system.  This documentation work was done as part of Google's Season of
Docs 2020.

The native emitter and inline assembler now fully support ARMv6M, for
Cortex-M0+ CPUs.  There is also support added for C++ user modules on
unix, stm32 and esp32.  And reproducible builds can now be achieved by
setting SOURCE_DATE_EPOCH in the shell build environment.  Qstr
preprocessing is now done in parallel to speed up building, and there is
a new tools/ci.sh script with all functionality to run the continuous
integration tests.

The machine.I2C and machine.SPI classes have been modified so they no
longer construct both software- and hardware-based peripheral instances.
Such construction is now split to explicit soft and non-soft types by the
introduction of machine.SoftI2C and machine.SoftSPI classes.  See below for
more information.

The wait_for function in uasyncio now handles cancellation correctly,
VfsLfs supports mounting in read-only mode, and the urandom module will
randomise its seed on import on stm32, esp8266, esp32 and rp2 ports.

A new raw-paste mode is added to the REPL which includes flow control
between the device and host, as well as a mechanism where the device pulls
in data from the host as it parses the input.  This makes pasting code
faster, more reliable and use less memory.  This feature is supported on
all ports that have a raw REPL and still supports previous REPL behaviour.
See the documentation for more detail on this raw-paste mode.

The stm32 port sees improved rfcore support for WB MCUs, including flash
locking for writes when BLE is active, and a script for automatic update of
FUS/WS firmware.  New hooks are added for boards to configure the top level
behaviour of the system in stm32_main, and there is now support for
Ethernet on H7 processors.  Mboot now allows signed and encrypted firmware
updates.

Breaking changes in this release are:

- The "sys" module is renamed to "usys".  Ports that do not enable module
  weak links must replace "import sys" with "import usys as sys".
  See commit 40ad8f1

- machine.I2C and machine.SPI constructors are changed when using
  software-based I2C and SPI.  Code that constructed I2C/SPI peripherals in
  the following way will need to be changed (or else their use will emit a
  warning which will eventually be an error):

    machine.I2C(-1, ...)            ->  machine.SoftI2C(...)
    machine.I2C(scl=scl, sda=sda)   ->  machine.SoftI2C(scl=scl, sda=sda)

    machine.SPI(-1, ...)            ->  machine.SoftSPI(...)
    machine.SPI(sck=sck, mosi=mosi, miso=miso)
                        ->  machine.SoftSPI(sck=sck, mosi=mosi, miso=miso)

  Code which uses machine.I2C and machine.SPI classes to access hardware
  peripherals does not need to change.
  See commits 39d50d1 and
  98182a9

- In ubluetooth, the BLE.irq() method now has positional only arguments.
  See commit 6a6a5f9

- In ubluetooth, arguments passed to the BLE.irq() callback that were
  previously bytes objects are now memoryview objects.
  See commit 81f2162

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

Main components
===============

all:
- rename "sys" module to "usys"
- rename absolute time-based functions to include "epoch"

py core:
- objfloat: fix handling of negative float to power of nan
- fix handling of NaN in certain pow implementations
- showbc: pass in an mp_print_t struct to all bytecode-print functions
- parse: pass in an mp_print_t to mp_parse_node_print
- dynruntime.h: add mp_import_* and mp_load/store_*
- objstr: make bytes(bytes_obj) return bytes_obj
- objarray.h: add mp_obj_memoryview_init() helper function
- makeversionhdr.py: match only git tags which look like versions
- parse: expose rule-name printing as MICROPY_DEBUG_PARSE_RULE_NAME
- objdict: add mp_const_empty_dict_obj, use it for mp_const_empty_map
- objtype: handle __dict__ attribute when type has no locals
- scope: name and use id_kind_type_t
- objexcept: compare mp_emergency_exception_buf_size signed
- use unsigned comparison of chars
- add explicit initializers for default values
- vmentrytable: ignore GCC -Woverride-init
- introduce and use MP_FALLTHROUGH macro
- makeqstrdefs.py: fix beaviour when scanning non-C preprocessed files
- makeqstrdefs.py: process C++ files as well
- mkrules.mk: add target for compiling C++ files
- makeqstrdefs.py: support preprocessing C++ files for QSTR generation
- workaround clang error when building misc.h with C++ compiler
- py.mk: support C++ code for user C modules
- mpz: do sign extension in mpz_as_bytes for negative values
- binary: fix sign extension setting wide integer on 32-bit archs
- mpprint: prevent case fall-through when assert is disabled
- mpprint: fix length calculation for strings with precision-modifier
- modmath: simplify handling of positional args to reduce code size
- mkrules.mk: remove stray vpath and unused -Itmp, add $(Q) for $(AR)
- objfun: support fun.__globals__ attribute
- asmthumb: add support for ARMv6M in native emitter
- emitnative: ensure encoding to load prelude_offset doesn't change sz
- emitinlinethumb: exclude code using #if when ARMV7M disabled
- emitnative: support binary ops on ARMv6M without use of ite instr
- qstr.h: remove QSTR_FROM_STR_STATIC macro
- gc: fix debug printing of pointer
- persistentcode: introduce MICROPY_PERSISTENT_CODE_SAVE_FILE option
- makeversionhdr: honor SOURCE_DATE_EPOCH if present

extmod:
- modbluetooth: rename logging macro to be just DEBUG_printf
- modbluetooth: refactor stack/hci/driver/port bindings
- nimble: set struct alignment correctly on 64-bit arch
- nimble: make nimble_malloc work with allocated size
- nimble: implement NimBLE mutex
- modbluetooth: implement configuration of address modes
- modbluetooth: allow using mp_hal_get_mac as a static address
- btstack: add btstack support for _IRQ_GATTS_READ_REQUEST
- btstack: detect HCI UART init failure
- nimble: add timeout for HCI sync on startup
- modussl_axtls: reduce size of code that makes exception
- modbluetooth: fix handling of optional data/uuid args
- modbluetooth: make BLE.irq() method positional only
- modbluetooth: print UUIDs correctly
- modbluetooth: implement MTU
- vfs: fix lookup of entry in root dir so it fails correctly
- modbluetooth: change module-owned bytes objects to memoryview
- modure: allow \\ in re.sub replacements
- machine_i2c: rename type to SoftI2C and add custom print method
- machine_i2c: remove "id" arg in SoftI2C constructor
- machine_spi: remove "id" arg in SoftSPI constructor
- utime_mphal: add generic utime.time_ns() function
- add explicit initializers for default values
- disable -Wmissing-field-initializers for lfs2
- introduce and use MP_FALLTHROUGH macro
- vfs_lfs: support mounting LFS filesystems in read-only mode
- modurandom: support urandom.seed() without an argument
- btstack/btstack.mk: add -Wimplicit-fallthrough=0
- nimble/nimble.mk: add -Wno-old-style-declaration
- moductypes: fix storing to (U)INT64 arrays on 32-bit archs
- machine_mem: only allow integers in machine.memX subscript
- modbluetooth: make UUID type accessible outside modbluetooth.c
- modbluetooth: combine gattc-data-available callbacks into one
- nimble: poll startup directly rather than using NimBLE sem
- modbluetooth: re-instate optional no-ringbuf modbluetooth
- nimble: make stm32 and unix NimBLE ports use synchronous events
- machine_i2c: add init protocol method for generic I2C bindings
- modbluetooth: add API for L2CAP channels
- nimble/modbluetooth_nimble: fix build when l2cap unavailable
- uasyncio: delay calling Loop.call_exception_handler by 1 loop
- uasyncio: add Task.done() method
- uasyncio: fix cancellation handling of wait_for
- nimble: fail read if the characteristic is too big
- modbluetooth: add _IRQ_CONNECTION_UPDATE event
- modbluetooth: allow setting char/desc enc/auth options
- modbluetooth: allow user-specified reason in read request IRQ
- modbluetooth: add compile-config flag to enable pairing/bonding
- modbluetooth: add _IRQ_ENCRYPTION_UPDATE event
- modbluetooth: allow configuration of pairing/bonding parameters
- modbluetooth: add gap_pair(conn_handle) func to intiate pairing
- modbluetooth: add support for bonding (key persistence)
- modbluetooth: simplify synchronous invoke_irq_handler signature
- modbluetooth: add support for passkey authentication
- nimble: generate and persist a unique IRK
- modubinascii: update code, docs for hexlify now CPython has sep
- vfs: raise OSError(ENODEV) if mounting bdev without a filesystem
- nimble: reset NimBLE BSS in mp_bluetooth_init
- nimble: don't assert on save-IRK failure
- modbluetooth: add ble.hci_cmd(ogf, ocf, req, resp) function
- vfs: check block 0 and 1 when auto-detecting littlefs
- modframebuf: change int to unsigned int in format methods args
- modonewire: use pin_od_high/pin_od_low instead of pin_write
- nimble: improve the flow control for l2cap recv path

lib:
- libm: reduce size of static two_over_pi array
- utils/mpirq: add mp_irq_init func, and clean up unused init method
- utils/pyexec: add MICROPY_BOARD hooks before/after executing code
- utils/pyexec: add stdin-reader on raw REPL with flow control
- littlefs: update littlefs2 to v2.3.0
- littlefs: guard lfs2_mlist_isopen with LFS2_NO_ASSERT
- stm32lib: update library for WB v1.10.0
- libhydrogen: add new libhydrogen submodule
- timeutils: provide simple impl of extra funcs when Epoch is 1970
- pico-sdk: add new pico-sdk submodule, for the rp2 port
- utils/pyexec: remove obsolete LCD initialization
- pico-sdk: update to latest version v1.0.1

drivers:
- memory/spiflash: add MICROPY_HW_SPIFLASH_ENABLE_CACHE option

mpy-cross:
- enable more warnings

Support components
==================

docs:
- library/ubluetooth.rst: document BLE address modes
- library/ubluetooth.rst: clarify position/kw arguments
- library/ubluetooth.rst: clarify peripheral/central vs server/client
- library/ubluetooth.rst: add docs for MTU API
- develop: add notes on prerequisite tools for building native .mpy
- reference/packages.rst: fix typo, remove duplicate "port"
- update I2C and SPI docs to add reference to SoftI2C and SoftSPI
- library/btree.rst: correct method typo: __detitem__ to __delitem__
- library/machine.rst: correct minor typo: timout to timeout
- library/machine.Signal.rst: correct typo: usecases to use cases
- library/machine.Timer.rst: add mention of constructor arguments
- reference/glossary.rst: fix minor grammar error, An -> A
- fix reference to QSTR_GEN_CFLAGS Makefile flag
- develop/cmodules.rst: add link to source code for user C example
- library/ubluetooth.rst: add docs for L2CAP channels
- reference/repl.rst: add information about new raw-paste mode
- library/ubluetooth.rst: add _IRQ_CONNECTION_UDPATE docs
- library/ubluetooth.rst: update char/desc flags
- library/ubluetooth.rst: update read request IRQ docs
- library/ubluetooth.rst: add pairing/bonding config docs
- library/ubluetooth.rst: add gap_pair() docs
- library/ubluetooth.rst: add bonding docs
- library/ubluetooth.rst: add passkey docs
- develop: add MicroPython Internals chapter
- fix minor typos in RTC docs, and->an
- esp8266/quickref: add warning block about NeoPixel timing
- develop/natmod: fix a small typo, con->can
- update copyright year range to include 2021

examples:
- bluetooth: update to use positional-only args to irq()
- add example code for user C modules, both C and C++
- bluetooth: add bonding/passkey demo
- rp2: add pio_uart_rx.py example

tests:
- multi_bluetooth: update to new config('mac') behaviour
- multi_bluetooth: make ble_gap_connect robust against event timing
- multi_bluetooth: update UUID format in .exp files
- run-multitests.py: show test/truth diff
- multi_bluetooth/ble_mtu.py: add multitest for BLE MTU
- basics: enable == and != special-method tests now that they work
- basics: add test for MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS ops
- run-tests: use -BS flags when running CPython
- thread/stress_schedule.py: assign globals before running test
- micropython/extreme_exc.py: unlink alloc'd lists earlier in chain
- run-multitests.py: fix diff order, show changes relative to truth
- multi_bluetooth: improve reliability of event waiting
- run-multitests.py: add a -p flag to run permutations of instances
- multi_bluetooth: change dict index-and-del to pop, to clear event
- multi_bluetooth: add a test for WB55 concurrent flash access
- multi_bluetooth: add L2CAP channels multi-test
- extmod: add vfs_posix.py test for uos.VfsPosix class
- run-tests: update skipped tests on CI for GitHub Actions
- multi_bluetooth: add multitests for BLE pairing and bonding
- misc/sys_settrace_features.py: ignore CPython zipimport traces
- extmod: add test to try and mount a block device directly
- misc/sys_settrace: make test output independent of invoked path
- misc/sys_settrace_features.py: fix running with non-dflt encoding
- extmod: add test for the precision of utime functions
- move native for test from pybnative to micropython
- extmod/utime_time_ns.py: relax bounds on time_ns measurement
- run-tests: change default Python command used on Windows

tools:
- mpy-tool.py: fix merge of multiple mpy files to POP_TOP correctly
- write msvc-compatible frozen content
- upip.py: support explicit port number in host
- makeqstrdefs.py: run qstr preprocessing in parallel
- ci.sh: add helper script to run CI tasks
- pyboard.py: add fast raw-paste mode
- ci.sh: put echo of CI path in a separate function
- ci.sh: use pip-install to get latest version of esptool.py
- ci.sh: pip install pyhy for stm32 builds
- ci.sh: for code size build, fetch history of master branch only
- ci.sh: for ci_code_size_setup, update apt to install gcc-multilib
- mpy-tool.py: list frozen modules in MICROPY_FROZEN_LIST_ITEM
- verifygitlog.py: add script for verifying commit message format
- makemanifest.py: add check that freeze path is a directory
- remove obsolete upip bootstrap script

CI:
- install setuptools for black code formatting
- update zephyr build to v2.4.0
- stop using Travis for CI
- workflows: add workflows for all CI tasks, builds and tests
- workflows: run unix and qemu-arm workflows when tests change
- workflows: fix code-size CI workflow
- workflows: add CI workflow for rp2 port
- workflows: add workflow to verify commit message format
- workflows/ports_unix.yml: add job for a reproducible build

The ports
=========

all ports:
- add utime.gmtime() function
- add SoftI2C and SoftSPI to machine module where appropriate
- support legacy soft I2C/SPI construction via id=-1 arg
- use correct in/out endpoint size in TUD_CDC_DESCRIPTOR

cc3200 port:
- ftp: add quotes to PWD response and allow FEAT prior to login
- fix debug build

esp8266 port:
- remove release-specific manifest, disable osdebug by default
- mpconfigport.h: seed the urandom module on import
- remove "FAT" from warning message in inisetup.py
- modules/neopixel.py: add timing param to NeoPixel constructor

esp32 port:
- pin MicroPython and NimBLE tasks to core 0
- mpconfigport.h: remove duplicate uhashlib registration
- boards/sdkconfig.base: set default IDF log level to ERROR
- modnetwork: re-enable PPP support for IDF-SDK >=v4
- use path relative to root for netutils/timeutils headers
- mpconfigport.h: enable MICROPY_PY_DELATTR_SETATTR
- mpconfigport.h: seed the urandom module on import
- support building C++ code
- machine_pin: reset pin if init sets mode
- remove "FAT" from warning message in inisetup.py
- modnetwork: synchronize WiFi AUTH_xxx constants with IDF values

javascript port: no changes specific to this component/port

mimxrt port:
- boards: add MIMXRT1064_EVK board

minimal port: no changes specific to this component/port

nrf port:
- main: make mp_builtin_open signature match that in py/builtin.h
- remove unnecessary includes of mpconfigport.h and its header guard
- README: describe Pin numbering scheme for nRF52840
- boards: update memory.ld to include bootloader offsets
- Makefile: add bootloader specific section
- Makefile: add support for flashing with nrfutil
- boards: add linker script for nrf52840 Open Bootloader 1.2.0
- change selected boards to utilize pre-flashed bootloader
- README: add use of "make submodules" in alternative build paragraph

pic16bit port: no changes specific to this component/port

powerpc port: no changes specific to this component/port

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

rp2 port:
- add new port to Raspberry Pi RP2 microcontroller
- machine_pin: change N_GPIOS to NUM_BANK0_GPIOS for pico-sdk compat
- memmap_mp.ld: update for latest SDK
- rp2_pio: add JMP PIN support for PIO
- modmachine: implement additional functions incl unique_id and idle

samd port: no changes specific to this component/port

stm32 port:
- mpconfigport.h: enable MICROPY_PY_REVERSE_SPECIAL_METHODS
- uart: allow static IRQ handler registration
- modbluetooth_hci: use a static mp_irq_obj_t for BT HCI UART IRQ
- mpbthciport: increase char timeout of BT HCI UART
- make-stmconst.py: add support for WB55 header files
- rfcore: update rfcore.c to match how ST examples work
- boards/USBDONGLE_WB55: add USE_MBOOT support
- powerctrlboot: acquire HSEM5 on STM32WB during SystemClock_Config
- rfcore: fix length matching in HCI parser
- rfcore: refactor some helper funcs, and remove some magic numbers
- rfcore: enable RX IRQ on BLE IPCC channel for better performance
- boards/NUCLEO_WB55: add Python helper code for rfcore
- usb: don't nul pyb_hid_report_desc if MICROPY_HW_USB_HID disabled
- rtc.h: include py/obj.h to make header self contained
- servo: fix angle and speed methods to work again with -ve args
- led: support PWM output without TIM3
- rfcore: fix FUS layout and size of ipcc_device_info_table_t
- Makefile: allow boards to extend SRC_C, SRC_O and OBJ variables
- sdio: don't change any DMA2 settings on H7 MCUs
- sdcard: fix H7 build when using SDMMC2
- rfcore: add Python API for basic rfcore operations
- boards/NUCLEO_WB55: add standalone WB55 FUS/WS firmware updater
- rfcore: update to support WS=1.9.0.0.4
- boards/NUCLEO_WB55/rfcore_firmware.py: fix flash unlock
- boards/NUCLEO_WB55/rfcore_firmware.py: fix bad variable name
- boards/NUCLEO_WB55/rfcore_firmware.py: increase GET_STATE timeout
- fix broken build when FAT FS multi-partition is disabled
- usbd_cdc_interface: check and handle CDC TX wrap-overflow
- machine_adc: fix ADC auto-calibration to run when ADC not enabled
- mpconfigport.h: seed the urandom module on import
- rng: use SysTick+RTC+unique-id to seed pRNG for MCUs without RNG
- boards: factor out common data/bss/heap/stack linker sections
- support C++ code and user C modules written in C++
- main: move update_reset_mode to outside the soft-reset loop
- add MICROPY_BOARD calls in various places in stm32_main
- boardctrl: define MICROPY_BOARD_EARLY_INIT alongside others
- Makefile: make the generation of `firmware.bin` explicit
- Makefile: allow boards to extend all SRC variables
- rtc: validate the RTC prescaler on boot and change if incorrect
- rfcore: make RX IRQ schedule the NimBLE handler
- flash: implement WB55 flash locking
- rfcore: don't send HCI ACL cmds while another is pending
- rfcore: depend on NimBLE only when BLE enabled
- modmachine: add device and revision ids to machine.info()
- Makefile: disable text compression in debug builds
- powerctrl: define RCC_SR_SFTRSTF flag for H747
- powerctrl: fix STOP mode voltage scaling on H7 REV V devices
- powerctrl: on H7, re-enable disabled OSCs/PLLs on exit from STOP
- powerctrl: disable RTC write protection before changing flags
- powerctrl: set H7 RTC wakeup flags
- powerctrl: ensure SysTick is disabled on STOP mode entry for H7
- i2c: factor I2C finding code to i2c_find_peripheral function
- add support for a board to reserve certain peripherals
- Makefile: change -O0 to -Og for DEBUG=1 builds
- boards/stm32h743.ld: enable D2 RAM and add eth-buffer section
- eth: add support for H7 processors
- boards/NUCLEO_H743ZI: enable ethernet peripheral
- mboot: enable LFS2_READONLY for mboot builds with littlefs
- usb: allocate 128 bytes to CDC data out EPs on non-multi-OTG MCUs
- pyb_can: add ability to calculate CAN bit timing from baudrate
- system_stm32: enable DBGMCU in low-power modes for debug builds
- sdram: add SDRAM enter/leave self-refresh mode functions
- adc: deselect VBAT after reading to prevent battery drain
- main: do extended readblocks call when auto-detecting littlefs
- boards/PYBD_SF2: disable SPIFLASH_ENABLE_CACHE for mboot builds
- mboot/gzstream: fix lost data decompressing final part of file
- mboot: add support for signed and encrypted firmware updates
- boards/NUCLEO_WB55: enable MBOOT with packing mode
- Makefile: use MBOOT_PACK_KEYS_FILE as depedency of .pack.dfu
- main: check block 0 and 1 when auto-detecting littlefs
- mboot: don't auto-detect littlefs block size
- mboot: add ELEM_TYPE_STATUS element so application can get status
- mboot: introduce MBOOT_ERRNO_xxx constants and use them
- mboot/fwupdate.py: refactor update_mpy with support for STATUS
- main: introduce MICROPY_HW_FLASH_MOUNT_AT_BOOT config option
- rfcore: fix flow control for IPCC RX IRQ
- fix minor typos in RTC docs, and->an
- usbd_cdc_interface: don't wait in usbd_cdc_tx_always if suspended
- mboot: change debug compiler optimisation from -O0 to -Og

teensy port:
- fix build errors and warnings and enable -Werror

unix port:
- Makefile: always enable -f*-sections regardless of DEBUG setting
- implement BLE H4 HCI UART for btstack/nimble
- implement mp_hal_time_ns using gettimeofday
- variants: enable MICROPY_DEBUG_PARSE_RULE_NAME on coverage build
- mpconfigport.h: enable MICROPY_PY_DELATTR_SETATTR
- enable more warnings
- support building C++ code
- Makefile: move coverage.c and coveragecpp.cpp to coverage variant
- handle pending events/scheduler in MICROPY_EVENT_POLL_HOOK
- make mp_hal_delay_ms run MICROPY_EVENT_POLL_HOOK
- modtime: fix time() precision on unix ports with non-double floats

windows port:
- msvc: support freezing modules
- Makefile: support freezing modules
- show test failures in the Appveyor builds
- update build instructions in README
- implement mp_hal_time_ns using gettimeofday
- msvc: use same default python command as core

zephyr port:
- replace zephyr integer types with C99 types
- const-ify struct device instance pointers
- update build instructions to v2.4.0
- replace broken shell_net_iface() with more general shell_exec()
- guard I2C code with appropriate ifdef config
- add basic UART functionality to machine module
- machine_uart: fix arg of machine_uart_ioctl to make it uintptr_t

v1.13

Toggle v1.13's commit message
New uasyncio module, code formatting, BTstack bindings with unix support

This release of MicroPython includes a new implementation of the uasyncio
module which aims to be more compatible with CPython's asyncio module.  The
main change is to use a Task object for each coroutine, allowing more
flexibility to queue tasks in various places, eg the main run loop, tasks
waiting on events, locks or other tasks.  It no longer requires
pre-allocating a fixed queue size for the main run loop.  A pairing heap is
used to queue Tasks, and the core is optionally implemented in C.

Most code in this repository is now auto-formatted using uncrustify for C
code and Black for Python code.  The tools/codeformat.py script is used to
apply this formatting.  Options for uncrustify were chosen to match as
closely as possible the existing C style, but there were nevertheless quite
a few changes to make the code style consistent.

BlueKitchen BTstack bindings have been added for the ubluetooth module, as
an optional alternative to the NimBLE stack.  The unix port can now be
built with BLE support using these bindings, which works with USB Bluetooth
adaptors (this feature is enabled by default on the dev and coverage
variants).

Other Bluetooth additions include: new events for service/characteristic/
descriptor discovery complete; new events for read done and indicate
acknowledgement; and support for active scanning in BLE.gap_scan().  See
also below for breaking changes to the ubluetooth BLE API.

PEP 526 has been implemented which adds new syntax for variable
annotations, such as "x:int = 1".  PEP 572 has also been implemented, which
adds the ":=" operator for assignment expressions, such as "if x := 1:...".

The whole code base now supports compressing error messages (those strings
used as arguments to exception instances) using a "common word" scheme,
which can be used to reduce code size.

Other new features include: support for non-boolean results for equality
and inequality tests; the addition of the micropython.heap_locked()
function to test the state of the heap; binary operations for viper uint
operands in the native emitter; and mtime support on littlefs v2
filesystems (which can be disabled if needed).

There has been an important bug fix when importing ARM machine code from
an .mpy file: the system now correctly tracks the executable memory
allocated to the machine code so this memory is not reclaimed by the
garbage collector.

For testing, a multi-instance test runner has been added (see
tests/run-multitests.py) which allows running a synchronised test across
two or more MicroPython targets.  This is currently used for network and
BLE tests that require communication between multiple devices.

In the unix port different builds are now organised into build variants,
analogous to boards on bare-metal.  And PEP 475 has been implemented which
retries syscalls failing with EINTR.

The stm32 port sees improved support for STM32WB MCUs, with ADC, SPI and
DMA support, along with support in mboot for these MCUs.  Mboot also adds
optional littlefs support.

The esp8266 port now includes three generic board definitions:
GENERIC_512K, GENERIC_1M and GENERIC, with the latter for modules with 2M
or more of flash.  This port also changed the default filesystem to
littlefs, and no longer supports hard pin IRQs.  See breaking changes below
for more details.

The esp32 port now enables Bluetooth support (via NimBLE) on both IDF v3
and v4 builds.  It also changes the default filesystem from FAT to littlefs
v2 (but existing devices with FAT filesystems will continue to work without
change).

There is also a new mimxrt port which targets NXP i.MX RT series CPUs.

Breaking changes in this release are:

- async-for no longer await's on the result of __aiter__.  The __aiter__
  method should return an async-iterable object but is not itself
  awaitable.
  See commit 37e1b5c

- In ubluetooth, the IRQ event constants have all changed value (from a
  bitfield to a sequential integer) and Python code should be updated
  accordingly by replacing the const definitions with the new ones, which
  can be found at
  https://docs.micropython.org/en/latest/library/ubluetooth.html#ubluetooth.BLE.irq
  See also commit e6881f0

- In ubluetooth, the IRQ data for the _IRQ_SCAN_RESULT event has had the
  "connectable" entry changed to "adv_type".  The existing connectable
  value was a boolean and True now becomes 0x00, False becomes 0x02.
  See commit dd0bc26

- For esp8266, the default filesystem has changed from FAT to littlefs v2.
  And the flash layout of the firmware and filesystem has changed to give
  more space to the firmware and frozen bytecode.  When upgrading an
  existing esp8266 device the filesystem will be reformatted so files
  should be backed up first.
  See commit e0905e8

- For esp8266, machine.Pin no longer supports configuring a pin IRQ with
  "hard=True" (because the interrupt handling code is moved to iRAM).
  Existing code using pin IRQs should remove any "hard=True" argument.
  See commit 0bd58a5

- For the unix port, binaries are renamed to micropython-variant (no longer
  micropython_variant).
  See commit 977b532

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

Main components
===============

all:
- reformat C and Python source code with tools/codeformat.py
- convert exceptions to use mp_raise_XXX helpers in remaining places
- remove spaces between nested paren and inside function arg paren
- remove spaces inside and around parenthesis
- fix implicit casts of float/double, and signed comparison
- use MP_ERROR_TEXT for all error messages
- clean up error strings to use lowercase and change cannot to can't
- fix implicit floating point promotion
- fix implicit conversion from double to float
- fix implicit floating point to integer conversions
- enable extra conversion warnings where applicable
- remove commented-out include statements
- format code to add space after C++-style comment start
- factor gchelper code to one place and use it for unix & ARM ports
- fix auto-enable of MICROPY_GCREGS_SETJMP to select GC behaviour
- update Python code to conform to latest black formatting

py core:
- remove commented-out debug printf's from emitbc and objlist
- obj.h: remove comments about additional mp_buffer_info_t entries
- objobject: add object.__setattr__ function
- objobject: add object.__delattr__ function
- nlrx86: silence possible warnings about unused nlr argument
- asmx86: fix stack to be 16-byte aligned for entry and sub-call
- asmx86: remove unused 5th argument facility
- runtime: don't allocate iter buf for user-defined types
- objsingleton: use mp_generic_unary_op for singleton objects
- introduce MP_ROM_NONE macro for ROM to refer to None object
- introduce MP_ROM_FALSE/MP_ROM_TRUE for ROM to refer to bool objects
- objstr: don't use inline GET_STR_DATA_LEN for object-repr D
- obj.h: use 32-bit shift in MP_OBJ_NEW_QSTR calc for obj-repr D
- clean up commented-out code and comments about exception hierarchy
- objslice: add support for indices() method on slice objects
- objslice: inline fetching of slice paramters in str_subscr()
- make mp_obj_get_type() return a const ptr to mp_obj_type_t
- mkenv.mk: move usage of 32-bit flags to py.mk
- unicode: add unichar_isalnum()
- runtime: move MICROPY_PORT_INIT_FUNC near the end of mp_init()
- nativeglue: use mp_const_X instead of &mp_const_X_obj
- obj.h: redefine qstr object encoding to add immediate obj encoding
- obj: add MICROPY_OBJ_IMMEDIATE_OBJS option to reduce code size
- obj: optimise mp_obj_get_type for immediate objs with repr A and C
- mpconfig.h: define BITS_PER_BYTE only if not already defined
- objint: add mp_obj_int_get_uint_checked() helper
- pairheap: add generic implementation of pairing heap data structure
- gc: don't include or init gc_mutex when GIL is enabled
- qstr: don't include or init qstr_mutex when GIL is enabled
- objgenerator: use mp_obj_new_exception_arg1 to make StopIteration
- objexcept: optimise mp_obj_new_exception[_arg1/_args] functions
- obj.h: add and use mp_obj_is_bool() helper
- release GIL during syscalls in reader and writer code
- emitnative: use NULL for pending exception (not None)
- emitnative: stop after finding an unwind target
- mpthread.h: use strong type for mp_thread_set_state() argument
- objtype: make mp_obj_type_t.flags constants public, moved to obj.h
- support non-boolean results for equality and inequality tests
- compile: allow 'return' outside function in minimal builds
- scheduler: add "raise_exc" argument to mp_handle_pending
- scheduler: move mp_keyboard_interrupt from lib/utils to py core
- scheduler: allow a port to specify attrs for mp_keyboard_interrupt
- scheduler: move clearing of kbd traceback to mp_keyboard_interrupt
- expand type equality flags to 3 separate ones, fix bool/namedtuple
- add mp_raise_type helper macro and use it where appropriate
- add mp_raise_msg_varg helper and use it where appropriate
- factor out definition of mp_float_union_t to one location
- objexcept: rename mp_obj_new_exception_msg_varg2 to ..._vlist
- objtuple: remove code that handles tuple-subclass equality test
- objtype: allow mp_instance_cast_to_native_base to take native obj
- dynruntime.h: add implementation of mp_obj_cast_to_native_base
- objarray: turn on MP_TYPE_FLAG_EQ_CHECKS_OTHER_TYPE for memoryview
- removing dangling "else" to improve code format consistency
- bc0.h: shift comment to start of line to improve format consistency
- builtinimport: adjust if-block order in find_file to clean up #if's
- malloc: put { on separate line for funcs that have selective sigs
- un-nest configuration #if/#endif's for selection of complex code
- parse: add parenthesis around calculated bit-width in struct
- builtinevex: support passing in a bytearray/buffer to eval/exec
- objstr: remove duplicate % in error string
- objstringio: expose tell() on StringIO and BytesIO objects
- modmicropython: add heap_locked function to test state of heap
- stream.h: include sys/types.h to get size_t and off_t for POSIX API
- mpconfig.h: enable MICROPY_MODULE_GETATTR by default
- pairheap: properly unlink node on pop and delete
- pairheap: add helper function to initialise a new node
- use preprocessor to detect error reporting level (terse/detailed)
- dynruntime.mk: set MICROPY_ENABLE_DYNRUNTIME instead of per module
- implement "common word" compression scheme for error messages
- objexcept: allow compression of exception message text
- parse: remove unnecessary check in const folding for ** operator
- objexcept: remove optional TimeoutError exception
- scheduler: fix race in checking scheduler pending state
- scheduler: add assert that scheduler is locked when unlocking
- makecompresseddata.py: don't prefix str with mark if not compressed
- scope: add assert to check that low numbered qstrs do fit in uint8_t
- always give noop defines when MICROPY_ROM_TEXT_COMPRESSION disabled
- objarray: fix sign mismatch in comparison
- objint: do not use fpclassify
- makecompresseddata.py: make compression deterministic
- objdict: fix popitem for ordered dicts
- stream: remove mp_stream_errno and use system errno instead
- modio: allow uio.IOBase streams to return errno for read/write error
- scheduler: add option to wrap mp_sched_schedule in arbitrary attr
- parse: support constant folding of power operator for integers
- scheduler: convert mp_sched_full and mp_sched_num_pending to macros
- parse: make mp_parse_node_extract_list return size_t instead of int
- nativeglue.h: rename "setjmp" entry to "setjmp_" to avoid any clash
- py.mk: use additional CFLAGS to compile string0.c
- modmath: work around msvc float bugs in atan2, fmod and modf
- ringbuf: fix compilation with msvc
- modsys: use consistent naming pattern for module-level const objects
- modbuiltins: fix getattr to work with class raising AttributeError
- dynruntime.h: make mp_obj_str_get_str raise if arg not a str/bytes
- objtype: add __dict__ attribute for class objects
- objtype: use mp_obj_dict_copy() for creating obj.__dict__ attribute
- obj.h: clarify comments about mp_map_t is_fixed and is_ordered
- compile: convert scope test to SCOPE_IS_COMP_LIKE macro
- compile: implement PEP 572, assignment expressions with := operator
- grammar.h: consolidate duplicate sub-rules for :test and =test
- compile: implement PEP 526, syntax for variable annotations
- misc.h: add missing semi-colon in mp_float_union_t for big-endian
- obj.h: add public mp_obj_is_dict_or_ordereddict() helper macro
- objtype: support passing in an OrderedDict to type() as the locals
- asm: add funcs/macros to emit machine code for logical-shift-right
- asm: add condition codes for signed comparisons
- emitnative: implement binary operations for viper uint operands
- objcomplex: add mp_obj_get_complex_maybe for use in complex bin-op
- obj.h: make existing MP_TYPE_FLAG_xxx macros sequential
- rework mp_convert_member_lookup to properly handle built-ins
- obj.h: fix mp_seq_replace_slice_no_grow to use memmove not memcpy
- compile: don't await __aiter__ special method in async-for
- persistentcode: maintain root ptr list of imported native .mpy code
- runtime: fix builtin compile() in "single" mode so it prints exprs
- mphal.h: introduce mp_hal_time_ns and implement on various ports

extmod:
- uzlib: explicitly cast ptr-diff-expr to unsigned
- fix modbluetooth and modwebrepl to build in nanbox mode
- modbluetooth: fix func prototype, empty args should be (void)
- vfs_posix: release GIL during system calls
- modbluetooth: implement config getter for BLE rxbuf size
- modbluetooth.h: fix typo in comment about registering services
- modbluetooth_nimble: fix wrong offset used for descriptor flags
- modframebuf: allow blit source to be a subclass of FrameBuffer
- modbluetooth_nimble: move nimble specific code, factor nimble.mk
- modbluetooth: extract out gatts_db functionality from nimble
- btstack: add empty modbluetooth implementation
- btstack: implement advertising
- btstack: implement service registration
- btstack: implement gatts_db for btstack
- btstack: implement scan and gatt client, connect and disconnect
- btstack: implement notifications/indications for GATT clients
- nimble: clarify active state and check for active in all methods
- modbluetooth: unify error handling in remaining places
- modbluetooth: change scan result's "connectable" to "adv_type"
- nimble: when getting BLE MAC try public address if random fails
- vfs: factor out vfs mount-and-chdir helper from stm32
- modlwip: fix polling of UDP socket so it doesn't return HUP
- modlwip: properly handle non-blocking and timeout on UDP recv
- vfs_posix_file: lock GIL when writing and allow stdio flush
- vfs_posix_file: include unistd.h to get STD{IN,OUT,ERR}_FILENO
- uasyncio: add new implementation of uasyncio module
- uasyncio: add optional implementation of core uasyncio in C
- uasyncio: add manifest.py for freezing uasyncio Py files
- uasyncio: don't create a Loop instance in get_event_loop()
- uasyncio: implement Loop.stop() to stop the event loop
- uasyncio: add error message to Lock.release's RuntimeError
- uasyncio: add StreamReader/StreamWriter as aliases of Stream cls
- uasyncio: add global exception handling methods
- modubinascii: make code private and module self-contained
- btstack: pass through SCAN_RSP events
- modbluetooth: provide FLAG_WRITE_NO_RESPONSE for characteristics
- uasyncio: add Loop.new_event_loop method
- uasyncio: change cannot to can't in error message, and test exp
- nimble: update to work with NimBLE 1.3
- modbluetooth: don't hold atomic section during mp_sched_schedule
- btstack: implement more robust init/deinit sequencing
- modbluetooth: fix sign compare and unused variable warnings
- modbtree: retain reference to underlying stream so it's not GC'd
- vfs_lfsx: fix path handling in uos.stat() to consider cur dir
- vfs_lfsx: normalize path name in chdir
- vfs_lfsx: fix rename to respect cur dir for new path
- modbluetooth: add support for changing the GAP device name
- nimble: make error code mapping default to MP_EIO
- vfs_lfsx: fix import_stat so it takes into account current dir
- vfs: retain previous working directory if chdir fails
- modbluetooth: make modbluetooth event not a bitfield
- modbluetooth: add discover complete events for svc/char/desc
- modbluetooth: allow discovery of svc/char by uuid
- modbluetooth: implement read done event
- modbluetooth: ensure status=0 always on success
- modbluetooth: support bigger characteristic values
- ure: use single function for match/search/sub
- uasyncio: add asyncio.wait_for_ms function
- modbluetooth: register default GATT service and fix esp32 init
- moductypes: use mp_obj_is_dict_or_ordereddict to simplify code
- vfs_lfs: fix littlefs bindings to build in nan-box mode
- nimble: fix attr NULL ptr dereference in ble_gatt_attr_read_cb
- btstack: schedule notify/indicate/write ops for bg completion
- modbluetooth: ignore unused self_in in ble_gatts_indicate
- modbluetooth: fix so it builds in peripheral-only mode
- modbluetooth: add event for "indicate acknowledgement"
- modussl: improve exception error messages
- modussl_mbedtls: integrate shorter error strings
- uasyncio: add StreamReader.readexactly(n) method
- vfs_reader: fix mp_reader_new_file to open file in "rb" mode
- uasyncio: truncate negative sleeps to 0
- vfs_lfs: add mtime support to littlefs files
- btstack: implement GAP scan duration_ms parameter
- modbluetooth: fix race between READ_REQUEST and other IRQs
- bluetooth: support active scanning in BLE.gap_scan()
- machine_i2c: fix buffer overrun if 'addrsize' is bigger than 32
- modlwip: fix error return for TCP recv when not connected
- vfs: support larger integer range in VFS stat time fields
- vfs: add option to use 1970 as Epoch

lib:
- utils/pyexec: introduce MICROPY_REPL_INFO, wrap debug prints in it
- mp-readline: add an assert() to catch buffer overflows
- mp-readline: add word-based move/delete EMACS key sequences
- utils: change default value of pyexec_mode_kind to 0 to put in bss
- utils/pyexec: handle pending exceptions after disabling kbd intrs
- add BlueKitchen BTstack submodule
- tinyusb: update to a6b916ba for i.MX support
- btstack: update to latest master btstack commit
- littlefs: update littlefs2 to v2.2.0
- mynewt-nimble: update submodule to NimBLE release 1.3.0
- btstack: update to c8b9823 for USB HCI reset timeout fix
- nrfx: upgrade to nrfx v2.0.0
- utils: lock the scheduler when executing hard callback functions
- utils/pyexec: add missing MP_ERROR_TEXT when compiler disabled
- utils: protect all of mpirq.c with MICROPY_ENABLE_SCHEDULER
- libc: add implementation of strncpy
- mbedtls_errors: add code to patch mbedtls for shortened error strs
- stm32lib: update library for H7 v1.6.0 and WB v1.6.0
- libm_dbl: add round.c source code
- libc: fix string0's implementation of strncpy
- timeutils: add helper functions to deal with nanosecs since 1970

drivers:
- cyw43: fix to build in nanbox mode
- cyw43: include stdio.h in files that use printf
- cyw43: return early from cyw43_wifi_set_up if wifi_on fails
- nrf24l01: change pipe addrs in test to match Arduino addrs
- onewire: fix undefined variable errors
- display/ssd1306.py: change the SET_COM_PIN_CFG setting
- support SPI/QSPI flash chips over 16MB

mpy-cross:
- main: fix stderr_print_strn parameter type
- main: print uncaught nlr jump to stderr

Support components
==================

docs:
- more consistent capitalization and use of articles in headings
- library/machine.I2C.rst: use positional-only arguments syntax
- library/machine.UART.rst: detail timeout behaviour of read methods
- README: add short paragraph about using readthedocs
- library/machine: document machine.soft_reset() function
- library: add / to indicate positional-only args in library docs
- library/uos.rst: improve block devices section, and ioctl ret vals
- esp8266: in TCP tutorial, add HTTP response code and content-type
- unix: add a new new quickref page for the UNIX port
- library: fix framebuf monochrome 1-bit modes, swapping HLSB/HMSB
- develop: detail how to add symbols to mp_fun_table for native mods
- library: add initial docs for uasyncio module
- add docs and test for uasyncio custom exc handler methods
- library: note that uasyncio.wait_for() can raise exception
- library: document that char_data/notify_data are also references
- library: note that machine.Pin.irq's hard arg may not be supported
- library: fix docs for machine.WDT to specify millisecond timeout
- develop: fix module/source name in Makefile of native example
- reference: add note about multiple exceptions when heap is locked
- library: update ubluetooth for new events and discover by uuid
- fix Sphinx 3.x warnings, and enable warnings-as-errors on build
- esp8266: add quickref documentation for UART on esp8266
- library: clarify that the arg to esp.deepsleep is in microseconds
- esp32: add info about PWM duty cycle range to esp32 quickref
- library: add gatts_indicate() doc to ubluetooth.rst
- library: for ubluetooth, add docs for _IRQ_GATTS_INDICATE_DONE
- library: update documentation of esp32's RMT
- library: update pyb.SPI init method to add descr about "ti" arg
- library: update pyb.Timer to add missing args and defaults to init
- library: update pyb.UART to correct pyboard UART availability
- esp32: fix machine.Timer quickref to specify HW timers
- change `\*` to `*` in argument lists

examples:
- accellog.py: shift long comments to their own line
- bluetooth/ble_temperature_central.py: shorten comment
- natmod: add .gitignore to ignore generated example .mpy files
- bluetooth: replace "connectable" parameter with "adv_type"
- bluetooth: fix incorrect value of BR/EDR flag in advertising
- bluetooth: fix event code in ble_temperature_central.py
- bluetooth: in ble_advertising.py, skip appearance if not set
- bluetooth: add simple UART demo with central and peripheral

tests:
- run-tests: add "--mpy-cross-flags" arg to specify mpy-cross flags
- extmod: split out VfsFat finaliser tests to separate test file
- micropython: add test for yield-from while heap is locked
- run-tests: handle 'CRASH' return by float.py feature test
- cpydiff: add CPy diff-test for using dict.keys() as a set
- unix: make unix time test pass on more platforms
- unix: add coverage test for new mp_obj_int_get_uint_checked func
- make run-tests help and README be more descriptive of behaviour
- extmod: add basic machine.Timer test
- unix: add coverage tests for pairheap data structure
- unix: add coverage test for mp_obj_new_exception_args
- unix: add coverage tests for mp_obj_is_type() and variants
- add boolean-as-integer formatting tests for fixed regression
- add tests for generator throw and yield-from with exc handlers
- basics: expand test cases for equality of subclasses
- cmdline/repl_inspect: add new test for -i option
- cmdline: add test for MICROPYINSPECT environment variable
- cpydiff: add os module environ differences
- move CPy diff test to real test now that subclass equality works
- basics: move test for "return" outside function to own file
- unix: add coverage tests for kbd-intr and scheduler
- run-tests: auto-skip extmod/ticks_diff, extmod/time_ms_us tests
- basics: add tests for equality between bool and int/float/complex
- basics: add test for equality between tuple and namedtuple
- basics: add test for tuple compare with class derived from tuple
- basics/array1.py: add equality testing for array
- run-multitests.py: add new test runner for multiple Py instances
- multi_net: add initial set of multi-instance tests for network
- multi_bluetooth: add initial tests for bluetooth BLE
- run-tests: consider all tests as native when emit=native is used
- run-multitests.py: print test summary and do exit(1) on failure
- extmod: add uasyncio tests
- run-tests: skip uasyncio if no async, and skip one test on native
- make default MICROPYPATH include extmod to find uasyncio
- multi_net: add uasyncio test for TCP server and client
- net_inet: add uasyncio internet tests
- basics/dict_pop.py: remove extra comma in call and fix grammar
- micropython/heapalloc_fail_set.py: remove extra trailing comma
- format all Python code with black, except tests in basics subdir
- float: add new lexer test to test parsing of float without prefix
- run-tests: add commands to print and clean *.exp,out files
- extmod: update littlefs test output to match new library version
- run-tests: make diff tool user configurable
- float: fix cmath_fun_special for MICROPY_FLOAT_IMPL_FLOAT
- extmod: add btree test for errors raised by btree DB library
- run-multitests.py: allow filtering out lines from stdout
- multi_bluetooth/ble_gap_advertise: fix bytes/str compare warning
- run-multitests.py: add shortcuts for local Python instances
- cpydiff: add cpydiff test for __all__ used in imported package
- thread/thread_stacksize1.py: increase stack size for CPython
- multi_bluetooth: fix typo printing wrong IRQ type
- run-multitests.py: add TRACE banner and move TEST output to end
- run-tests: skip REPL feature checks when running via pyboard.py
- multi_bluetooth: update to work with new BLE events
- run-multitests.py: allow passing unique env vars to each instance
- basics: add tests for assignment operator :=
- cpydiff: add CPy diff test for assignment expression behaviour
- basics: add tests for variable annotations
- basics: split out memoryview slice-assign tests to separate file
- move .mpy import tests from import/ to micropython/ dir
- micropython: improve .mpy import tests to run on more targets
- extmod: add test for uasyncio.sleep of a negative time
- extmod: make uasyncio_fair test more reliable by adjusting sleeps
- run-tests: use absolute paths where possible
- run-tests: make test output directory configurable
- split out complex reverse-op tests to separate test file
- extmod: add tests for verifying FAT and littlefs mtime values

tools:
- gen-cpydiff.py: adjust subsections to sentence case
- add metrics.py script to build and compute port sizes/metrics
- pydfu.py: clean up syntax, update comments and docstrings
- pyboard.py: add option --no-follow to detach after sending script
- pyboard.py: use slice del instead of list.clear() for Py2 compat
- pyboard.py: change shebang to use python3
- makemanifest.py: support freezing with empty list of mpy files
- codeformat.py: add formatter using uncrustify for C, black for Py
- makemanifest.py: fix build on Windows by adding .exe to mpy-cross
- metrics.py: use check_call instead of run to error out on error
- codeformat.py: eliminate need for sizeof fixup
- pydfu.py: add args for VID/PID & exit with cleaner error handling
- pydfu.py: display any error strings from device/mboot
- codeformat.py: include all msvc C code in auto-format
- pyboard.py: support setting device/baudrate from shell env vars
- pyboard.py: add -d as an alias for --device
- metrics.py: add option to diff to error if delta above threshold
- metrics.py: don't build mpy-cross if not needed by any ports
- metrics.py: use OrderedDict when reading build log
- check_code_size.sh: remove unused script
- codeformat.py: use -q option on uncrustify to make output quiet
- codeformat.py: add verbose option to pass to uncrustify and black
- uncrustify.cfg: remove deprecated sp_word_brace option
- codeformat.py: remove sizeof fixup
- uncrustify: update config for v0.71.0
- codeformat.py: include extmod/{btstack,nimble} in code formatting
- uncrustify: enable more opts to remove space between func and '('
- makemanifest.py: support freezing a subdirectory recursively
- pydfu.py: respect longer timeouts requested by DFU device/mboot
- makemanifest.py: use errno.EEXIST instead of number 17
- makemanifest.py: print nicely formatted errors from mpy-cross
- pyboard.py: replace eval() of received data with alternative
- mpy-tool.py: fix offset of line number info
- makemanifest.py: use os.makedirs to make path for generated files

CI:
- add new job to build and test unix coverage in 32-bit mode
- add stm32 build in nanbox mode
- update travis to specify which unix variant to build
- add OSX build to CI
- add CI job to check code formatting
- build stm32 PYBD_SF6 with BTstack as bluetooth stack
- run multi_net tests as part of coverage job
- for unix tests use Makefile target instead of explicit commands
- print errors out for OSX job
- exclude some uasyncio tests on OSX
- use custom PPA to get pre-built uncrustify
- use grep with --text on qemu-arm output
- build NUCLEO_L073RZ instead of B_L072Z_LRWAN1 for stm32 job
- build full unix coverage build on osx job
- build GENERIC_1M board as part of esp8266 job
- make OSX build work again by not installing pkgconfig
- split esp32 ESP-IDF v3 and v4 builds to separate jobs
- decrease build duration by starting OSX build early
- finish jobs early after test failure
- use tools/metrics.py to compute size diff of minimal ports
- make sure upstream/master exists when computing size-diff check
- build more boards as part of nrf job
- run apt commands once, to slightly speed up the CI
- set build name so it appears in the web interfaces
- for powerpc job, build both UART variants
- change nrf pca10056 board to build with soft-device enabled
- build qemu-arm with MP_ENDIANNESS_BIG=1 to test bigendian build
- in stm32 job, build mboot for NUCLEO_WB55
- build mboot for PYBV10 with LFS2 enabled in stm32 job
- install newer toolchain for nrf job
- add pca10090 build to nrf job
- change nrf pca10056 board to build with s140 SoftDevice
- add zephyr build to CI
- add GitHub action to build docs

The ports
=========

all ports:
- allow overriding CROSS_COMPILE in a custom makefile
- modify mp_hal_pin_write macro so it can be used as a function
- add lib/libm/roundf.c to bare-metal Makefile's
- enable error text compression for various ports, but not all
- disable MICROPY_PY_ASSIGN_EXPR in bare-arm and minimal ports

cc3200 port: no changes specific to this port

esp8266 port:
- modules: fix AttributeError in _boot.py if flash not formatted
- modules/ntptime.py: add comment about configuring NTP host
- put mp_keyboard_interrupt in IRAM
- machine_pin: disable ets_loop_iter during hard IRQ handler
- modmachine: implement machine.soft_reset()
- README.md: add docker build instructions
- modnetwork: add support for wlan.ifconfig('dhcp')
- enable and freeze uasyncio
- change from FAT to littlefs v2 as default filesystem
- makeimg.py: print out info about RAM segments when building fw
- machine_pin: move pin_intr_handler to iRAM, de-support hard IRQ
- mpconfigport.h: add definitions for BEGIN/END_ATOMIC_SECTION
- clean up Pin intr handler by moving all code to machine_pin.c
- boards: move py/pairheap.c code from iRAM to iROM
- esp_mphal: move most functions in esp_mphal.c from iRAM to iROM
- uart: move a few functions from iRAM to iROM
- boards: allow configuring btree/FAT/LFS2 support when building
- esppwm: fix PWM glitch when setting duty on different channel

esp32 port:
- Makefile: assign result of $call to dummy var for older make
- modmachine: add implementation of machine.soft_reset()
- enable NimBLE support on all builds (IDF 3.3 and 4.0)
- modnetwork: add max_clients kw-arg to WLAN.config for AP setting
- Makefile: reorder includes to build with latest toolchain
- uart: use core-provided mp_keyboard_interrupt, placed in IRAM
- modsocket: convert EADDRINUSE error code from lwip return value
- move to IDF 4.0 release version
- deinitialize Bluetooth on soft reset
- README.md: update build instructions for newer toolchain
- modsocket: handle poll of a closed socket
- enable and freeze uasyncio
- README.md: fix typo in venv instructions
- change from FAT to littlefs v2 as default filesystem
- espneopixel: use integer arithmetic to compute timing values
- update to ESP IDF v3.3.2
- modesp32: add idf_heap_info(capabilities) to esp32 module
- consolidate check_esp_err functions and add IDF error string
- improve support for OTA updates
- partitions: update comments in files regarding offset
- modsocket: fix getaddrinfo to raise on error
- machine_sdcard: add "freq" keyword arg to SDCard constructor
- modmachine: fix machine.reset_cause to use IDF's esp_reset_reason
- mpthreadport: fix calculation of thread stack size
- update IDF v4.0 supported hash to v4.0.1
- esp32_rmt: extend RMT to support carrier feature
- esp32_rmt: call rmt_driver_install before rmt_config
- esp32_rmt: properly fix looping behaviour of RMT
- network_lan: add support for IP101 PHY
- mphalport: fix mp_hal_time_ns offset

javascript port: no changes specific to this port

mimxrt port:
- add new, minimal port to NXP i.MX RT series CPUs
- add MIMXRT1010 board
- add MIMXRT1060_EVK board
- add initial impl of machine.LED class, and basic pin support
- tusb_config.h: preliminary fix for TinyUSB HS endpoint overflow
- boards: enable LED class for MIMXRT1060_EVK board
- boards: integrate support for MIMXRT1020_EVK board
- boards: set __heap_size__ to 0 in MIMXRT1011.ld

minimal port:
- make build more flexible and work as 64-bit build

nrf port:
- main: remove unnecessary repl_info(0) call
- boards/common.ld: add ENTRY(Reset_Handler) in linker script
- drivers: use mp_raise_msg where appropriate, and shorten exc msgs
- drivers/bluetooth: fix variable initialisation error with older gcc
- remove custom "random" module and use extmod version instead
- use MICROPY_HW_ENABLE_RNG instead of MICROPY_PY_RANDOM_HW_RNG
- Makefile: don't use -fno-builtin for Cortex-M0 builds
- mphalport: remove need for "syntax unified" in mp_hal_delay_us
- update to work with nrfx v2.0.0, to match TinyUSB
- add openocd as a supported flasher
- bluetooth: use MP_ERROR_TEXT for all error messages
- bluetooth/ble_uart: fix implicit declaration of function
- bluetooth: handle data length update request
- bluetooth/ble_uart: add mp_hal_stdio_poll function
- bluetooth/ble_uart: fix random advertisement name
- bluetooth/ble_uart: swap end character on cooked strings
- Makefile: disable ROM text compression when compiling for debug
- add support for time.ticks_xxx functions using RTC1
- enable nrf tick support on all boards by default
- boards: add initial support for Actinius Icarus
- nrfx_config: disable RTC2 for nRF9160 targets
- boards: enable RTCounter machine module for nrf9160 boards
- add board definition for nRF52840-MDK-USB-Dongle
- split mpconfigport.h into multiple files
- enable more features for all targets
- Makefile: improve user C modules support

pic16bit port: no changes specific to this port

powerpc port:
- fix Makefile rule when linking
- set better default compiler
- uart: choose which UART to use at build time, not runtime

qemu-arm port:
- set default board as mps2-an385 to get more flash for tests
- README: update link to toolchain
- support building in debug mode with DEBUG=1
- Makefile: add CFLAGS_EXTRA to CFLAGS

samd port:
- fix to build with latest tinyusb

stm32 port:
- mbedtls: resize mbedtls output buffer from 16 down to 4 kiB
- fix to build in nanbox mode
- add configuration to build in nanbox mode
- boards/PYBD: change RTC asynch prediv from 1 to 4
- softtimer: change linear linked list to a pairing heap
- powerctrl: for F7, allow PLLM!=HSE when setting PLLSAI to 48MHz
- Makefile: allow a board's .mk file to add things to CFLAGS
- boards/STM32F769DISC: add config to use external SPI as filesys
- powerctrl: disable HSI if not needed to save a bit of power
- powerctrl: enable overdrive on F7 when waking from stop mode
- boards/stm32f746_af.csv: add ADC alt functions to correct pins
- sdio: add support for H7 MCUs
- stm32_it: don't call __HAL_USB_HS_EXTI_CLEAR_FLAG on H7 MCUs
- powerctrl: improve support for changing system freq on H7 MCUs
- powerctrl: reenable PLL3 on H7 MCUs when waking from stop mode
- sdram: expose the result of sdram startup test in stm32_main
- usbd_conf: allow boards to configure USB HS ULPI NXT/DIR pins
- usbd_cdc_interface: remove "interrupt_char != -1" check
- sdram: fix compile issue from unused sdram startup test flag
- mpconfigport.h: add option to have custom help text
- modnetwork: remove redundant call to nimble_poll in lwip poll
- refactor bluetooth stack/hci/driver bindings
- add bindings for BTstack implementation
- boards/PYBD: allow building with BTstack (via make command line)
- refactor Bluetooth HCI RX to be independent of transport layer
- main: fix bug mounting 3rd SD partition
- mboot: allow overriding led_init and led_state in board folder
- mboot: update dfu state/status flags to better match standard
- mboot: protect against invalid address flash writes
- mboot: update LED0 state from systick handler
- mboot: remove unnecessary test for led being 1 in led_state
- softtimer: initialise pairing-heap node before pushing to heap
- enable and freeze uasyncio
- mpconfigport.h: remove unused root pointer for BTstack bindings
- mpconfigport.h: make most extended modules configurable by board
- boards: disable pend_throw, uheapq, utimeq on small-flash boards
- Makefile: add missing ordering dependency on generated headers
- storage: fix start address of second, internal block device
- mboot/README: clarify that mboot can access FAT formatted FS only
- mboot: expose custom DFU USB VID/PID values at makefile level
- Makefile: rename SRC_LIB to LIB_SRC_C to match other ports
- main: peform a clean shutdown of btstack on soft reset
- boards/PYBD_SF2: put BTstack library in external QSPI XIP flash
- README: reorg DFU flashing instructions with addition for PYBD
- add support for F412 MCUs
- boards: add board config for Nucleo-F412ZG development board
- machine_uart: retain attached-to-repl setting when init'ing UART
- machine_uart: allow re-init'ing a static UART object
- modmachine: allow changing AHB and APB bus frequencies on STM32WB
- adc: add support to pyb.ADC for STM32WB MCUs
- machine_adc: make setting of ADC1_COMMON->CCR clearer on STM32WB
- dma: add support for DMA on STM32WB, with SPI settings provided
- boards/xxx_WB55: enable pyb.ADC and hardware SPI on WB55 boards
- Makefile: quote libgcc path so spaces are not an issue
- boards/STM32F769DISC: use macro instead of const for flash size
- factoryreset: provide empty create-FS function when FAT disabled
- usb: add support for 2xVCP on L0, L432 and WB MCUs
- rfcore: leave txpower level as default when initialising rfcore
- boards/NUCLEO_WB55: add more CPU pins and aliases to SW1/2/3
- irq: clean up irq.h so it does not depend on core uPy defines
- powerctrlboot: include irq.h to get definitions of IRQ priorities
- flash: make flash C-API reusable, and funcs return an error code
- i2cslave: add support for WB MCUs
- flash: add flash_is_valid_addr, and extend sectors for 2MB F7
- mboot: use flash routines from main stm32 code rather than custom
- mboot: use CMSIS system source code for SystemInit function
- mboot: add support for using mboot with WB MCUs
- boards: add build-time option for NUCLEO_WB55 to use mboot
- mboot: set VTOR on start up to ensure it has the correct value
- mboot: use additional CFLAGS to compile string0.c
- mpconfigport.h: enable PY_IO_FILEIO when any VFS is enabled
- timer: support TIM1 on WB MCUs
- boards: enable LFS2 on PYBD_SF3 and PYBD_SF6
- mboot: don't search for firmware on FS, just attempt to open it
- mboot: decouple stream, filesystem and top-level loading code
- mboot: add support for littlefs
- mboot: update README to describe WB and littlefs support
- i2cslave: pass I2C instance to callbacks to support multi I2Cs
- usbd_cdc_interface: remove full==size-1 limitation on tx ringbuf
- timer: properly initialise timer deadtime/brk on WB MCUs
- mboot: implement DFU mass erase
- flash: update flash_get_sector_info to return -1 on invalid addr
- mboot: add DFU logic to respond to DFU_GETSTATE request
- mboot: remove the use of timeout in DFU_GETSTATUS
- mboot: disable polling mode by default and use IRQ mode instead
- fdcan: use the right FIFO to calc element address in can_receive
- fdcan: use FDCAN_RXFxS_FxFL instead of hard-coded value
- fdcan: support maximum timeout of HAL_MAX_DELAY in can_receive
- pyb_can: handle timeout arg for FDCAN in pyb_can_send
- usbdev: fix calculation of SCSI LUN size with multiple LUNs
- pin_defs_stm32: fix pin printing to show IN mode correctly
- powerctrl.h: include stdbool.h to get definition of bool

teensy port: no changes specific to this port

unix port:
- modtime: add utime.mktime function, to complement utime.localtime
- modos: add uos.rename and uos.rmdir
- add build variants, analogous to boards on bare-metal
- add placeholder DEV variant with settrace enabled
- rename unix binaries to micropython-variant (not _variant)
- Makefile: reserve CFLAGS_EXTRA/LDFLAGS_EXTRA for external use
- release GIL during all system calls
- unix_mphal: add compile check for incompatible GIL+ASYNC_KBD_INTR
- main: print usage and NLR errors to stderr instead of stdout
- main: add support for MICROPYINSPECT environment variable
- main: add #if guard around -v option usage and document -i/-m opts
- main: add command-line -h option for printing help text
- modos: implement putenv and unsetenv to complement getenv
- main: use OS-dependent path separator when searching path
- Makefile: remove old variant targets that are no longer needed
- variants/standard: fix role of PREFIX when used to install
- Makefile: allow to install all variants of the executable
- mpthreadport: use SIGRTMIN+5 instead of SIGUSR1 for thread-GC
- mpthreadport: fix Mac build by using SIGUSR1 if SIGRTMIN not avail
- mphalport.h: fix build when MICROPY_USE_READLINE=0
- unix_mphal: adjust #if in mp_hal_stdin_rx_chr to improve format
- file: don't raise OSError(EINVAL) on sys.stdin/out/err.flush()
- Makefile: detect and pass thru mpy-cross flags when running tests
- remove custom file implementation to use extmod's VFS POSIX one
- remove custom definition of MP_PLAT_PRINT_STRN
- coverage: init all pairheap test nodes before using them
- enable uasyncio C helper module on coverage build
- mpthreadport: fix crash when thread stack size <= 8k
- implement PEP 475 to retry syscalls failing with EINTR
- mpthreadport: ensure enough thread stack to detect overflow
- fix behaviour of COPT/NDEBUG for unix variants
- implement MICROPY_BEGIN/END_ATOMIC_SECTION protection macros
- Makefile: fix regression using install on non-GNU systems
- modmachine: add machine.idle(), implemented using sched_yield
- add support for modbluetooth and BLE using btstack
- enable modbluetooth on the "dev" and "coverage" variants
- add btstack to the unix submodules list
- main: enter REPL when inspect active, even with stdin redirected
- btstack_usb: allow choosing adaptor via environment variable
- make manifest selection match other ports
- enable uasyncio on dev variant
- variants: enable VFS and all supported filesystems on dev variant
- make the MICROPY_xxx_ATOMIC_SECTION mutex recursive
- fatfs_port: implement get_fattime
- variants: fix fast and freedos variants so they build again
- modos: support larger integer range in uos.stat fields

windows port:
- support word-based move/delete key sequences for REPL
- windows_mphal: release GIL during system calls
- improve default search path
- msvc: fix warnings regarding function declarations
- remove custom definition of MP_PLAT_PRINT_STRN
- windows_mphal: fix missing semicolon
- update genhdr.targets to match makeqstrdefs.py args
- make appveyor.yml self-contained

zephyr port:
- update include paths for Zephyr v2.0
- replace deprecated time conversion macro
- remove reference to syscall_macros_h_target
- implement block device protocol via zephyr disk access api
- enable virtual file system and uos module
- enable fatfs
- implement block device protocol via zephyr flash map api
- enable littlefs
- mount a file system during init
- enable usb mass storage class on mimxrt1050_evk
- execute main.py file if it exists
- update machine.Pin class to use new zephyr gpio api
- use zephyr build system to merge configurations
- fix and rename stacks_analyze function in zephyr module
- fix floating point configuration
- update for refactored zephyr device structures
- update to new zephyr timeout API
- convert DT_FLASH_AREA usages to new dts macros
- increase minimum required cmake version to 3.13.1
- use cmake find_package to locate zephyr
- implement machine.Pin.irq() for setting callbacks on pin change
- make-minimal: disable FAT and LFS2 options to make it build
- include storage/flash_map.h unconditionally
- README: update required Zephyr version and mention new features

v1.9.4

Toggle v1.9.4's commit message
Parser size reduced, new Python stack, stm32 improvements, new esp32 …

…port

This release brings some significant size reductions to the parser, as well
as removal of unused code and additional tests to improve coverage of the
core.  A new optional, internal Python stack is introduced for scoped
allocation and can be used instead of alloca to provide more efficient and
flexible temporary memory; see MICROPY_ENABLE_PYSTACK.  There have been
many improvements and internal code refactors of the stm32 port, and the
port to the Espressif ESP32 SoC has been merged from its development
repository.

Compared to the last release the change in code size is (in bytes, using
gcc 7.3):

   bare-arm: -1832
minimal x86: -2608
   unix x64: -5129
unix nanbox: +1024
      stm32: +2120
     cc3200:  -928
    esp8266:  +336

The decrease is mainly due to the reduced size of the parser, where the
table of rule pointers was compressed to a table of offsets.  The increase
in the stm32 and esp8266 ports is due to additional features, such as more
colour formats in the framebuf module and the addition of ujson.dump().

Code coverage (measured by gcov) has improved since the last version
(v1.9.3 on the left, v1.9.4 on the right):

py:     15202/15447 = 98.4%  ->  15391/15513 = 99.2%
extmod:  2227/ 2363 = 94.2%  ->   2291/ 2430 = 94.3%

Changes and additions seen by the Python user include: improvement of dir()
and tab-completion to list all available attributes of an object; addition
of efficient ucollections.deque type with fixed size; better handling and
polling support of sockets that get into an error state; implementation of
key and cert keyword arguments in ussl.wrap_socket (for axtls);
uos.ilistdir now return 4-tuples with the file size in the fourth position.

Changes at the C level include: removal of "make_qstr_if_not_already"
argument from mp_obj_new_str; rename of mp_exc_recursion_depth to
mp_raise_recursion_depth; removal of mp_const_MemoryError_obj; switching
of stream close operation from method to ioctl; refactoring of how native
emitter code is compiled with a file per architecture.

The stm32 port has seen a lot of improvements and additions, as well as
some significant internal refactoring to better support configuring custom
boards.  STM32F7 support is improved, USB HS is supported for F723 and
F733, the CAN class has improvements to handle bus errors, ctrl-C can
now interrupt running code when the REPL is over UART, and the ADC class
added the read_timed_multi static method.  Board configuration has seen
some internal changes, in particular with setting LD_FILES, TEXT0_ADDR,
and TEXT1_ADDR in mpconfigboard.mk (previously LD_FILE, FLASH_ADDR,
TEXT_ADDR).  The pin_X and pyb_pin_X identifiers have been changed to be
pointers to objects rather than objects, and main is renamed to stm32_main.

A detailed list of changes follows.

py core:
- compile: use alloca instead of qstr_build when compiling import name
- mpconfig: introduce reusable MP_HTOBE32(), etc. macros
- objtype: mp_obj_new_type: name base types related vars more clearly
- objnamedtuple: add _asdict function if OrderedDict is supported
- emitnative: clean up asm macro names so they have dest as first arg
- mkenv.mk: use $(PYTHON) consistently when calling Python tools
- objstr: remove "make_qstr_if_not_already" arg from mp_obj_new_str
- objstr: make mp_obj_new_str_of_type check for existing interned qstr
- objstr: when constructing str from bytes, check for existing qstr
- add config option to disable multiple inheritance
- objnamedtuple: allow to reuse namedtuple basic functionality
- objfloat: allow float() to parse anything with the buffer protocol
- modbuiltins: slightly simplify code in builtin round()
- runtime: simplify handling of containment binary operator
- opmethods: include the correct header for binary op enums
- runtime: add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN
- parsenum: improve parsing of floating point numbers
- objdict: reuse dict-view key iterator for standard dict iterator
- annotate func defs with NORETURN when their corresp decls have it
- qstr: rewrite find_qstr to make manifest that it returns a valid ptr
- gc: in gc_realloc, convert pointer sanity checks to assertions
- objgenerator: remove unreachable code for STOP_ITERATION case
- misc.h: add m_new_obj_var_with_finaliser()
- mp_call_function_*_protected(): pass-thru return value if possible
- modbuiltins: use standard arg-parsing helper func for builtin print
- mpprint: make "%p" format work properly on 64-bit systems
- mpprint: support "%lx" format on 64-bit systems
- malloc: allow to use debug logging if !MICROPY_MALLOC_USES_ALLOCATED_SIZE
- gc: add CLEAR_ON_SWEEP option to debug mis-traced objects
- emitbc, asmbase: only clear emit labels to -1 when in debug mode
- asmbase: revert removal of clearing of label offsets for native emit
- objint_longlong: check for zero division/modulo
- runtime: when tracing unary/binary ops, output op (method) name
- gc: factor out a macro to trace GC mark operations
- gc: in sweep debug output, print pointer as a pointer
- objfun: factor out macro for decoding codestate size
- objfun, vm: add comments on codestate allocation in stackless mode
- objfun: factor out macro for initializing codestate
- mkrules.mk: add "clean-frozen" target to clean frozen script/modules dir
- runtime: move mp_exc_recursion_depth to runtime and rename to raise
- introduce a Python stack for scoped allocation
- convert all uses of alloca() to use new scoped allocation API
- runtime: use the Python stack when building *arg and **kwarg state
- objexcept: use INT_FMT when printing errno value
- extend nan-boxing config to have 47-bit small integers
- objtype: implement better support for overriding native's __init__
- objtype: refactor object's handling of __new__ to not create 2 objs
- builtinimport: call __init__ for modules imported via a weak link
- objgenerator: allow to pend an exception for next execution
- map: don't include ordered-dict mutating code when not needed
- mpz: fix pow3 function so it handles the case when 3rd arg is 1
- modio: use correct config macro to enable resource_stream function
- malloc: remove unneeded code checking m_malloc return value
- nlrthumb: fix use of naked funcs, must only contain basic asm code
- nlr: clean up selection and config of NLR implementation
- nlr: factor out common NLR code to macro and generic funcs in nlr.c
- parse: split out rule name from rule struct into separate array
- parse: break rule data into separate act and arg arrays
- parse: pass rule_id to push_result_rule, instead of passing rule_t*
- parse: pass rule_id to push_result_token, instead of passing rule_t*
- parse: remove rule_t struct because it's no longer needed
- parse: compress rule pointer table to table of offsets
- parse: update debugging code to compile on 64-bit arch
- parse: fix macro evaluation by avoiding empty __VA_ARGS__
- mpz: simplify handling of borrow and quo adjustment in mpn_div
- mpz: in mpz_as_str_inpl, convert always-false checks to assertions
- nlr: fix nlr functions for 64bit ports built with gcc on Windows
- compile: combine compiler-opt of 2 and 3 tuple-to-tuple assignment
- objtype: check and prevent delete/store on a fixed locals map
- modbuiltins: for builtin_chr, use uint8_t instead of char for array
- vm: simplify stack sentinel values for unwind return and jump
- parsenum: fix parsing of floats that are close to subnormal
- objfloat: fix case of raising 0 to -infinity
- unicode: clean up utf8 funcs and provide non-utf8 inline versions
- modbuiltins: simplify casts from char to byte ptr in builtin ord
- objrange: implement (in)equality comparison between range objects
- objexcept: remove long-obsolete mp_const_MemoryError_obj
- nlrthumb: do not mark nlr_push as not returning anything
- pystack: use "pystack exhausted" as error msg for out of pystack mem
- objdict: disallow possible modifications to fixed dicts
- gc: reduce code size by specialising VERIFY_MARK_AND_PUSH macro
- gc: rename gc_drain_stack to gc_mark_subtree and pass it first block
- gc: make GC stack pointer a local variable
- qstr: add QSTR_TOTAL() macro to get number of qstrs
- modbuiltins: simplify and generalise dir() by probing qstrs
- repl: generalise REPL autocomplete to use qstr probing
- objstr: protect against creating bytes(n) with n negative
- objmodule: factor common code for calling __init__ on builtin module
- builtinimport: add compile-time option to disable external imports
- modmicropython: allow to have stack_use() func without mem_info()
- objstr: remove unnecessary check for positive splits variable
- objint: use MP_OBJ_IS_STR_OR_BYTES macro instead of 2 separate ones
- objdeque: implement ucollections.deque type with fixed size
- objdeque: protect against negative maxlen in deque constructor
- objdeque: use m_new0 when allocating items to avoid need to clear
- py.mk: split list of uPy sources into core and extmod files
- py.mk: remove .. path component from list of extmod files
- use "GEN" consistently for describing files generated in the build
- compile: adjust c_assign_atom_expr() to use return instead of goto
- asm*.c: remove unnecessary check for num_locals<0 in asm entry func
- mpz: in mpz_clone, remove unused check for NULL dig
- mpstate.h: add repl_line state for MICROPY_REPL_EVENT_DRIVEN
- vm: fix case of handling raised StopIteration within yield from
- vm: simplify handling of special-case STOP_ITERATION in yield from
- formatfloat: fix rounding of %f format with edge-case FP values
- formatfloat: fix case where floats could render with a ":" character
- formatfloat: fix case where floats could render with negative digits
- objint: remove unreachable code checking for int type in format func
- misc.h: remove unused count_lead_ones() inline function
- obj.h: clean up by removing commented-out inline versions of macros
- obj.h: move declaration of mp_obj_list_init to objlist.h
- makeqstrdefs.py: optimise by using compiled re's so it runs faster
- objexcept: make MP_DEFINE_EXCEPTION public so ports can define excs
- runtime: check that keys in dicts passed as ** args are strings
- runtime: be sure that non-intercepted thrown object is an exception
- vm: don't do unnecessary updates of ip and sp variables
- vm: optimise handling of stackless mode when pystack is enabled
- modsys: don't compile getsizeof function if feature is disabled
- don't include mp_optimise_value or opt_level() if compiler disabled
- objint: simplify LHS arg type checking in int binary op functions
- objstr: in find/rfind, don't crash when end < start
- stream: switch stream close operation from method to ioctl
- objgenerator: check stack before resuming a generator
- refactor how native emitter code is compiled with a file per arch
- nlrthumb: fix Clang support wrt use of "return 0"
- mperrno: define MP_EWOULDBLOCK as EWOULDBLOCK, not EAGAIN
- stream: use uPy errno instead of system's for non-blocking check
- obj.h: fix math.e constant for nan-boxing builds
- modbuiltins, repl: start qstr probing from after empty qstr
- runtime: add mp_load_method_protected helper which catches exceptions
- modbuiltins: make built-in hasattr work properly for user types
- repl: use mp_load_method_protected to prevent leaking of exceptions
- modbuiltins: in built-in dir make use of mp_load_method_protected
- modbuiltins: make built-in dir support the __dir__ special method
- objdeque: fix sign extension bug when computing len of deque object

extmod:
- modussl_axtls: socket_read: Handle EAGAIN
- moduhashlib: enable SHA1 hashing when using "mbedtls" library
- vfs_fat: mount FatFS on creation so VFS methods can be used
- modussl_axtls: implement key and cert kw args to wrap_socket
- modlwip: commit TCP out data to lower layers if buffer gets full
- machine_signal: change VLA to use new scoped allocation API
- modure: convert alloca() to use new scoped allocation API
- modussl_mbedtls: clean up mbedtls state when error during setup
- modframebuf: add 2-bit color format (GS2_HMSB)
- modframebuf: add 8-bit greyscale format (GS8)
- vfs_fat_file: implement SEEK_CUR for non-zero offset
- modujson: implement ujson.dump() function
- vfs_fat: move ilistdir implementation from misc to main file
- vfs_fat: merge remaining vfs_fat_misc.c code into vfs_fat.c
- vfs_fat: make fat_vfs_open_obj wrapper public, not its function
- vfs_fat: remove declaration of mp_builtin_open_obj
- vfs_fat_diskio: use a C-stack-allocated bytearray for block buf
- machine_spi: make SPI protocol structure public
- vfs_fat: add file size as 4th element of uos.ilistdir tuple
- re1.5: fix compilecode.c compile problem on IAR tool chain
- modlwip: check if getaddrinfo() constraints are supported or not
- vfs: delegate import_stat to vfs.stat to allow generic FS import
- uzlib: fix C-language sequencing error with uzlib_get_byte calls
- modlwip: in ioctl handle case when socket is in an error state

lib:
- tinytest: move from tools/tinytest
- upytesthelper: add MicroPython test helper layer on top of tinytest
- tinytest: clean up test reporting in the presence of stdout output
- utils/pyexec.h: include py/obj.h because its decls are needed
- utils/pyexec: update to work with new MICROPY_HW_ENABLE_USB option
- stm32lib: update library to include support for STM32H7 MCUs
- stm32lib: update library for fix to H7 SPI strict aliasing error
- axtls: update, exposes AES functions to implement ECB cipher mode

drivers:
- nrf24l01: make driver and test run on pyboard, ESP8266, ESP32
- display/ssd1306: make SSD1306 class inherit from FrameBuffer
- sdcard: support old SD cards (<=2GB)
- sdcard: avoid allocation on the heap
- sdcard: update doc for ESP8266 to use correct SPI number
- cc3200: update to work with new stm32 SPI API
- sdcard: update SD mounting example code for ESP8266
- bus: add QSPI abstract type with software QSPI implementation
- memory/spiflash: add support for QSPI interface
- bus: pull out software SPI implementation to dedicated driver
- memory/spiflash: change to use low-level SPI object not uPy one

tools:
- mpy-tool.py: implement freezing of Ellipsis const object
- gen-cpydiff.py: update executable paths to point to new ports dir
- tinytest-codegen.py: generate code for upytesthelper
- tinytest-codegen: wrap lines of exclude_tests
- tinytest-codegen: more excludes after enabling expected output match
- tinytest-codegen: take --target= option for test set selection
- pydfu.py: call set_configuration() on fresh USB device object
- tinytest-codegen: add --stdin switch instead of recently added --target
- tinytest-codegen: ignore system locale, write output in UTF-8
- upip: upgrade upip to 1.2.4

tests:
- net_hosted: add test for socket connect() and poll() behaviour
- basics: add test for containment of a subclass of a native type
- basics/builtin_range: add test for corner case of range slicing
- basics/builtin_locals: add test for using locals() in class body
- cpydiff: add difference-test for second arg of builtin next()
- cpydiff: fix markup where "`" (xref) was used instead of "``" (code)
- heapalloc_*: refactor some tests to work in strict stackless mode
- heapalloc, heapalloc_super: skip in strict stackless mode
- basics: add test for overriding a native base-class's init method
- extmod: add test which subclasses framebuf.FrameBuffer
- cpydiff: update subclassing Exception case and give work-around
- fix few test for proper "skipped" detection with qemu-arm's tinytest
- run-tests: add --list-tests switch
- add tests to improve coverage of py/objtype.c
- run-tests: fix handling of --list-tests wrt skipped tests
- run-tests: add composable --include and --exclude options
- run-tests: don't test for --target=unix with "pyb is None"
- run-tests: skip running feature checks for --list-tests/--write-exp
- basics: add more set tests to improve coverage of py/objset.c
- extmod/uhashlib_sha256: add test for hashing 56 bytes of data
- float/builtin_float_hash: add test to improve objfloat.c coverage
- unix: add test for printf with %lx format
- basics/generator_pend_throw: add test for just-started generator
- basics/builtin_pow3: add tests for edge cases of pow3
- add some more tests to improve coverage of py/parse.c
- extmod: add some uctypes tests to improve coverage of that module
- basics/memoryerror: add test for out-of-memory using realloc
- basics: rename remaining tests that are for built-in functions
- unix: add coverage test for calling mp_obj_new_bytearray
- automatically skip tests that require eval, exec or frozenset
- rewrite some tests so they can run without needing eval/exec
- run-tests: capture any output from a crashed uPy execution
- basics/deque*: tests for ucollections.deque
- basics: add tests to improve coverage of py/objdeque.c
- basics: add test for calling a subclass of a native class
- stress: add test to create a dict beyond "maximum" rehash size
- unix: add coverage tests for mpz_set_from_float, mpz_mul_inpl
- extmod/vfs_fat_fileio1: add test for failing alloc with finaliser
- extmod/uzlib_decompress: add uzlib tests to improve coverage
- float: adjust float-parsing tests to pass with only a small error
- unix: add coverage test for VM executing invalid bytecode
- basics/gc1: add test which triggers GC threshold
- extmod/vfs_fat_fileio1: add test for calling file obj finaliser
- unix: add coverage tests for various GC calls
- move heap-realloc-while-locked test from C to Python
- unix: add coverage test for uio.resource_stream from frozen str
- extmod/time_ms_us: add test for calling ticks_cpu()
- extmod/time_ms_us: fix ticks tests, ticks_diff args are reversed
- basics/builtin_enumerate: add test for many pos args to enumerate
- cpydiff: indent workaround code snippet so it formats correctly
- pyb: update CAN test to expect that auto_restart is printed
- pyb/can: update to test pyb.CAN restart, state, info, inplace recv
- basics/iter1.py: add more tests for walking a user-defined iter
- basics: add test for use of return within try-except
- basics/int_big1.py: add test converting str with non-print chars
- basics: modify int-big tests to prevent constant folding
- stress: add test to verify the GC can trace nested objects
- basics/int_big1.py: add test for big int in mp_obj_get_int_maybe
- basics: add test for subclassing an iterable native type
- basics: add tests for edge cases of nan-box's 47-bit small int
- basics/class_super.py: add tests for store/delete of super attr
- basics/string_compare.py: add test with string that hashes to 0
- micropython: add set of tests for extreme cases of raising exc's
- stress/recursive_gen: add test for recursive gen with iter
- move recursive tests to the tests/stress/ subdir
- pyb/adc.py: fix test so that it really does test ADC values
- pyb: add test for pyb.ADCAll class
- io/bytesio_ext2: remove dependency on specific EINVAL value
- run-tests: support esp32 as a target for running the test suite
- cpydiff: remove core_function_unpacking now that it succeeds
- cpydiff: remove types_str_decodeerror now that it succeeds
- cpydiff: remove working cases from types_float_rounding
- cpydiff: remove types_int_tobytesfloat now that it doesn't fail
- float/float_parse: allow test to run on 32-bit archs

minimal port:
- README: update text to better describe what "make run" does
- Makefile: explicitly include lib/utils/printf.c in build
- Makefile: only build with core source files

unix port:
- moduselect: add .dump() method for debugging
- mpconfigport: disable uio.resource_stream()
- add support for using the Python stack
- Makefile: coverage: allow user to pass CFLAGS_EXTRA
- mpconfigport.h: allow to override stackless options from commandline
- mpconfigport_coverage.h: enable MICROPY_PY_IO_RESOURCE_STREAM
- mpconfigport_coverage: enable range (in)equality comparison
- coverage: allow coverage tests to pass with debugging disabled

windows port:
- mpconfigport: provide off_t definition for MSVC port
- mpconfigport: enable some features, including the Python stack
- add Appveyor CI builds for windows mingw port

qemu-arm port:
- rework "test" target using upytesthelper
- test_main: clean up invocation of tinytest_main()
- test_main: include setjmp.h because it's used by gc_collect

stm32 port:
- boards/NUCLEO_F429ZI: incr CPU freq to 168MHz to get USB working
- boards: add support for NUCLEO-F746ZG evaluation board
- boards/stm32f767_af.csv: update AF table based on datasheet
- boards/*_af.csv: make consistent use of JTMS, JTCK, SWDIO, SWCLK
- add support for using the Python stack
- usbdev: pass thru correct val for SCSI PreventAllowMediumRemoval
- use corrected capitalization of HAL_SD_CardStateTypedef
- allow to build a board without any hardware I2C ports defined
- uart: add support for 7-bit modes: 7N1 and 7N2
- uart: support board configs with CTS/RTS on UART6
- i2c: fix bug with I2C4 initialisation
- i2c: support more I2C baudrates for F746, and more F7 MCUs
- spi: if MICROPY_HW_SPIn_MISO undefined, do not claim pin on init
- modmachine: handle case of no MICROPY_PY_MACHINE_I2C
- add support for DHT11/DHT22 sensors
- spi: make SPI DMA wait routine more power efficient by using WFI
- sdcard: make SD wait routine more power efficient by using WFI
- usbdev: reduce dependency on py header files
- usbdev: combine all str descriptor accessor funcs into one func
- can: support MCUs without a CAN2 peripheral
- improve support for STM32F722, F723, F732, F733 MCUs
- modmachine: in freq(), select flash latency value based on freq
- sdcard: only define IRQ handler if using SDMMC1 peripheral
- sdcard: use maximum speed SDMMC clock on F7 MCUs
- usbdev: add support for MSC-only USB device class
- usb: allow board to select which USBD is used as the main one
- usbdev: add support for high-speed USB device mode
- i2c: use macros instead of magic numbers for I2C speed grades
- spi: add support for a board naming SPI peripherals 4, 5 and 6
- rng: simplify RNG implementation by accessing raw peripheral regs
- spi: allow SPI peripheral state to persist across a soft reset
- i2c: allow I2C peripheral state to persist across a soft reset
- spi: provide better separation between SPI driver and uPy objs
- update LCD and network drivers to work with new SPI API
- spi: accept machine.SPI object in spi_from_mp_obj() function
- rtc: fix rtc_info flags when LSE fails and falls back to LSI
- rtc: fix RTC init to use LSI if LSI is already selected on boot
- rtc: add compile-time option to set RTC source as LSE bypass
- main: reorder some init calls to put them before soft-reset loop
- main: remove need for first_soft_reset variable
- add mpconfigboard_common.h with common/default board settings
- boards: remove all config options that are set to defaults
- usbdev: fix USBD setup request handler to use correct recipient
- update HAL macro and constant names to use newer versions
- timer: support MCUs that don't have TIM4 and/or TIM5
- introduce MICROPY_HW_ENABLE_USB and clean up USB config
- boards: update all boards to work with new USB configuration
- factor out flash and SPI block-device code to separate files
- change header include guards from STMHAL to STM32 to match dir
- add board config option to enable/disable the ADC
- use "GEN" for describing files generated in the build
- flash: use FLASH_TYPEPROGRAM_WORD to support newer HALs
- move MCU-specific cfg from mphalport.h to mpconfigboard_common.h
- spibdev: update to work with new spiflash driver
- spibdev: add option to configure SPI block dev to use QSPI flash
- storage: add option for bdev to supply readblock/writeblocks
- spibdev: convert to use multiple block read/write interface
- qspi: add hardware QSPI driver, with memory-map capability
- i2c: on F4 MCUs report the actual I2C SCL frequency
- boards/stm32f767_af.csv: add ADC column to pin capability list
- boards/NUCLEO_F767ZI: update pins list to include 3 extra pins
- boards: add stm32h743_af.csv file describing H7 GPIO alt funcs
- boards: add stm32h743.ld linker script
- boards: add new NUCLEO_H743ZI board configuration files
- Makefile: add settings to support H7 MCUs
- flash: add flash support for H7 MCUs
- system_stm32: add H7 MCU system initialisation
- mphalport: use GPIO BSRRL/BSRRH registers for H7 MCUs
- wdt: add WDT support for H7 MCUs
- uart: add UART support for H7 MCUs
- timer: add Timer support for H7 MCUs
- modmachine: support basic H7 MCU features
- usbd_conf: add USB support for H7 MCUs
- stm32_it: add support for H7 MCUs
- dma: add DMA support for H7 MCUs
- rtc: add RTC support for H7 MCUs
- extint: add EXTI support for H7 MCUs
- mpconfigboard_common: add STM32H7 common configuration
- main: enable D2 SRAM1/2/3 clocks on H7 MCUs
- boards: add startup_stm32h7.s for H7 series specific startup
- boards: add startup_stm32f7.s for F7 series specific startup
- boards: add startup_stm32f4.s for F4 series specific startup
- boards: add startup_stm32l4.s for L4 series specific startup
- Makefile: use separate startup file for each MCU series
- remove startup_stm32.S, now provided in boards/ for each MCU
- usbd_conf.h: add include of stdint.h to fix compilation issues
- system_stm32: fix CONFIG_RCC_CR_2ND value to use bitwise or
- storage: merge all misc block-dev funcs into a single ioctl func
- storage: make spi_bdev interface take a data pointer as first arg
- storage: remove all SPI-flash bdev cfg, to be provided per board
- storage: introduce MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE cfg
- boards/STM32L476DISC: provide SPI-flash bdev config
- storage: provide support for a second block device
- qspi: do an explicit read instead of using memory-mapped mode
- boards/STM32L476DISC: enable CAN peripheral
- can: improve can.recv() so it checks for events, eg ctrl-C
- can: use enums to index keyword arguments, for clarity
- can: add "auto_restart" option to constructor and init() method
- can: add CAN.restart() method so controller can leave bus-off
- can: add CAN.state() method to get the state of the controller
- can: add CAN.info() method to retrieve error and tx/rx buf info
- use STM32xx macros instead of MCU_SERIES_xx to select MCU type
- can: add "list" param to CAN.recv() to receive data inplace
- dma: enable H7 DMA descriptors
- i2c: add H7 I2C timing configurations
- boards/NUCLEO_H743ZI: enable hardware I2C support
- boards/NUCLEO_H743ZI: disable uSD transceiver
- Makefile: re-enable strict aliasing optimisation for ST HAL files
- consolidate include of genhdr/pins.h to single location in pin.h
- qspi: don't take the address of pin configuration identifiers
- *bdev.c: eliminate dependency on sys_tick_has_passed
- boards: allow boards to have finer control over the linker script
- Makefile: rename FLASH_ADDR/TEXT_ADDR to TEXT0_ADDR/TEXT1_ADDR
- Makefile: allow a board to config either 1 or 2 firmware sections
- boards: add common_basic.ld for a board to have a single section
- boards: add common_bl.ld for boards that need a bootloader
- system_stm32: set VTOR pointer from TEXT0_ADDR
- boards/stm32f767.ld: add definition of FLASH_APP
- boards/stm32h743.ld: remove include of common.ld
- boards/NUCLEO_H743ZI: update to build with new linker management
- dma: remove H7 SDMMC DMA descriptors
- sdcard: add H7 SD card support
- boards/NUCLEO_H743ZI: enable SD card support
- change pin_X and pyb_pin_X identifiers to be pointers to objects
- boards/STM32L476DISC: update to not take the address of pin objs
- add custom, optimised Reset_Handler code
- main: rename main to stm32_main and pass through first argument
- main: only update reset_mode if board doesn't use a bootloader
- mphalport: use MCU regs to detect if cycle counter is started
- dac: add support for H7 MCUs
- boards/NUCLEO_H743ZI: enable DAC peripheral
- i2c: update HAL macros to use new __HAL_RCC prefix
- i2c: fully support peripheral I2C4
- main: guard usb_mode lines in default boot.py by relevant #if
- adc: fix verification of ADC channel 16 for F411 MCUs
- adc: add read_timed_multi() static method, with docs and tests
- adc: optimise read_timed_multi() by caching buffer pointers
- dac: add buffering argument to constructor and init() method
- adc: factor code to optimise adc_read_channel and adc_read
- adc: fix config of EOC selection and Ext-Trig for ADC periph
- adc: factor common ADC init code into adcx_init_periph()
- pin: in pin AF object, remove union of periph ptr types
- can: allow CAN pins to be configured per board
- stm32_it: add IRQ handler for I2C4
- allow a board to configure the HSE in bypass mode
- main: allow a board to configure the label of the flash FS
- sdcard: implement BP_IOCTL_SEC_COUNT to get size of SD card
- rng: set RNG clock source for STM32H7
- boards/NUCLEO_H743ZI: enable RNG for this board
- uart: allow ctrl-C to issue keyboard intr when REPL is over UART
- uart: allow ctrl-C to work with UARTs put on REPL via os.dupterm
- introduce MICROPY_PY_STM config to include or not the stm module
- dac: support MCUs that don't have TIM4/5 and use new HAL macro
- rename i2c.c to pyb_i2c.c
- rename legacy pyb.I2C helper functions to start with pyb_i2c_
- i2c: add low-level I2C driver for F7 MCUs
- machine_i2c: provide hardware I2C for machine.I2C on F7 MCUs
- system_stm32: reconfigure SysTick IRQ priority for L4 MCUs
- boards/NUCLEO_H743ZI: use priority 0 for SysTick IRQ
- adc: add support for H7 MCU series
- boards/NUCLEO_H743ZI: enable ADC peripheral
- mphalport: add mp_hal_pin_config_speed() to select GPIO speed
- usbd_conf: use mp_hal_pin_config() instead of HAL_GPIO_Init
- dac: use mp_hal_pin_config() instead of HAL_GPIO_Init()
- boards: update pins.csv to include USB pins where needed
- mphalport: support ADC mode on a pin for L4 MCUs
- adc: use mp_hal_pin_config() instead of HAL_GPIO_Init()
- dac: make deinit disable the output buffer on H7 and L4 MCUs
- dac: implement printing of a DAC object
- mphalport: optimise the way that GPIO clocks are enabled
- flash: remove unused src parameter from flash_erase()
- dma: always deinit/reinit DMA channels on L4 MCUs
- irq: define IRQ priorities directly as encoded hardware values
- main: clean up and optimise initial start-up code of the MCU
- dma: fix duplicate typedef of struct, it's typedef'd in dma.h
- don't use %lu or %lx for formatting, use just %u or %x
- Makefile: use -O2 to optimise compilation of lib/libc/string0.c
- i2c: make sure stop condition is sent after receiving addr nack
- usb: fix broken pyb.have_cdc() so it works again
- usb: use correct type for USB HID object
- README: update to reflect current MCU support

teensy port:
- update GPIO speed consts to align with changes in stm32 port

esp8266 port:
- etshal.h: make function prototypes compatible with ESP SDK 2.1.0+
- README: emphasize the need to change default WiFi password
- README: add section on using upip
- esp8266_common.ld: put .text of more libs into .irom0.text
- modules/webrepl_setup: fix first-time enable of WebREPL
- modnetwork: make sure to intern string passed to .config("param")
- machine_hspi: after an SPI write wait for last byte to transfer
- modules: move dht.py driver to drivers/dht directory
- esppwm: clip negative duty numbers to 0
- README.md: update build instruction to reflect new ports dir
- uart: allow to compile with event-driven REPL
- modnetwork: implement WLAN.status('rssi') for STA interface
- esppwm: always start timer to avoid glitch from full to nonfull
- esp_mphal.h: fix I2C glitching by using input mode for od_high
- modnetwork: allow to get ESSID of AP that STA is connected to
- disable DEBUG_PRINTERS for 512k build

esp32:
- add new port to Espressif ESP32 SoC
- modnetwork: give better error msgs for AP timeout and not-found
- modsocket: implement setsockopt(IP_ADD_MEMBERSHIP)
- mpconfigport.h: add missing uhashlib
- mphalport.h: make mp_hal_pin_<dir> select gpio on the pad
- call initialization function on sha1 and sha256
- implement machine.WDT() class
- README: update general description of port to add avail features
- modutime.c: add localtime and mktime functions
- machine_pwm: always set the channel in the PWM object
- update to latest ESP IDF
- modules: symlink in ntptime.py from esp8266/modules
- modnetwork.c: fix for setting DNS with network.WLAN.ifconfig()
- mpconfigport.h: enable ussl finaliser
- implement wired Ethernet via network.LAN()
- mpconfigport.h: enable websocket module
- modesp: add osdebug() function to disable or change IDF logging
- Makefile: support using IDF_PATH as the env var to the IDF source
- add custom partitions.csv file with uPy specific size
- machine_hw_spi: fix large HW SPI transfers by splitting them up
- README: update toolchain setup
- machine_uart: fix check of UART id so it only allows valid UARTs
- machine_rtc: add RTC class to machine module with sleep impl
- modesp32: add new module "esp32" to support extra wake features
- machine_rtc: move export declaration from .c to common .h file
- modnetwork: implement dhcp_hostname for WLAN.config()
- update to the latest ESP IDF
- main: allocate the uPy heap via malloc instead of on the bss
- modsocket: allow getaddrinfo() to take up to 6 args
- modnetwork: implement status('stations') to list STAs in AP mode
- machine_uart: return None from UART read if no data is available
- machine_uart: remove UART event queue object
- README.md: fix typo readme
- mphalport: use esp_timer_get_time instead of gettimeofday
- mphalport: improve mp_hal_delay_us so it handles pending events
- mphalport: improve mp_hal_stdout_tx_XXX functions
- add support for and enable uos.dupterm()
- modsocket: add support for registering socket event callbacks
- mpconfigport: enable webrepl module and socket events
- modules: add support scripts for WebREPL
- add support for the esp32's ULP
- modnetwork: allow to get ESSID of AP that STA is connected to
- README: add --init to submodule update command
- modsocket: correctly handle reading from a peer-closed socket
- use mp_rom_map_elem_t and MP_ROM_xxx macros for const dicts
- modsocket: check for pending events during blocking socket calls

zephyr port:
- README: "make qemu" was replaced with "make run"
- Makefile: clean: Remove generated prj_*_merged.conf
- prj_base.conf: force zephyr.bin build output
- Makefile: convert to new CMake-based Zephyr build system
- Makefile: make prj_$(BOARD).conf optional, again
- Makefile: syscall_macros.h generation was moved from CMake to make
- CMakeLists.txt: update for latest Zephyr buildsys changes
- CMakeLists.txt: properly separate CFLAGS parts gotten from CMake
- main: move var declarations to the top of file
- add support for binary with builtin testsuite
- prj_base.conf: bump MAIN_STACK_SIZE to let builtin testsuite run
- Makefile: clean: Clean libmicropython.a too
- main: remove unused do_str() function

docs:
- esp8266/general: TLS limitations: mention also "ussl" module limitations
- ure: add flags arg to ure.compile(), mention that ure.DEBUG is optional
- ure: emphasize not supported features more
- _thread: add a placeholder docs for _thread module
- library/network: enhance AbstractNIC.status to take an argument
- add notes on heap allocation caused by bound method refs
- uselect: poll: Explicitly specify that no-timeout value is -1
- uctypes: tweak descriptor reference to hopefully be easier to follow
- uselect: describe POLLHUP/POLLERR semantics in more details
- library/utime: fix incorrect example with ticks_diff args order
- uselect: ipoll: Fix grammar/wording of one-shot flag description
- glossary: describe the callee-owned tuple concept
- uerrno: fix xref-vs-code markup
- glossary: describe "stream" term
- glossary: describe string interning
- library: add xrefs to "stream" dictionary entry for many modules
- glossary: clarify wording for "baremetal"
- reference/packages: add chapter on distribution packages and deployment
- packages: add quick "Creating distribution packages" section
- packages: mpy_bin2res no longer required to create resources
- conf: reference CPython 3.5 docs
- packages: use "install_dir/" in examples
- packages: explicitly recommend usage of setuptools instead of distutils
- library/index: elaborate uPy libraries intro
- library/pyb.rst: add note about availability of USB MSC-only mode
- esp8266: update PWM doc regarding clipping of min/max values
- esp8266: add a note concerning GPIO16 pull capabilities
- library/ujson: document dump() and load() functions
- library/usocket: make xref to uerrno explicitly a module reference
- library/micropython: describe optimisation levels for opt_level()
- library/uos: create sections for distinct parts and document uname
- library/uos: document mount, umount, VfsFat and block devices
- reference/repl.rst: fix some minor errors in the REPL tutorial
- library/pyb.ADC: document new features for ADCAll
- library/pyb.ADC: remove outdated ADCAll code example
- library: add ussl module to library index for unix port

travis:
- pass -j4 to make to speed up compilation
- update for qemu-arm's testing moved to Makefile.test
- build and test strict stackless build
- add Unix coverage test for script via stdin

v1.9.3

Toggle v1.9.3's commit message
Introduction of ports subdirectory where all ports are moved to

The main change in this release is the introduction of a "ports/"
subdirectory at the top-level of the repository, and all of the ports are
moved here.  In the process the "stmhal" port is renamed to "stm32" to
better reflect the MCU that it targets.  In addition, the STM32 CMSIS and
HAL sources are moved to a new submodule called "stm32lib".

The bytecode has changed in this release, compared to the previous release,
and as a consequence the .mpy version number has increased to version 3.
This means that scripts compiled with the previous mpy-cross must be
recompiled to work with this new version.

There have also been various enhancements and optimisations, such as:
check for valid UTF-8 when creating str objects, support for reverse
special binary operations like __radd__, full domain checking in the math
module, support for floor-division and modulo in the viper emitter,
and addition of stack overflow checking when executing a regex.

The stm32 port sees improved support for F7 MCUs, addition of a new board
B_L475E_IOT01A based on the STM32L475, and support for the Wiznet W5500
chipset along with improved socket behaviour.

A detailed list of changes follows.

py core:
- objstr: startswith, endswith: check arg to be a string
- nlrx86,x64: replace #define of defined() with portable macro usage
- objtype: handle NotImplemented return from binary special methods
- objtype: mp_obj_class_lookup: improve debug logging
- map: remove unused new/free functions
- make m_malloc_fail() have void return type, since it doesn't return
- modstruct: in struct.pack, stop converting if there are no args left
- modstruct: check and prevent buffer-read overflow in struct unpacking
- modstruct: check and prevent buffer-write overflow in struct packing
- nlrthumb: get working again on standard Thumb arch (ie not Thumb2)
- objfloat: fix binary ops with incompatible objects
- obj: fix comparison of float/complex NaN with itself
- objtype: implement fallback for instance inplace special methods
- objtuple: properly implement comparison with incompatible types
- objstr: add check for valid UTF-8 when making a str from bytes
- objlist: properly implement comparison with incompatible types
- runtime0.h: move relational ops to the beginning of mp_binary_op_t
- runtime0.h: move MP_BINARY_OP_DIVMOD to the end of mp_binary_op_t
- objtype: make sure mp_binary_op_method_name has full size again
- runtime0.h: put inplace arith ops in front of normal operations
- builtinhelp: simplify code slightly by extracting object type
- runtime: implement dispatch for "reverse op" special methods
- nlrx86: fix building for Android/x86
- builtinhelp: change signature of help text var from pointer to array
- runtime.h: change empty mp_warning macro so var-args are non empty
- modbuiltins: implement abs() by dispatching to MP_UNARY_OP_ABS
- {objfloat,objcomplex}: optimise MP_UNARY_OP_ABS by reusing variables
- mpconfig.h: add note that using computed gotos in VM is not C99
- objstr: strip: don't strip "\0" by default
- objexcept: prevent infinite recursion when allocating exceptions
- stream: remove unnecessary checks for NULL return from vstr_add_len
- vstr: raise a RuntimeError if fixed vstr buffer overflows
- vm: use lowercase letter at start of exception message
- persistentcode: define mp_raw_code_save_file() for any unix target
- add config option to print warnings/errors to stderr
- objfloat: support raising a negative number to a fractional power
- objset: simplify set and frozenset by separating their locals dicts
- objset: check that RHS of a binary op is a set/frozenset
- objset: include the failed key in a KeyError raised from set.remove
- objtype: change type of enum-to-qstr table to uint16_t to save space
- objstr: make empty bytes object have a null-terminating byte
- mpprint: only check for null string printing when NDEBUG not defined
- objtype: clean up unary- and binary-op enum-to-qstr mapping tables
- persistentcode: bump .mpy version number to version 3
- bc: update opcode_format_table to match the bytecode
- modmath: add full checks for math domain errors
- modmath: convert log2 macro into a function
- formatfloat: don't print the negative sign of a NaN value
- formatfloat: use standard isinf, isnan funcs instead of custom ones
- modbuiltins: use existing utf8_get_char helper in builtin ord func
- emitnative: implement floor-division and modulo for viper emitter
- objtype: use CPython compatible method name for sizeof
- objtype: fit qstrs for special methods in byte type
- objtype: define all special methods if requested
- objtype: introduce MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS

extmod:
- modubinascii: only include uzlib/tinf.h when it's really needed
- modussl_mbedtls: allow to compile with MBEDTLS_DEBUG_C disabled
- machine_pinbase: put PinBase singleton in ROM
- re1.5: upgrade to v0.8.2, adds hook for stack overflow checking
- modure: add stack overflow checking when executing a regex
- uos_dupterm: update uos.dupterm() and helper funcs to have index
- uos_dupterm: swallow any errors from dupterm closing the stream
- vfs: replace VLA in proxy func with small, static sized array
- modussl: add finaliser support for ussl objects
- modussl_mbedtls: allow to compile with unix coverage build

lib:
- add new submodule, stm32lib containing STM32 CMSIS and HAL source
- embed/abort_: use mp_raise_msg helper function
- libm: fix tanhf so that it correctly handles +/- infinity args
- libm: remove implementation of log2f, use MP_NEED_LOG2 instead
- axtls: update, support for SSL_EAGAIN return code
- berkeley-db-1.xx: update, allow to override MINCACHE, DEFPSIZE

drivers:
- memory/spiflash: change from hard-coded soft SPI to generic SPI
- display/ssd1306.py: improve performance of graphics methods
- nrf24l01: make nRF24L01 test script more portable
- display/ssd1306: implement SSD1306_I2C poweron method
- display/ssd1306: make poweron() work the same with SSD1306_SPI
- wiznet5k: improve the performance of socket ops with threading
- wiznet5k: get low-level W5500 driver working

tools:
- upip: upgrade to 1.2.2
- pyboard: use repr() when quoting data in error messages
- pyboard: update docstring for additional device support

tests:
- object_new: better messages, check user __new__() method
- class_new: add checks for __init__ being called and other improvements
- class_new: add another testcase for __new__/__init__ interaction
- class_inplace_op: test for inplace op fallback to normal one
- run-bench-tests: update locations of executables, now in ports/
- class_reverse_op: test for reverse arith ops special methods
- run-tests: skip class_inplace_op for minimal profile
- run-tests: fix copy-paste mistake in var name
- cpydiff: add cases for locals() discrepancies
- extmod: add test for ure regexes leading to infinite recursion
- extmod: add test for '-' in character class in regex
- run-tests: close device under test using "finally"
- net_inet: update tls test to work with CPython and incl new site

unix port:
- rename modsocket.c to modusocket.c
- modusocket: remove #if MICROPY_SOCKET_EXTRA code blocks
- enable MICROPY_PY_REVERSE_SPECIAL_METHODS

stm32 port:
- modmachine: make machine.bootloader() work when MPU is enabled
- modmachine: improve support for sleep/deepsleep on F7 MCUs
- compute PLL freq table during build instead of at run time
- modmachine: for F7 MCU, save power by reducing internal volt reg
- boards/pllvalues.py: make script work with both Python 2 and 3
- Makefile: use lib/stm32lib instead of local cmsis and hal files
- remove cmsis and hal files, they are now a submodule
- Makefile: automatically fetch stm32lib submodule if needed
- update to new STM Cube HAL library
- fix clock initialisation of L4 MCUs
- rename stmhal port directory to stm32
- remove unused usbd_msc.c file
- boards: change remaining stm32f4xx_hal_conf.h to unix line ending
- boards: change linker scripts to use "K" instead of hex byte size
- boards: fix I2C1 pin mapping on NUCLEO_F401RE/F411RE boards
- i2c: when scanning for I2C devices only do 1 probe per address
- modnwwiznet5k: release the GIL on blocking network operations
- boards: add new board B_L475E_IOT01A based on STM32L475
- make-stmconst.py: make sure mpz const data lives in ROM
- timer: make pyb.Timer() instances persistent
- mpconfigport.h: add configuration for max periphs on L4 series
- usbdev: make the USBD callback struct const so it can go in ROM
- usbdev: change static function variable to non-static
- usbdev: put all CDC state in a struct
- usbdev: put all HID state in a struct
- usbdev: simplify CDC tx/rx buffer passing
- usbdev: simplify HID tx/rx buffer passing
- usbdev/core: add state parameter to all callback functions
- usbdev: put all state for the USB device driver in a struct
- usbdev: simplify pointers to MSC state and block dev operations
- usbdev: merge all global USB device state into a single struct
- usbdev: make device descriptor callbacks take a state pointer
- usbdev: move all the USB device descriptor state into its struct
- timer: enable ARPE so that timer freq can be changed smoothly
- modnwwiznet5k: get the IP address of an established socket
- boards: fix typos in stm32f767_af.csv table
- usbd_cdc_interface: don't reset CDC output buf on initialisation
- modnwwiznet5k: implement WIZNET5K.isconnected() method
- modusocket: make getaddrinfo() work when passed an IP address
- modusocket: return OSError(-2) if getaddrinfo fails
- mpconfigport.h: add MICROPY_THREAD_YIELD() macro
- modnwwiznet5k: add support for W5500 Ethernet chip
- modnwwiznet5k: increase SPI bus speed to 42MHz
- modnwwiznet5k: implement stream ioctl for the Wiznet driver
- mphalport: improve efficiency of mp_hal_stdout_tx_strn_cooked
- make uos.dupterm() conform to specs by using extmod version

cc3200 port:
- enable micropython.kbd_intr() method
- use standard implementation of keyboard interrupt

esp8266 port:
- rename axtls_helpers.c to posix_helpers.c
- posix_helpers: set ENOMEM on memory alloc failure
- set DEFPSIZE=1024, MINCACHE=3 for "btree" module
- esp_mphal: send data in chunks to mp_uos_dupterm_tx_strn
- modnetwork: add "bssid" keyword arg to WLAN.connect() method
- modules/webrepl_setup: add info about allowed password length

zephyr port:
- Makefile: revamp "test" target after ports were moved to ports/
- use CONFIG_NET_APP_SETTINGS to setup initial network addresses
- switch to interrupt-driven pull-style console

pic16bit port:
- add definition of SEEK_SET to unistd.h

docs:
- pyboard/tutorial: add "timeout=0" to UART in pass-through example
- more xrefs to "MicroPython port" in glossary
- library/network: fix ref to "socket" module (should be "usocket")
- machine.Signal: improve style/grammar and add usage example
- library: add description of "index" parameter to uos.dupterm()
- library/micropython: fix typo in RST formatting
- library/framebuf.rst: generalise constructor to all colour formats
- btree: describe page caching policy of the underlying implementation
- esp8266/tutorial: update neopixel with example of using 4 bbp
- library/network: clarify usage of "bssid" arg in connect() method
- pyboard/quickref: add info for Switch, RTC, CAN, Accel classes
- pyboard/tutorial: update now that yellow LED also supports PWM
- esp8266/quickref: add quickref info for RTC class
- library: add missing cross-ref links for classes in pyb module
- library/network: update docs to state that W5500 is supported
- uselect: document one-shot polling mode
- usocket: elaborate descriptions
- usocket: document inet_ntop(), inet_pton()
- library/network: add dhcp_hostname parameter
- reference/isr_rules: minor typo correction
- ussl: fix module name refs and use "MicroPython port" term
- esp8266/general: add section on TLS limitations
- usocket: document that settimeout() isn't supported by all ports
- ure: add "|" (alternative) to the list of supported operators
- reference/isr_rules.rst: add tutorial on use of micropython.schedule()

travis:
- use --upgrade when pip is installing cpp-coveralls
- update build command now that stm32 Wiznet config has changed

examples:
- hwconfig_console: add .on()/.off() methods

all:
- convert mp_uint_t to mp_unary_op_t/mp_binary_op_t where appropriate
- convert remaining "mp_uint_t n_args" to "size_t n_args"
- make new ports/ sub-directory and move all ports there
- update Makefiles and others to build with new ports/ dir layout
- remove inclusion of internal py header files
- use NULL instead of "" when calling mp_raise exception helpers

README:
- update "Dependencies" section
- add explicit section on contributing
- add gcc and arm-none-eabi-newlib to list of required components

.gitattributes:
- remove obsolete entries for stmhal/hal, stmhal/cmsis
- add entries for files that will move to ports/ dir