Skip to content

Tags: PGNetHun/lv_micropython

Tags

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

v1.9.2

Toggle v1.9.2's commit message
Double precision math library and support on pyboard, and improved ussl

This release brings general improvements and bug fixes to the core and
various ports, as well as documentation additions, clean-ups and better
consistency.  And effort has been made to clean up the source code to
make it more consistent across the core and all ports.

There is a new tool "mpy_bin2res.py" to convert arbitrary (binary) files
to Python resources for inclusion in source code (frozen or otherwise).

The ussl module has seen improvements, including implementation of
server_hostname (for axtls) and server_side mode (for mbedtls).

There is now a double-precision float math library and stmhal has support
to build firmware with software or hardware double-precision.

A detailed list of changes follows.

py core:
- formatfloat: fix number of digits and exponent sign when rounding
- modthread: raise RuntimeError in release() if lock is not acquired
- compile: raise SyntaxError if positional args are given after */**
- objint: support "big" byte-order in int.to_bytes()
- objint: in to_bytes(), allow length arg to be any int and check sign
- compile: fix bug with break/continue in else of optimised for-range
- compile: optimise emitter label indices to save a word of heap
- builtinimport: remove unreachable code for relative imports
- objnamedtuple: simplify and remove use of alloca building namedtuple
- mpprint: remove unreachable check for neg return of mp_format_float
- binary: add missing "break" statements
- runtime: mark m_malloc_fail() as NORETURN
- objstr: remove unnecessary "sign" variable in formatting code
- vm: make "if" control flow more obvious in YIELD_FROM opcode
- modmath: check for zero division in log with 2 args
- makeversionhdr.py: update to parse new release line in docs/conf.py
- objdict: factorise dict accessor helper to reduce code size
- change mp_uint_t to size_t in builtins code
- repl: change mp_uint_t to size_t in repl helpers
- compile: combine arith and bit-shift ops into 1 compile routine
- compile: use switch-case to match token and operator
- objgenerator: allow to hash generators and generator instances
- gc: refactor assertions in gc_free function
- vm: make n_state variable local to just set-up part of VM
- asmx64: support moving a 64-bit immediate to one of top 8 registers
- modmicropython: cast stack_limit value so it prints correctly
- builtinevex: add typechecking of globals/locals args to eval/exec
- py.mk: make berkeley-db C-defs apply only to relevant source files
- mperrno: allow mperrno.h to be correctly included before other hdrs
- mpz: make mpz_is_zero() an inline function
- implement raising a big-int to a negative power
- mkrules.mk: show frozen modules sizes together with executable size
- objtuple: allow to use inplace-multiplication operator on tuples
- objstr: raise an exception for wrong type on RHS of str binary op
- modsys: initial implementation of sys.getsizeof()
- binary.c: fix bug when packing big-endian 'Q' values
- add verbose debug compile-time flag MICROPY_DEBUG_VERBOSE
- binary: change internal bytearray typecode from 0 to 1
- objstringio: prevent offset wraparound for io.BytesIO objects
- objstringio: fix regression with handling SEEK_SET
- stream: seek: Consistently handle negative offset for SEEK_SET
- mkrules.mk: use "find -path" when searching for frozen obj files
- compile: remove unused pn_colon code when compiling func params
- objcomplex: remove unnecessary assignment of variable
- formatfloat: don't post-increment variable that won't be used again
- use "static inline" for funcs that should be inline
- asmthumb: use existing macro to properly clear the D-cache

extmod:
- modussl_axtls: update for axTLS 2.1.3
- modussl_axtls: implement server_hostname arg to wrap_socket()
- move modonewire.c from esp8266 to extmod directory
- modure: if input string is bytes, return bytes results too
- modubinascii: add check for empty buffer passed to hexlify
- modussl_axtls: allow to close ssl stream multiple times
- modussl_mbedtls: support server_side mode
- modussl_mbedtls: when reading and peer wants to close, return 0
- modframebuf: fix invalid stride for odd widths in GS4_HMSB fmt
- modussl_mbedtls: make socket.close() free all TLS resources
- modframebuf: consistently use "col" as name for colour variables
- modussl_mbedtls: implement non-blocking SSL sockets
- machine_signal: fix parsing of invert arg when Pin is first arg
- modframebuf: use correct initialization for .locals_dict
- modlwip: implement setsockopt(IP_ADD_MEMBERSHIP)
- modussl_mbedtls.c: add ussl.getpeercert() method
- modubinascii: rewrite mod_binascii_a2b_base64
- modubinascii: don't post-increment variable that won't be used
- modonewire: rename public module to mp_module_onewire
- for uos.stat interpret st_size member as an unsigned int
- use "static inline" for funcs that should be inline

lib:
- axtls: upgrade to axTLS 2.1.3 + MicroPython patchset
- libm/math: remove implementations of float conversion functions
- add libm_dbl, a double-precision math library, from musl-1.1.16

drivers:
- onewire: move onewire.py, ds18x20.py from esp8266 to drivers
- onewire: enable pull-up when init'ing the 1-wire pin

tools:
- gen-cpydiff: use case description as 3rd-level heading
- pyboard: add license header
- mpy_bin2res: tools to convert binary resources to Python module
- mpy-tool.py: don't generate const_table if it's empty
- mpy-tool.py: fix missing argument in dump() function

tests:
- net_inet/test_tls_sites.py: integration test for SSL connections
- net_inet: add tests for accept and connect in nonblocking mode
- basics: add tests for for-else statement
- net_inet: move tests which don't require full Internet to net_hosted
- connect_nonblock: refactor towards real net_hosted test
- auto detect floating point capabilites of the target
- import: add a test for the builtin __import__ function
- import: update comment now that uPy raises correct exception
- basics/namedtuple1: add test for creating with pos and kw args
- unix/extra_coverage: add test for mp_vprintf with bad fmt spec
- basics: add tests for arithmetic operators precedence
- cpydiff/modules_deque: elaborate workaround
- cpydiff/core_class_mro: move under Classes, add workaround
- cpydiff/core_arguments: move under Functions subsection
- cpydiff/core_class_supermultiple: same cause as core_class_mro
- cpydiff: improve wording, add more workarounds
- cpydiff: add case for str.ljust/rjust
- rename exec1.py to builtin_exec.py
- basics/builtin_exec: test various globals/locals args to exec()

minimal port:
- Makefile: enable gc-sections to remove unused code
- remove unused stmhal include from Makefile
- use size_t for mp_builtin_open argument

unix port:
- modtime: replace strftime() with localtime()
- mpconfigport.mk: update descriptions of readline and TLS options
- Makefile: disable assertions in the standard unix executable
- modjni: convert to mp_rom_map_elem_t
- for uos.stat interpret st_size member as an unsigned int

stmhal port:
- mpconfigport.h: remove config of PY_THREAD_GIL to use default
- make error messages more consistent across peripherals
- add initial implementation of Pin.irq() method
- add .value() method to Switch object, to mirror Pin and Signal
- move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use
- add "quiet timing" enter/exit functions
- make available the _onewire module, for low-level bus control
- modules: provide sym-link to onewire.py driver
- boards/stm32f405.ld: increase FLASH_TEXT to end of 1MiB flash
- sdcard: allow a board to customise the SDIO pins
- add possibility to build with double-precision floating point
- boards: enable double-prec FP on F76x boards
- Makefile: use hardware double-prec FP for MCUs that support it
- Makefile: rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C name
- Makefile: add CFLAGS_EXTRA to CFLAGS so cmdline can add options
- mpconfigport.h: allow MICROPY_PY_THREAD to be overridden
- boards: add configuration files for NUCLEO_F429ZI
- boards/NUCLEO_F429ZI: change USB config from HS to FS peripheral
- reduce size of ESPRUINO_PICO build so it fits in flash
- servo: make pyb.Servo(n) map to Pin('Xn') on all MCUs
- servo: don't compile servo code when it's not enabled
- use "static inline" for funcs that should be inline

cc3200 port:
- modusocket: simplify socket.makefile() function
- make non-zero socket timeout work with connect/accept/send
- modusocket: fix connect() when in non-blocking or timeout mode
- use the name MicroPython consistently in code

esp8266 port:
- Makefile: bump axTLS TLS record buffer size to 5K
- Makefile: allow FROZEN_DIR,FROZEN_MPY_DIR to be overridden
- Makefile: add LIB_SRC_C variable to qstr auto-extraction list
- make onewire module and support code usable by other ports
- modonewire: move low-level 1-wire bus code to modonewire.c
- modonewire: make timings static and remove onewire.timings func
- reinstate 1-wire scripts by sym-linking to drivers/onewire/
- move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c
- enable MICROPY_ENABLE_FINALISER
- README: make "Documentation" a top-level section
- machine_rtc: use correct arithmetic for aligning RTC mem len
- mpconfigport_512k: use terse error messages to get 512k to fit
- mpconfigport.h: make socket a weak link
- modesp: remove unused constants: STA_MODE, etc
- general: add known issue of WiFi RX buffers overflow
- use size_t for mp_builtin_open argument
- fix UART stop bit constants

zephyr port:
- Makefile: rework dependencies and "clean" target
- Makefile: revert prj.conf construction rule to the previous state
- remove long-obsolete machine_ptr_t typedef's
- Makefile: explicitly define default target as "all"
- modusocket: allow to use socketized net_context in upstream
- modusocket: socket, close: switch to native Zephyr socket calls
- modusocket: bind, connect, listen, accept: Swtich to native sockets
- modusocket: send: switch to native sockets
- modusocket: recv: switch to native sockets
- modusocket: fully switch to native Zephyr sockets
- modzephyr: add current_tid() and stacks_analyze() functions
- prj_base.conf: enable CONFIG_INIT_STACKS
- modusocket: update struct sockaddr family field name
- prj_96b_carbon.conf: re-enable networking on Carbon
- modzephyr: add shell_net_iface() function

docs:
- btree: add hints about opening db file and need to flush db
- select: rename to uselect, to match the actual module name
- license: update copyright year
- esp8266/tutorial/intro: discourage use of 512kb firmwares
- esp8266/tutorial/intro: Sphinx requires blank lines around literal blocks
- conf.py: include 3 levels of ToC in latexpdf output
- gc: mark mem_alloc()/mem_free() as uPy-specific
- gc: document gc.threshold() function
- builtins: list builtin exceptions
- conf.py: set default_role = 'any'
- lcd160cr: group related constants together and use full sentences
- ref/speed_python: update and make more hardware-neutral
- library/gc: fix grammar and improve readability of gc.threshold()
- move all ports docs to the single ToC
- topindex.html: remove link to wipy.io, it's no longer available
- conf.py: add .venv dir to exclude_patterns
- move topindex.html to templates/ subdir
- differences/index_template: use consistent heading casing
- builtins: add AssertionError, SyntaxError, ZeroDivisionError
- add glossary
- conf.py: switch to "new" format of intersphinx_mapping
- conf.py: add file for global replacements definition
- library: add CPython docs xref to each pertinent module
- replace.inc: add |see_cpython|, to xref individual symbols from CPython
- conf.py: set "version" and "release" to the same value
- *_index: drop "Indices and tables" pseudo-section
- pyboard: move hardware info into General Info chapter
- uerrno: document "uerrno" module
- esp8266/general.rst: fix name of NTP module
- pyboard: move info about using Windows from topindex to general
- uzlib: update description of decompress() and mention DecompIO
- pyboard/tutorial/amp_skin: add example for playing large WAV files
- library/ubinascii: update base64 docs
- library/usocket: move socket.error to its own section
- library/usocket: describe complete information on address formats
- glossary: elaborate on possible MicroPython port differences
- glossary: fix typos in micropython-lib paragraph
- index: rewrite introduction paragraph to avoid confusion
- use the name MicroPython consistently in documentation
- consistently link to micropython-lib in glossary

all:
- make more use of mp_raise_{msg,TypeError,ValueError} helpers
- unify header guard usage
- remove trailing spaces, per coding conventions
- don't include system errno.h when it's not needed
- use the name MicroPython consistently in comments
- make use of $(TOP) variable in Makefiles, instead of ".."
- raise exceptions via mp_raise_XXX
- make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros

README:
- mention support for bytecode and frozen bytecode
- improve description of precompiled bytecode; mention mpy-cross

CODECONVENTIONS:
- clarify MicroPython changes sign-off process
- start to describe docs conventions
- describe docs use of markup for None/True/False

travis:
- build STM32F769DISC board instead of F7DISC to test dbl-prec FP
- pin cpp-coveralls at 0.3.12

v1.9.1

Toggle v1.9.1's commit message
Fixes for stmhal USB mass storage, lwIP bindings and VFS regressions

This release provides an important fix for the USB mass storage device in
the stmhal port by implementing the SCSI SYNCHRONIZE_CACHE command, which
is now require by some Operating Systems.  There are also fixes for the
lwIP bindings to improve non-blocking sockets and error codes.  The VFS has
some regressions fixed including the ability to statvfs the root.

All changes are listed below.

py core:
- modbuiltins: add core-provided version of input() function
- objstr: catch case of negative "maxsplit" arg to str.rsplit()
- persistentcode: allow to compile with complex numbers disabled
- objstr: allow to compile with obj-repr D, and unicode disabled
- modsys: allow to compile with obj-repr D and PY_ATTRTUPLE disabled
- provide mp_decode_uint_skip() to help reduce stack usage
- makeqstrdefs.py: make script run correctly with Python 2.6
- objstringio: if created from immutable object, follow copy on write policy

extmod:
- modlwip: connect: for non-blocking mode, return EINPROGRESS
- modlwip: fix error codes for duplicate calls to connect()
- modlwip: accept: fix error code for non-blocking mode
- vfs: allow to statvfs the root directory
- vfs: allow "buffering" and "encoding" args to VFS's open()
- modframebuf: fix signed/unsigned comparison pendantic warning

lib:
- libm: use isfinite instead of finitef, for C99 compatibility
- utils/interrupt_char: remove support for KBD_EXCEPTION disabled

tests:
- basics/string_rsplit: add tests for negative "maxsplit" argument
- float: convert "sys.exit()" to "raise SystemExit"
- float/builtin_float_minmax: PEP8 fixes
- basics: convert "sys.exit()" to "raise SystemExit"
- convert remaining "sys.exit()" to "raise SystemExit"

unix port:
- convert to use core-provided version of built-in import()
- Makefile: replace references to make with $(MAKE)

windows port:
- convert to use core-provided version of built-in import()

qemu-arm port:
- Makefile: adjust object-file lists to get correct dependencies
- enable micropython.mem_*() functions to allow more tests

stmhal port:
- boards: enable DAC for NUCLEO_F767ZI board
- add support for NUCLEO_F446RE board
- pass USB handler as parameter to allow more than one USB handler
- usb: use local USB handler variable in Start-of-Frame handler
- usb: make state for USB device private to top-level USB driver
- usbdev: for MSC implement SCSI SYNCHRONIZE_CACHE command
- convert from using stmhal's input() to core provided version

cc3200 port:
- convert from using stmhal's input() to core provided version

teensy port:
- convert from using stmhal's input() to core provided version

esp8266 port:
- Makefile: replace references to make with $(MAKE)
- Makefile: add clean-modules target
- convert from using stmhal's input() to core provided version

zephyr port:
- modusocket: getaddrinfo: Fix mp_obj_len() usage
- define MICROPY_PY_SYS_PLATFORM (to "zephyr")
- machine_pin: use native Zephyr types for Zephyr API calls

docs:
- machine.Pin: remove out_value() method
- machine.Pin: add on() and off() methods
- esp8266: consistently replace Pin.high/low methods with .on/off
- esp8266/quickref: polish Pin.on()/off() examples
- network: move confusingly-named cc3200 Server class to its reference
- uos: deconditionalize, remove minor port-specific details
- uos: move cc3200 port legacy VFS mounting functions to its ref doc
- machine: sort machine classes in logical order, not alphabetically
- network: first step to describe standard network class interface

examples:
- embedding: use core-provided KeyboardInterrupt object

v1.9

Toggle v1.9's commit message
New VFS subsystem and scheduling framework, and less need for the heap

This release adds some fundamental new components, allows for more Python
operations without using the heap and has reduced code size and stack
usage.

Changes in the way iterators are handled allows to iterate without
allocating on the heap for the types: tuple, list, str, bytes, bytearray,
array, dict, set, frozenset.  It also allows to call the builtins all, any,
min max and sum without allocating heap memory for the iterator argument.
And improvements to the handling of super() means that super().foo() method
calls are now heap-less.

A new generic VFS subsystem has been added which allows to mount arbitrary
filesystems (even written in Python) at the root or at a mount-point within
the root.  The FatFS driver has been replaced with an object-oriented
version (oofatfs) which allows a fully customisable filesystem layout.

A scheduling framework has been implemented in the core which gives the
ability to schedule callbacks to be called "as soon as possible".  This
allows ports to implement "soft IRQs" which allow the programmer to
allocate memory during an interrupt handler, at the cost of some
performance related to response time of the handler.  The new
micropython.schedule() function gives access to the scheduler.

Other improvements to the core include: consts can now be big-nums, for
example "X = const(1 << 100)"; addition of "help('modules')" to list
available modules; stack usage reduced for a Python call by 8 bytes on ARM
Cortex-M architectures; micropython.kbd_intr() function added to disable
Ctrl-C capture; addition of uio.resource_stream(); mpy-cross is built
automatically if needed; a helper tool mpy_cross_all.py is added to run
mpy-cross on an entire project.

The bytecode has changed in this version so existing .mpy files will need
recompiling.  There have also been some changes to the C API, most notably
with mp_uint_t changed to size_t in many places.

In the extended modules the following main changes have been made: addition
of machine.Signal class to allow inversion on a Pin; framebuf has new
formats of the form MONO_xxx; addition of uselect.ipoll() for allocation-
free polling; addition of uos.ilistdir() for efficient iteration of a
directory listing; machine.Pin high/low methods are renamed to on/off in
esp8266 and zephyr (this is a backwards-incompatible change);
machine.time_pulse_us() function no longer throws exceptions, but returns
negative values instead.

For stmhal the pyb.fault_debug() function is added, and default behaviour
for a hard-fault is now an immediate reset.  There is better support for F7
MCUs, in particular DMA and SD card support.  A bug has been fixed with the
USB VCP (USB serial) where it would in rare cases (usually when the host PC
was under load) would lose characters.  Pyboard now automatically mounts
all available partitions on the SD card.  Multithreading has been
implemented and is available via the _thread module, but this feature is
disabled by default and must be enabled at compile time using the
MICROPY_THREAD and MICROPY_THREAD_GIL options.  The ability to skip booting
from SD card is now available by creating an empty file on the flash called
"SKIPSD".

The cc3200 port has had some backwards incompatible changes, in particular
with I2C, Pin, UART and uos.  Please see the documentation for the new
behaviour.

The esp8266 port has had a change in the size of the firmware in order to
accommodate additional features.  As such the filesystem for this version
is incompatible with v1.8.7 and a device requires backup and erasure before
flashing this version.  Soft IRQs are now implemented for Pin and Timer
callbacks, along with the general improvements described above.

In the documentation there is now a section describing the differences
between MicroPython and CPython.  And code coverage is up to 98% across py/
and extmod/.

Changes in code size (in bytes) between v1.8.7 and this version are:

   bare-arm: -1104
    minimal: -1324
   unix x64: -1115
unix nanbox: -11106
     stmhal: +18116
     cc3200: +1032
    esp8266: +3060

Note that stmhal has increased significantly due to the addition of frozen
bytecode and the LCD160CR driver.

A detailed list of changes follows.

py core:
- builtinimport: raise ValueError for bad relative import, per CPython
- builtinimport: remove unreachable code and change obj-import comment
- runtime: refactor assert(0) to improve coverage
- runtime: fix handling of throw() when resuming generator
- objgenerator: when throwing an object, don't make an exc instance
- objgenerator: don't raise RuntimeError if GeneratorExit ignored
- parse: refactor code to remove assert(0)'s
- emitnative: remove assert(0)'s or replace with mp_not_implemented
- objexcept: replace if-cond and assert(0) with simple assert
- runtime: refactor default case of switch to remove assert(0)
- binary: mp_binary_get_size: Raise error on unsupported typecodes
- formatfloat: remove unreachable code
- objint_mpz: refactor switch-statement to remove unreachable default
- mpz: implement mpz_set_from_bytes() as a foundation for int.from_bytes()
- objint: from_bytes(): implement "byteorder" param and arbitrary precision
- objint_longlong: add stub for mp_obj_int_from_bytes_impl()
- add builtin help function to core, with default help msg
- move weak-link map to objmodule.c, and expose module maps as public
- builtinhelp: implement help('modules') to list available modules
- objint: fix left-shift overflow in checking for large int
- objmodule: move module init/deinit code into runtime functions
- objstr: optimize string concatenation with empty string
- showbc: make sure to set the const_table before printing bytecode
- py.mk: add CFLAGS_MOD flag to set config file for FatFs
- objstringio: allow to specify initial capacity by passing numeric argument
- objset: make inplace binary operators actually modify the set
- objfloat: raise ZeroDivisionError for 0 to negative power
- objcomplex: correctly handle case of 0j to power of something
- objset: fix inplace binary ops so frozensets are not modified
- added optimised support for 3-argument calls to builtin.pow()
- objstr: give correct behaviour when passing a dict to %-formatting
- mpconfig.h: move PY_BUILTINS_POW3 config option to diff part of file
- objstr: convert some instances of mp_uint_t to size_t
- objcomplex: fix typo in ternary expression
- asmxtensa.h: explicitly cast args to 32-bits so left-shift is legal
- map: change mp_uint_t to size_t where appropriate
- nlr: fix execstack builds for ARM
- objtype: add __delattr__/__setattr__ configured by MICROPY_PY_DELATTR_SETATTR
- emitbc: produce correct line number info for large bytecode chunks
- objtype: replace non-ASCII single-quote char with ASCII version
- modthread: use system-provided mutexs for _thread locks
- vm: add MICROPY_PY_THREAD_GIL_VM_DIVISOR option
- runtime: convert mp_uint_t to size_t where appropriate
- mpz: convert mp_uint_t to size_t where appropriate
- mpz: remove obsolete declaration of mpz_as_str_size
- mpz: change type of "base" args from mp_uint_t to unsigned int
- persistentcode: replace mp_uint_t with size_t where appropriate
- objtuple: convert mp_uint_t to size_t where appropriate
- objlist: convert mp_uint_t to size_t where appropriate
- objdict: convert mp_uint_t to size_t where appropriate
- objset: convert mp_uint_t to size_t where appropriate
- objstr: convert mp_uint_t to size_t (and use int) where appropriate
- objarray: convert mp_uint_t to size_t where appropriate
- objfun: convert mp_uint_t to size_t where appropriate
- objclosure: convert mp_uint_t to size_t where appropriate
- objexcept: convert mp_uint_t to size_t where appropriate
- objint: convert mp_uint_t to size_t where appropriate
- vm: convert mp_uint_t to size_t where appropriate
- add iter_buf to getiter type method
- allow bytecode/native to put iter_buf on stack for simple for loops
- make FOR_ITER opcode pop 1+4 slots from the stack when finished
- optimise storage of iterator so it takes only 4 slots on Py stack
- remove unused "use_stack" argument from for_iter_end emit function
- runtime: optimise case of identity iterator so it doesn't alloc RAM
- compile: optimise list/dict/set comprehensions to use stack iter
- de-optimise some uses of mp_getiter, so they don't use the C stack
- grammar: group no-compile grammar rules together to shrink tables
- lexer: don't generate string representation for period or ellipsis
- persistentcode: bump .mpy version due to change in bytecode
- lexer: simplify handling of indenting of very first token
- lexer: move check for keyword to name-tokenising block
- lexer: use strcmp to make keyword searching more efficient
- lexer: simplify handling of line-continuation error
- do adjacent str/bytes literal concatenation in lexer, not compiler
- lexer: convert mp_uint_t to size_t where appropriate
- grammar: remove unused rule
- objlist: for list slice assignment, allow RHS to be a tuple or list
- moduerrno: make uerrno.errorcode dict configurable
- moduerrno: make list of errno codes configurable
- parse: allow parser/compiler consts to be bignums
- create str/bytes objects in the parser, not the compiler
- parse: simplify handling of errors by raising them directly
- runtime: mp_raise_msg(): Accept NULL argument for message
- objarray: disallow slice-assignment to read-only memoryview
- map: fix bugs with deletion of elements from OrderedDict
- move locals/globals dicts to the thread-specific state
- nlr.h: mark nlr_jump_fail as NORETURN
- nlrxtensa: convert from assembler to C file with inline asm
- nlrx64: convert from assembler to C file with inline asm
- nlrx86: convert from assembler to C file with inline asm
- py.mk: force nlr files to be compiled with -Os
- modsys: use MP_SMALL_INT_MAX for sys.maxsize in case of LONGINT_IMPL_NONE
- runtime.c: remove optimization of '*a,=b', it caused a bug
- use mp_obj_get_array where sequence may be a tuple or a list
- nlrx86: add workaround for Zephyr
- nlrx64: fixes to support Mac OS
- objint_longlong: implement mp_obj_int_from_bytes_impl()
- allow lexer to raise exceptions during construction
- objint: allow to print long-long ints without using the heap
- emitnative: use assertions and mp_not_implemented correctly
- emitnative: remove obsolete commented out code
- mpprint: fix int formatting so "+" is printed for 0-valued integer
- mkrules.mk: remove special check for "-B" in qstr auto generation
- objstr: fix eager optimisation of str/bytes addition
- reduce size of mp_code_state_t structure
- provide mp_decode_uint_value to help optimise stack usage
- objstr: use better msg in bad implicit str/bytes conversion exception
- add micropython.schedule() function and associated runtime code
- vm: don't release the GIL if the scheduler is locked
- bc: provide better error message for an unexpected keyword argument
- use size_t as len argument and return type of mp_get_index
- sequence: convert mp_uint_t to size_t where appropriate
- define and use MP_OBJ_ITER_BUF_NSLOTS to get size of stack iter buf
- lexer: remove obsolete comment, since lexer can now raise exceptions
- modmath: allow trunc/ceil/floor to return a big int if necessary
- objint: handle special case of -0 when classifying fp as int
- modbuiltins: for round() builtin use nearbyint instead of round
- modbuiltins: allow round() to return a big int if necessary
- objtype: use size_t where appropriate, instead of mp_uint_t or uint
- objnamedtuple: use size_t where appropriate, instead of mp_uint_t
- use mp_locals/mp_globals accessor funcs instead of MP_STATE_CTX
- remove MP_STATE_CTX, use MP_STATE_THREAD instead (it's an alias)
- objarray: use mp_obj_str_get_str instead of mp_obj_str_get_data
- nlrx86: better check for Zephyr (requires 1.7)
- obj: change mp_uint_t to size_t for mp_obj_get_array_fixed_n len arg
- vm: fix VM opcode tracing to print correct stack pointer
- compile: when compiling super(), handle closed-over self variable
- objmap: convert mp_uint_t to size_t
- use mp_raise_TypeError/mp_raise_ValueError helpers where possible
- lexer: simplify and reduce code size for operator tokenising
- compile: simplify syntax-error messages for illegal assignments
- shorten a couple of error messages
- compile: provide terse error message for invalid dict/set literals
- convert mp_uint_t to size_t for tuple/list accessors
- change mp_uint_t to size_t for mp_obj_str_get_data len arg
- objzip: convert mp_uint_t to size_t
- obj.h: make sequence grow more efficient and support overlapping
- objstr: use MICROPY_FULL_CHECKS for range checking when constructing bytes
- add very simple but correct hashing for float and complex numbers
- objint: consolidate mp_obj_new_int_from_float to one implementation
- raise a ValueError if range() step is zero
- objtuple: add support for inplace add (same as normal add)
- make sure that static emg-exc-buffer is aligned to size of mp_obj_t
- runtime: when init'ing kbd intr exc, use tuple ptr instead of object
- objint: extract small int value directly because type is known
- objint: use unsigned arithmetic when formatting an integer
- obj: clean up and add comments describing mp_obj_type_t struct
- optimise types for common case where type has a single parent type
- objfloat: add implementation of high-quality float hashing
- nlrsetjmp: add check for failed NLR jump
- gc: execute finaliser code in a protected environment
- modmicropython: add micropython.kbd_intr() function
- reduce str/repr precision of float numbers when floats are 30-bit
- objtype: mp_obj_new_super doesn't need to be public, so inline it
- compile: don't do unnecessary check if parse node is a struct
- compile: extract parse-node kind at start of func for efficiency
- compile: add COMP_RETURN_IF_EXPR option to enable return-if-else opt
- compile: don't do unnecessary check if iter parse node is a struct
- compile: refactor handling of special super() call
- add LOAD_SUPER_METHOD bytecode to allow heap-free super meth calls
- mpz: strip trailing zeros from mpz value when set from bytes
- mpz: in mpn_sub, use existing function to remove trailing zeros
- cleanup use of global DEBUG preprocessor definition
- modio: implement uio.resource_stream(package, resource_path)
- objint: in int.from_bytes, only create big-int if really needed
- modio: resource_stream: Implement "package" param handling
- binary: handle storing big-ints to all arrays types
- lexer: simplify lexer startup by using dummy bytes and next_char()
- mkrules.mk: add dependency of .mpy files upon mpy-cross
- lexer: process CR earlier to allow newlines checks on chr1
- modsys: update conditionals for code referencing sys.stdout
- objstringio: fix StringIO reads at or beyond EOF
- sequence: fix boundary errors when slicing with a negative step
- objrange: fix slicing of range when step of slice is negative
- mkenv.mk: use $(TOP) instead of ".." to reference tools, mpy-cross
- vm: fix bug with stackless mode and unwinding of exceptions
- vm: fix bug with unwind jump popping the iterator from a for loop
- emitbc: fix bug with BC emitter computing Python stack size
- mkrules.mk: fix auto-qstr generation when "make -B" is used
- objstringio: catch mp_uint_t overflow of stream position in write()
- move BYTES_PER_WORD definition from ports to py/mpconfig.h

extmod:
- modframebuf: optimize fill_rect subroutine call
- modframebuf: clip pixels drawn by line method
- modframebuf: add GS4_HMSB format
- vfs_fat: rework so it can optionally use OO version of FatFS
- rename vfs_fat_file.h to vfs_fat.h
- add generic VFS sub-system
- vfs_fat: rework to support new generic VFS sub-system
- vfs: add ability for VFS sub-system to import using VfsFat
- modlwip: add socket.readinto() method
- vfs: expose mp_vfs_mount_t type
- vfs_fat: use SECSIZE macro to determine FatFs sector size
- machine_signal: implement "Signal" abstraction for machine module
- vfs_fat: update to use FF_DIR instead of DIR
- vfs: expose lookup_path_raw as mp_vfs_lookup_path
- vfs_fat: remove MICROPY_READER_FATFS component
- vfs_fat: remove MICROPY_FSUSERMOUNT_ADHOC config option
- remove MICROPY_FSUSERMOUNT and related files
- vfs_fat: remove MICROPY_FATFS_OO config option
- merge old fsusermount.h header into vfs.h and vfs_fat.h
- vfs_fat: remove unused fatfs_builtin_open function
- vfs_fat: remove unused function fat_vfs_listdir
- vfs_reader: fix use of NLR by popping context
- vfs_fat.c: use explicit include path for timeutils.h
- machine_pulse: make time_pulse_us() not throw exceptions
- machine_spi: remove EVENT_POLL_HOOK from soft-SPI transfer func
- machine_signal: implement Signal .on() and .off() methods
- vfs: allow to mount a block device, not just a VFS object
- vfs: raise OSError(EEXIST) on attempt to mkdir a mount point
- vfs: allow to stat the root directory
- modlwip: add my copyright
- modurandom: use mp_raise_ValueError()
- modutimeq: make scheduling fair (round-robin)
- modutimeq: add peektime() function (provisional)
- vfs_fat: remove obsolete and unused str/len members
- vfs_fat: allow to compile with MICROPY_VFS_FAT disabled
- vfs: rewrite path lookup algo to support relative paths from root
- modframebuf: add support for monochrome horizontal format
- utime_mphal: don't exit/enter the GIL in generic sleep functions
- modlwip: use mp_obj_str_get_str instead of mp_obj_str_get_data
- vfs_fat: fix calculation of total blocks in statvfs
- moduselect: update to use size_t for array accessor
- update for changes to mp_obj_str_get_data
- modframebuf: make monochrome bitmap formats start with MONO_
- machine_signal: support all Pin's arguments to the constructor
- machine_signal: rename "inverted" arg to "invert", it's shorter
- moductypes: fix bigint handling for 32-bit ports
- crypto-algorithms/sha256: remove non-standard memory.h header
- moduselect: convert to MP_ROM_QSTR and friends
- moduselect: refactor towards introduction of poll.ipoll()
- moduselect: implement ipoll() method for alloc-free polling
- modlwip: getaddrinfo: Allow to accept all 6 standard params
- modlwip: ioctl POLL: Fix handling of peer closed socket
- vfs: allow a VFS to be mounted at the root dir
- vfs: implement mp_vfs_ilistdir()
- vfs_fat: replace listdir() with implementation of ilistdir()
- vfs: use MP_S_IFDIR, MP_S_IFREG consts instead of magic numbers
- vfs_fat_misc: remove dot-dirs filter since FatFS already does it

lib:
- utils: remove old pyhelp helper, replaced with py/builtinhelp.c
- utils/pyexec: only print help prompt if HELP feature is enabled
- oofatfs: add OO version of FatFS library
- fatfs: remove old fatfs library component, it's replaced by oofatfs
- oofatfs/ffconf.h: allow to configure FS_EXFAT option
- oofatfs/ffconf.h: add MICROPY_FATFS_NORTC option
- utils/pyexec: allow to compile when the uPy compiler is disabled
- utils/pyexec: refactor to put lexer constructors all in one place
- memzip: make lexer constructor raise exception when file not found
- utils/pyexec: fix bug with pyexec_file not setting flag for source
- libm: add implementation of nearbyintf, from musl-1.1.16
- netutils: update for changes to mp_obj_str_get_data
- utils/pyexec: update event-driven REPL to match non-event REPL

drivers:
- fix some minor spelling mistakes
- display: add driver and test for uPy LCD160CR display
- memory: add SPI flash driver, written in C
- display/lcd160cr: use correct variable in set_power()
- display/lcd160cr: fix bugs with lcd.get_pixel()
- display/lcd160cr: fix bug with save_to_flash method
- display/lcd160cr: add check that JPEG size is less than 65536
- nrf24l01: update to work on newer ports, using machine, utime
- display/lcd160cr: fix get_line method and enhance screen_dump
- display/lcd160cr_test: allow test to take orientation parameter
- replace deprecated Pin.high()/low() methods with .__call__(1/0)

tools:
- tinytest-codegen.py: blacklist heapalloc_str.py test for qemu-arm
- upip: update to 1.1.5. Better and more user-friendly error handling
- add gen-cpydiff.py to generate docs differences
- gen-cpydiff.py: set the Python import path to find test modules
- gen-cpydiff.py: configurable CPython and micropython executables
- tinytest-codegen: update for recent test renaming ("intbig" suffix)
- pyboard: tighten up Pyboard object closure on errors
- pyboard: add "exec" and "execpty" pseudo-devices support
- pyboard: execpty: Use shell=False to workaround some curdir issues
- pyboard: processPtyToTerminal: Add workaround for PySerial bug
- pyboard: provide more details when expected reply not received
- mpy-tool: make work if run from another directory
- upip: upgrade to 1.1.6, supports commented lines in requirements.txt
- upip: upgrade to 1.2
- mpy-tool.py: use MP_ROM_xxx macros to support nanbox builds
- mpy_cross_all.py: helper tool to run mpy-cross on the entire project
- mpy-tool.py: fix regression with freezing floats in obj repr C

tests:
- add feature check for "const" keyword and skip related tests
- update test suite to be compatible with CPython 3.6
- improve stream.c test coverage
- import: improve builtinimport.c test coverage
- improve frozen import test coverage
- update tests, and add new ones, for recent generator tweaks
- io: improve test coverage of io.BufferedWriter
- basics: improve runtime.c test coverage
- extmod: improve test coverage of ure module
- float: add test for assigning to attribute of complex number
- extmod/framebuf1: add test for no-op fill_rect
- micropython/opt_level: add test for opt_level 3
- misc/non_compliant: add test for inability to assign func attrs
- basics: add test for assignment of attribute to bound method
- add test for int.from_bytes() for arbitrary-precision integer
- heapalloc_int_from_bytes: test that int.from_bytes() can work w/o alloc
- add test for builtin help function
- basics/builtin_help: add test for help('modules')
- make sure special tests can be skipped as well
- extmod/framebuf4: add tests for GS4_HMSB framebuf format
- extmod/framebuf1: fix test for framebuf invalid constructor
- extmod: add test for ure debug printing when compiling a regex
- heapalloc_str: test for alloc-free string operations
- extmod: update vfs_fat tests for new OO FatFs library
- extmod/vfs_fat: update tests to work with new VFS sub-system
- extmod/vfs_fat_ramdisk: make it work on pyboard
- run-tests: skip frozenset tests if set literal syntax is not available
- basics/zip: make skippable
- thread: make thread_exc2 runable on baremetal
- thread: fix stack size test so tests run reliably on baremetal
- heapalloc_bytesio: test for BytesIO with preallocates space
- basics/set_binop: add tests for inplace set operations
- float: add tests for zero to a negative power
- split tests for 2- and 3-arg pow()
- basics/string_format_modulo: add more tests for dict formatting
- pyb: adjust tests so they can run on PYB and PYBLITE
- misc: add test for line number printing with large bytecode chunk
- add option to not clear MICROPYPATH when running tests
- run-tests: allow to skip tests using async/await keywords
- comprehension1, containment: split set tests to separate files
- builtin_dir: the most expected thing in sys is exit, test for it
- basic/[a-f]*: make skippable
- dict_fromkeys: revert to use reversed() to run in native codegen mode
- extmod: make tests skippable
- thread: replace busy waiting loops with a loop that sleeps
- thread: add stress-test for creating many threads
- gen_yield_from_close: use range() instead of reversed()
- basic/: make various tests skippable
- cmdline: update tests to pass with latest changes to bytecode
- cmdline/cmd_showbc: update to work with recent changes
- micropython: add test for iterating with the heap locked
- micropython/heapalloc_iter: add tests for contains and unpack
- cmdline: update cmd_parsetree test for changes to grammar order
- cmdline/cmd_parsetree: update to work with changes to grammar
- basics/string_join: add more tests for string concatenation
- heapalloc_exc_raise.py: heap alloc test for raising/catching exc
- cpydiff: add initial set of tests for uPy-CPython differences
- cpydiff: add a test for storing iterable to a list slice
- micropython: add test for consts that are bignums
- extmod: add test for machine.Signal class
- basics: add further tests for OrderedDict
- run-tests: check for big int availability and skip related tests
- basic: split tests into working with small ints and not working
- float/complex1: split out intbig test
- float2int*: suffix with _intbig, don't run on any other int type
- string_format_modulo2: split off intbig test
- basics/string_join.py: add test case where argument is not iterable
- basics/unpack1.py: test if *a, = b copies b when b is a list
- micropython/: split off intbig tests
- uctypes_array_assign_native_le: split off intbig part
- basic: make various tests skippable
- float: make various tests skippable
- extmod: add very basic feature test for ussl module
- extmod: add websocket tests
- dict_fromkeys: split out skippable part
- micropython: make uio-using tests skippable
- micropython/heapalloc_traceback: fix backtrace line # after refactor
- micropython/opt_level: clarify the expected output for opt_level == 3
- feature_check/int_big: rework "big int" detection
- basics/fun_error: split out skippable test
- extmod: rename websocket test to websocket_basic
- misc/: make few tests skippable
- extmod: add a test for core VFS functionality, sans any filesystem
- extmod/vfs_basic: add more tests for basic VFS functionality
- extmod: improve re1.5/recursiveloop.c test coverage
- improve binary.c test coverage
- basics/struct_micropython: add test for 'S' typecode in ustruct
- run-tests: re-instate skipping of doubleprec test on pyboard
- extmod/vfs_basic: unmount all existing devices before doing test
- extmod: improve tinfgzip.c test coverage
- micropython/viper_error: add more tests to improve coverage
- basics/string_format2: adjust comment now that tests succeed
- basics: add test for string module formatting with int argument
- basics: move string-modulo-format int tests to dedicated file
- basics/bytes_add: add tests for optimised bytes addition
- micropython: add tests for micropython.schedule()
- heapalloc_str: test no-replacement case for str.replace()
- float: add tests for math funcs that return ints
- float: add tests for round() of inf, nan and large number
- basics: add test for super() when self is closed over
- basics: add tests for list and bytearray growing using themselves
- run-tests: be sure to close Pyboard object on completion
- vfs_fat_fileio.py is too big to be parsed in 16K heap, split in 2
- extmod/vfs_fat_fileio*: improve skippability
- float/byte*_construct: skip on missing array module
- micropython/heapalloc_iter: improve skippability
- run-tests: introduce generic "minimal" target
- float: add tests for hashing float and complex numbers
- run-tests: update names of tests that may need skipping
- basics: add tests for raising ValueError when range() gets 0 step
- basics: add test for tuple inplace add
- extmod/utimeq1: improve coverage of utimeq module
- run-tests: search feature checks wrt to main script location
- run-tests: don't post-process CRASH result in any way
- micropython: add test for micropython.kbd_intr()
- add tests for calling super and loading a method directly
- basics: add tests for int.from_bytes when src has trailing zeros
- cpydiff/core_arguments: fill in cause/workaround
- cpydiff/core_function_userattr: clarify, fill in cause and workaround
- cpydiff/core_import_prereg: fill in cause and workaround
- io/resource_stream: add test for uio.resource_stream()
- cpydiff/core_import_path: test showing difference in package.__path__
- cpydiff/core_import_split_ns_pkgs: test for split namespace packages
- cpydiff/core_function_unpacking: fill in workaround
- extmod: add more tests for VFS FAT
- extmod: add some more VFS tests
- micropython: add test for int.from_bytes with many zero bytes
- move super-as-local test from cpydiff to basic tests
- basics: update array test for big-int with lL typecodes
- basics: add memoryview test for big ints
- basics/lexer: add lexer tests for input starting with newlines
- extmod: make some vfs tests fully unmount FSs before running
- extmod/vfs: update tests to reflect new ilistdir() method
- basics/lexer: add line continuation tests for lexer
- extmod/vfs_fat: add test for ilistdir of a non-existent directory
- extmod/vfs_fat_more: make skippable is uos is not available
- io/bytesio_ext: test read() after seek() past end of BytesIO object
- basics/list_slice_3arg: add more tests for negative slicing
- basics/builtin_range: add tests for negative slicing of range
- basics: add more tests for unwind jumps from within a try-finally

mpy-cross:
- main: move lexer constructor to within NLR handler block
- fix compiler detection for including windows/fmode.c
- Makefile: override undefine any inherited variables
- Makefile: guard "override undefine" by test for make feature

bare-arm port:
- main: move lexer constructor to within NLR handler block
- Makefile: change C standard from gnu99 to c99

minimal port:
- update frozentest.mpy file for new .mpy version
- add ability and description to build without the compiler
- main: move lexer constructor to within NLR handler block
- Makefile: change C standard from gnu99 to c99
- main: make Cortex-M vector table constant

unix port:
- coverage: move coverage #if guard back to top of file
- enable builtin help function in coverage build
- enable MICROPY_PY_BUILTINS_HELP_MODULES in coverage build
- switch to OO version of FatFS library
- get minimal version compiling again
- change to use new generic VFS sub-system in coverage build
- fatfs_port: include new oofatfs header
- mpconfigport.h: remove obsolete MICROPY_FATFS_VOLUMES config
- modos: remove VfsFat from uos module, it's now in uos_vfs module
- make stack be non-executable
- fix freedos port build problems
- main: properly handle MICROPYPATH starting with ':'
- moduselect: implement ipoll() method with no-allocation policy
- modmachine: add Signal class to machine module
- remove remaining, obsolete traces of GNU readline support
- moduselect: properly implement ipoll object iteration
- main: refactor to put lexer constructors all in one place
- use mp_handle_pending() in time.sleep()
- coverage: enable scheduler and add tests for it
- use mp_obj_str_get_str instead of mp_obj_str_get_data
- convert mp_uint_t to size_t for use of mp_obj_list_get
- convert mp_uint_t to size_t in alloc.c
- enabled high-quality float hashing in coverage build
- remove obsolete MICROPY_FATFS macro
- main: ignore SIGPIPE signal, instead make EPIPE arrive
- main: don't allow to specify too small heap size
- main: implement -m option for packages
- Makefile: enable frozen bytecode modules dir
- move upip to frozen bytecode dir
- Makefile: don't add frozen bytecode to minimal build
- add ilistdir in uos module
- use core-provided KeyboardInterrupt exception object

windows port:
- .gitignore: ignore VC.db and VC.opendb files from VS2015
- make msvc project file support any version from VS2013 to VS2017
- bring mpconfigport.h up-to-date with unix port
- README: convert to Markdown
- README: fix some typos and grammar
- README: add a note about stack usage for msvc
- use core-provided KeyboardInterrupt exception object
- msvc: add machine/pin-related sources to build
- msvc: remove directory with generated files when cleaning
- msvc: do not define DEBUG for debug builds
- msvc: rebuild all qstrs when mpconfig headers are modified
- msvc: workaround parser bug in older MSBuild versions

qemu-arm port:
- don't compile tests in "REPL" mode
- mpconfigport.h: enable MICROPY_PY_BUILTINS_POW3 option
- enable machine module and associated tests
- add basic uos module with generic VFS capabilities
- move lexer constructors to within NLR handler block

stmhal port:
- support PortG on STM32L476 and STM32L486
- fix wrong usage of gcc -print-libgcc-file-name
- fix USB HID receive not receiving the first packet
- implement ioctl for USB HID read
- implement SNAK/CNAK mechanism for USB HID receive
- convert to use builtin help function
- enable help('modules') feature
- add default frozen-bytecode directory and link lcd160cr driver
- fix examples in openocd configs to include addresses
- add ability to have filesystem stored on external SPI flash
- boards/STM32L476DISC: use external SPI flash for filesystem
- mpconfigport.h: reorganise the config options into groups
- usbd_msc_storage: use storage functions instead of disk ones
- convert to use VFS sub-system and new ooFatFs component
- fix name of automatically created boot.py
- moduos: remove duplicated chdir
- use LED constants from PYBv4 onwards
- set the FatFs partition number when initialising VFS object
- fix stack pointer initialisation for F411 and F429 boards
- README: add paragraph about building mpy-cross
- on boot, mount all available partitions of the SD card
- main: put /sd directory before /flash in sys.path
- pin: add C-level pin ioctl method
- modmachine: add machine.Signal type
- main: guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD
- pendsv: fill in comments about what the stack contains
- initial implementation of multithreading, currently disabled
- main: use _estack value to initialise stack extents
- fix build issue when MICROPY_PY_THREAD is disabled
- mpconfigport.h: enable MICROPY_PY_BUILTINS_POW3 option
- on HardFault, print stack pointer and do a stack dump
- add pyb.fault_debug() function, to control hard-fault behaviour
- use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate
- add ability to skip booting from SD card via /flash/SKIPSD file
- Makefile: drop use of -mabi=aapcs-linux; link libgcc by default
- boards: for STM32F411DISC, change I2C pin according to datasheet
- implement a proper thread scheduler
- use generic interrupt char code
- main: remove unnecessary header includes
- use mp_hal_delay_ms instead of HAL_Delay
- rename sys_tick ticks/delay functions to corresp. mp_hal ones
- modpyb: use utime ticks ms/us functions instead of custom ones
- modnwcc3k: add include for mp_hal_delay_ms
- mphalport: get ticks_cpu() working on F7 MCUs
- main: allocate flash's VFS struct on the heap to trace root ptrs
- enable micropython.schedule()
- pendsv: disable interrupts during a thread switch
- irq: shift IRQ priorities of TIM and EXTINT to be above PENDSV
- pybthread: allow interrupts to work during lock/unlock of mutex
- systick: make mp_hal_delay_ms release the GIL when sleeping
- boards: fix alt-func config for PA5 of STM32F767
- board: fix existing and add more pin defs for NUCLEO_F767ZI
- spi: clean and/or invalidate D-cache before SPI DMA transfers
- hal: for F7 MCUs, expose DMA_CalcBaseAndBitshift function
- dma: fix reinitialisation of DMA on F7 MCUs, following F4
- update to use size_t for tuple/list accessors
- update for changes to mp_obj_str_get_data
- spi: increase SPI transfer timeout, proportional to num bytes
- support SDMMC alternate functions in pin generation
- sdcard: add support for SDMMC2 on F7 MCUs
- boards: update F76x alternate function table to add SDMMC2
- boards/STM32F769DISC: get SD card working by using SDMMC2
- boards/STM32F769DISC: fix user switch pin, and document stlink
- boards: remove F769 alt function table, it's same as for F767
- dma: don't include SDMMC2 struct if SDMMC2 is not available
- move L4/F7 I2C timing constants from mpconfigboard.h to i2c.c
- i2c: clean the cache so that I2C DMA works on F7 MCUs
- usbd_cdc_interface: increase in-endpoint timeout to 500ms
- usbd_cdc_interface: change CDC RX to use a circular buffer
- enable parsing of all Pin constructor args by machine.Signal
- timer: clear interrupt flag before setting callback
- convert all module and method tables to use MP_ROM macros
- modmachine: add machine.UART class, linking to pyb.UART
- modmachine: remove TODO comment that is now implemented
- add machine.Pin on/off methods
- add ilistdir in uos module

cc3200 port:
- convert to use builtin help function
- add implementations of mp_import_stat and builtin_open
- modusocket: remove deprecated socket.error
- convert to use new VFS sub-system and new ooFatFs library
- refactor "ticks" functions to use common extmod implementation
- move stoupper to ftp.c and define in terms of unichar_toupper
- use simplelink API instead of emulated BSD API
- remove util/std.h, can just use stdio.h instead
- mods/modwlan: remove unused header includes; simplify others
- mods/modwlan: make multi-threaded a proper compile-time option
- mods/modwlan: allow antenna diversity to be fully compiled out
- mods/modwlan: add int casts to silence compiler warnings
- remove remaining references to std.h
- move wlan socket glue functions from modwlan to modusocket
- convert to using uPy internal errno numbers
- when raising OSError's use MP_Exxx as arg instead of a string
- enable uerrno module with short, custom list of error codes
- mods/modusocket: init vars to 0 to silence compiler warnings
- remove socket.timeout class, use OSError(ETIMEDOUT) instead
- moduos: remove uos.sep, as it's strictly optional
- mptask: allocate flash VFS struct on the heap to trace root ptrs
- mods/modutime: use generic sleep_ms and sleep_us implementations
- update to use size_t for tuple/list accessors
- update for changes to mp_obj_str_get_data
- mods/pybi2c: raise OSError if readfrom_mem fails to write addr
- modmachine: return frequency value directly, like other ports
- pybuart: make parity specifications consistent with HW API
- mods/pybi2c: make machine.I2C constructor/init conform to HW API
- mods/pybi2c: make readfnom_mem_into/writeto_mem return None
- mods/pybpin: remove toggle() method

teensy port:
- convert to use builtin help function
- main: remove unnecessary header includes
- lexerfrozen: make mp_lexer_new_from_file raise an exception

esp8266 port:
- convert to use builtin help function
- factor out common linker code to esp8266_common.ld
- switch to use OO version of FatFs library
- change to use new generic VFS sub-system
- fatfs_port: include new oofatfs header
- machine_pin: implement pin ioctl protocol
- modmachine: add Signal class
- mpconfigport.h: remove obsolete MICROPY_FATFS_VOLUMES config
- uart: add support for polling uart device
- moduos: populate release field of uname in case it was GC'd
- mpconfigport.h: enable help('modules') feature
- update lexer constructors so they can raise exceptions
- only execute main.py if in friendly REPL mode
- enable micropython.schedule() with locking in pin callback
- change machine.Timer callback to soft callback
- machine_pin: add "hard" parameter to pin.irq, soft by default
- machine_pin: make pin.irq arguments positional
- machine_pin: fix memset size for zeroing of pin_irq_is_hard
- machine_pin: fix pin.irq() to work when all args are keywords
- modesp: use mp_obj_str_get_str instead of mp_obj_str_get_data
- modesp: remove long-obsolete and unused espconn bindings
- update to use size_t for tuple/list accessors
- update for changes to mp_obj_str_get_data
- remove unused entry in port root pointers
- README: replace reference of alpha status to beta status
- README: add notice about 512K version
- change default settings to mount flash at root dir
- esp8266.ld, esp8266_ota.ld: grow main firmware size by 32KB
- modesp: flash_user_start: Use value from linker script
- modules/flashbdev: reserve one sector for native code storage
- scripts: move drivers/modules to modules/ (frozen bytecode)
- scripts: move initsetup & port_diag tools to modules/
- ets_alt_task.c: prevent spurious large increment of ticks_ms()
- modnetwork: in connect, fix potential buffer overflows
- machine_uart: add uart.any() method
- modules: mount filesystem at root when creating for first time
- mpconfigport.h: remove duplicate link to lwip module
- rename machine.Pin high/low methods to on/off
- add ilistdir in uos module

zephyr port:
- help: update n_args param type to size_t
- remove deprecated .mdef file
- add separate Zephyr config for "minimal" build
- enable SLIP networking for the default build
- convert to use builtin help function
- make sure that correct Zephyr config is used for "minimal" build
- allow to have per-board Zephyr config fragments
- prj_frdm_k64f.conf: add, enable Ethernet support
- Makefile.zephyr: support and default to networked (SLIP) QEMU
- README: describe many gotchas of networked builds
- enable IPv6 networking in addition to IPv4
- add qemu_cortex_m3 config fragment
- main: don't unconditionally dump stats on each GC
- README: network startup issues with frdm_k64f resolved
- modzephyr: add a module for Zephyr-specific things
- modzephyr: fix typo in identifier
- make sure that generated prj.conf is updated only on content changes
- move "minimal" configuration building to a separate wrapper script
- main: nlr_jump_fail: Fix noreturn warning
- main: remove unused __fatal_error()
- main: move lexer constructor to within NLR handler block
- zephyr_getchar: use native k_sem instead of legacy nano_sem
- prj_base.conf: disable legacy kernel compatibility
- prj_base.conf: enable TCP (and UDP explicitly)
- Makefile: rework to use modern, official build integration
- Makefile: add workaround (fix?) for broken builds for DTS targets
- fix NLR segfault in minimal build
- modusocket: initial version of usocket module for Zephyr
- integrate modusocket into build
- modusocket: implement bind() and connect()
- modusocket: implement send()
- modusocket: implement recv() for UDP sockets
- modusocket: implement recv() for TCP sockets
- prj_base.conf: add config for net_buf logging
- modusocket: be sure to use MP_OBJ_FROM_PTR
- modusocket: factor out socket_new() function
- zephyr_getchar: explicitly yield to other threads on char availability
- Makefile: add "test" target, runs testsuite in QEMU
- modusocket: factor out "extended k_fifo API"
- modusocket: implement listen()
- modusocket: socket_bind: Don't set recv callback on STREAM sockets
- modusocket: implement accept()
- mpconfigport.h: fix build if usocket module is disabled
- modmachine: add Signal class
- machine_pin: implement pin protocol for machine.Signal support
- modusocket: call net_nbuf_print_frags() in recv callback if DEBUG > 1
- modusocket: strip packet header right in the receive callback
- modmachine: implement machine.reset()
- main: configure IPv4 netmask and gateway to allow Internet access
- add 96b_carbon configuration
- modusocket: refactor send() into stream write() method
- modusocket: enable stream write() method
- modusocket: refactor recv() into stream read() method
- modusocket: add read/readline/readinto stream methods
- modusocket: sock_read: Check socket status only at the start of packet
- modusocket: add dummy makefile() implementation
- Makefile: add debugserver Zephyr target
- mpconfigport.h: enable line number information for scripts
- main: remove superfluous include
- modusocket: add dummy setsockopt() implementation
- modusocket: add SOL_SOCKET and SO_REUSEADDR constants
- prj_qemu_x86.conf: bump RAM size to 320K
- README: update to require Zephyr 1.8
- modusocket: wrap pkt_get_info() call
- modusocket: update for net_pkt refactor
- modusocket: switch to net_pkt_append() returning length
- modusocket: if there're no packets in recv_q, cancel waiter
- modusocket: implement getaddrinfo()
- modusocket: first step to switch to alternative FIFO processing
- modusocket: get rid of cur_pkt object member
- main: check default netif before applying operations to it
- modusocket: getaddrinfo: Use RAISE_ERRNO for proper error decoding
- modusocket: getaddrinfo: Raise OSError on resolution timeout, etc
- modusocket: use DEBUG_PRINT macro name as other modules do
- rename machine.Pin high/low methods to on/off
- don't send more than MTU allows
- modusocket: handle a case when recv_q is empty when EOF is signaled

pic16bit port:
- main: make nlr_jump_fail never return
- main: make mp_lexer_new_from_file raise an exception

README:
- explicitly mention "await" support, and formatting for keywords
- add link to docs.micropython.org
- describe extmod/ dir
- change Travis & Coveralls badges to not use link references

travis:
- unconditionally run coveralls analysis, even if others failed
- change an stmhal rule to build PYBV11 instead of default PYBV10

gitattributes:
- add .mpy files to list of binary files
- remove obsolete lines

docs:
- fix some minor spelling mistakes
- add documentation for lcd160cr module
- pyboard/tutorial: add tutorial for LCD160CR
- library/lcd160cr: fix set_brightness range, should be 0..31
- machine.Timer: move WiPy adhoc parts to its documentation
- machine: add explicit note on machine module level and scope
- usocket: clarify exceptions used
- usocket: elaborate "Constants" section
- usocket: clarify description of various methods
- usocket: dedent Methods section
- uio: describe differences between uPy an CPy stream hierarchy
- conf.py: add myself as a copyright holder on the docs
- uio: typo fixes/lexical improvements
- pyboard/tutorial/lcd160cr_skin: fix typo, get_touched->get_touch
- for LCD160CR driver and tutorial, add link to positioning image
- esp8266/tutorial: specify the baudrate in picocom example command
- add M-logo as favicon
- library/pyb.Pin: minor typo fix, B6 should be A0
- library/machine: make separate TOC for WiPy vs non-WiPy
- uos: remove mention of uos.sep
- library/lcd160cr: mention the valid values for set_power() method
- modify Makefile and indexes to generate cPy-differences pages
- uhashlib: provide port-neutral description
- Makefile: define and use PYTHON as the interpreter for CPYDIFF
- machine: fix formatting of Constants section
- library/lcd160cr: add note about supported JPEG format/encodings
- library: add framebuf documentation
- library/lcd160cr: add link to framebuf page
- esp8266/tutorial: update since esptool 1.3 added Python 3 support
- library/framebuf: fix typo in bit-width for MVLSB description
- library/machine.I2C: fix scan() doc to match implementation
- library/btree: add btree module docs
- utime: de-conditionalize description of sleep_ms() and friends
- uos: de-conditionalize statvfs() description
- machine.SPI: remove outdated wipy chunk
- machine.Pin: move wipy-specific details to its own docs
- machine.Pin: move wipy-specific methods to its docs
- esp8266/general: start explicit "Known Issues", mentioned RTC inaccuracy
- library/builtins: int: Add notice on byteorder param for to/from_bytes
- library/machine.UART: remove some conditionals
- utime: deconditionalize description of sleep()
- usocket: deconditionalize
- uhashlib: deconditionalize
- esp8266/tutorial/intro: reword section on flash size requirement
- library/micropython: deconditionalize
- library/uos: urandom: Generalize description
- library/ussl: deconditionalize, wipy notes moved to its documentation
- machine.UART: deconditionalize normal methods
- machine: move machine.main() misnomer to wipy's known issues
- library/machine: typo fix in machine_callbacks section
- library/machine.UART: remove pyboard-specific section
- wipy/quickref: update reference for change to I2C API
- wipy/general: add section about specifics of I2C implementation
- library/machine.I2C: deconditionalise all methods
- library/machine.*: add cross-reference label to individual classes
- esp8266/quickref: add links from quickref page to machine classes
- library/machine.I2C: remove WiPy-specific return values
- library/machine.SPI: fix formatting of bullet list to stop warning
- library/uos: add description of uos.ilistdir() function
- machine.Pin: there's no toggle() method in MicroPython hardware API
- machine.Signal: add initial draft description of Signal class
- library/index: add important summary of the intro section as warning
- change single occurrence of "Micropython" to "MicroPython"
- library/micropython: document the newer micropython functions
- library/machine.UART: update and improve uart.any() docs
- library/machine.Pin: remove .id() method and .board class attr

examples:
- hwapi: use Signal for inverted LED on ESP-12
- hwapi: consistently use Signal class to define LEDs
- button_reaction: update for time_pulse_us() no longer raising exc
- hwapi: add hwconfig_pyboard.py for pyboard
- hwapi: be sure to import Signal when it's used
- hwapi/soft_pwm: use Signal on()/off() methods
- embedding/README: convert to markdown, grammar and clarity fixes
- embedding: place lexer constructor within NLR handler block
- hwapi: add config for Zephyr port of 96Boards Carbon
- hwapi/hwconfig*: use inline Signal() args where possible
- hwapi/soft_pwm2_uasyncio: update for call_later_ms()

v1.8.7

Toggle v1.8.7's commit message
Support for Xtensa emitter and assembler, and upgraded F4 and F7 STM HAL

This release adds support for the Xtensa architecture as a target for the
native emitter, as well as Xtensa inline assembler.  The int.from_bytes
and int.to_bytes methods now require a second argument (the byte order)
per CPython (only "little" is supported at this time).  The "readall"
method has been removed from all stream classes that used it; "read" with
no arguments should be used instead.  There is now support for importing
packages from compiled .mpy files.  Test coverage is increased to 96%.

The generic I2C driver has improvements: configurable clock stretching
timeout, "stop" argument added to readfrom/writeto methods, "nack"
argument added to readinto, and write[to] now returns num of ACKs
received.  The framebuf module now handles 16-bit depth (generic colour
format) and has hline, vline, rect, line methods.  A new utimeq module is
added for efficient queue ordering defined by modulo time (to be
compatible with time.ticks_xxx functions).  The pyboard.py script has been
modified so that the target board is not reset between scripts or commands
that are given on a single command line.

For the stmhal port the STM Cube HAL has been upgraded: Cube F4 HAL to
v1.13.1 (CMSIS 2.5.1, HAL v1.5.2) and Cube F7 HAL to v1.1.2.  There is a
more robust pyb.I2C implementation (DMA is now disabled by default, can be
enabled via an option), and there is an implementation of machine.I2C with
robust error handling and hardware acceleration on F4 MCUs.  It is now
recommended to use machine.I2C instead of pyb.I2C.  The UART class is now
more robust with better handling of errors/timeouts.  There is also more
accurate VBAT and VREFINT measurements for the ADC.  New boards that are
supported include: NUCLEO_F767ZI, STM32F769DISC and NUCLEO_L476RG.

For the esp8266 port select/poll is now supported for sockets using the
uselect module.  There is support for native and viper emitters, as well
as an inline assembler (with limited iRAM for storage of native functions,
or the option to store code to flash).  There is improved software I2C
with a slight API change: scl/sda pins can be specified as positional only
when "-1" is passed as the first argument to indicate the use of software
I2C.  It is recommended to use keyword arguments for scl/sda.  There is
very early support for over-the-air (OTA) updates using the yaota8266
project.

A detailed list of changes follows.

py core:
- emitnative: fix native import emitter when in viper mode
- remove readall() method, which is equivalent to read() w/o args
- objexcept: allow clearing traceback with 'exc.__traceback__ = None'
- runtime: mp_resume: handle exceptions in Python __next__()
- mkrules.mk: rework find command so it works on OSX
- *.mk: replace uses of 'sed' with $(SED)
- parse: move function to check for const parse node to parse.[ch]
- parse: make mp_parse_node_new_leaf an inline function
- parse: add code to fold logical constants in or/and/not operations
- factor persistent code load/save funcs into persistentcode.[ch]
- factor out persistent-code reader into separate files
- lexer: rewrite mp_lexer_new_from_str_len in terms of mp_reader_mem
- lexer: provide generic mp_lexer_new_from_file based on mp_reader
- lexer: rewrite mp_lexer_new_from_fd in terms of mp_reader
- lexer: make lexer use an mp_reader as its source
- objtype: implement __call__ handling for an instance w/o heap alloc
- factor out common code from assemblers into asmbase.[ch]
- stream: move ad-hoc ioctl constants to stream.h and rename them
- compile: simplify configuration of native emitter
- emit.h: remove long-obsolete declarations for cpython emitter
- move arch-specific assembler macros from emitnative to asmXXX.h
- asmbase: add MP_PLAT_COMMIT_EXEC option for handling exec code
- asmxtensa: add low-level Xtensa assembler
- integrate Xtensa assembler into native emitter
- allow inline-assembler emitter to be generic
- add inline Xtensa assembler
- emitinline: embed entire asm struct instead of a pointer to it
- emitinline: move inline-asm align and data methods to compiler
- emitinline: move common code for end of final pass to compiler
- asm: remove need for dummy_data when doing initial assembler passes
- objint: from_bytes, to_bytes: require byteorder arg, require "little"
- binary: do zero extension when storing a value larger than word size
- builtinimport: support importing packages from compiled .mpy files
- mpz: remove unreachable code in mpn_or_neg functions
- runtime: zero out fs_user_mount array in mp_init
- mpconfig.h: enable MICROPY_PY_SYS_EXIT by default
- add MICROPY_KBD_EXCEPTION config option to provide mp_kbd_exception
- compile: add an extra pass for Xtensa inline assembler
- modbuiltins: remove unreachable code
- objint: rename mp_obj_int_as_float to mp_obj_int_as_float_impl
- emitglue: refactor to remove assert(0), to improve coverage
- lexer: remove unreachable code in string tokeniser
- lexer: remove unnecessary check for EOF in lexer's next_char func
- lexer: permanently disable the mp_lexer_show_token function
- parsenum: simplify and generalise decoding of digit values
- mpz: fix assertion in mpz_set_from_str which checks value of base
- mpprint: add assertion for, and comment about, valid base values
- objint: simplify mp_int_format_size and remove unreachable code
- unicode: comment-out unused function unichar_isprint
- consistently update signatures of .make_new and .call methods
- mkrules.mk: add MPY_CROSS_FLAGS option to pass flags to mpy-cross
- builtinimport: fix bug when importing names from frozen packages

extmod:
- machine_i2c: make the clock stretching timeout configurable
- machine_i2c: raise an error when clock stretching times out
- machine_i2c: release SDA on bus error
- machine_i2c: add a C-level I2C-protocol, refactoring soft I2C
- machine_i2c: add argument to C funcs to control stop generation
- machine_i2c: rewrite i2c.scan in terms of C-level protocol
- machine_i2c: rewrite mem xfer funcs in terms of C-level protocol
- machine_i2c: remove unneeded i2c_write_mem/i2c_read_mem funcs
- machine_i2c: make C-level functions return -errno on I2C error
- machine_i2c: add 'nack' argument to i2c.readinto
- machine_i2c: make i2c.write[to] methods return num of ACKs recvd
- machine_i2c: add 'stop' argument to i2c readfrom/writeto meths
- machine_i2c: remove trivial function wrappers
- machine_i2c: expose soft I2C obj and readfrom/writeto funcs
- machine_i2c: add hook to constructor to call port-specific code
- modurandom: allow to build with float disabled
- modframebuf: make FrameBuffer handle 16bit depth
- modframebuf: add back legacy FrameBuffer1 "class"
- modframebuf: optimise fill and fill_rect methods
- vfs_fat: implement POSIX behaviour of rename, allow to overwrite
- moduselect: use stream helper function instead of ad-hoc code
- moduselect: use configurable EVENT_POLL_HOOK instead of WFI
- modlwip: add ioctl method to socket, with poll implementation
- vfs_fat_file: allow file obj to respond to ioctl flush request
- modbtree: add method to sync the database
- modbtree: rename "sync" method to "flush" for consistency
- modframebuf: add hline, vline, rect and line methods
- machine_spi: provide reusable software SPI class
- modframebuf: make framebuf implement the buffer protocol
- modframebuf: store underlying buffer object to prevent GC free
- modutimeq: copy of current moduheapq with timeq support for refactoring
- modutimeq: refactor into optimized class
- modutimeq: make time_less_than be actually "less than", not less/eq

lib:
- utils/interrupt_char: use core-provided mp_kbd_exception if enabled

drivers:
- display/ssd1306.py: update to use FrameBuffer not FrameBuffer1
- onewire: enable pull up on data pin
- onewire/ds18x20: fix negative temperature calc for DS18B20

tools:
- tinytest-codegen: blacklist recently added uheapq_timeq test (qemu-arm)
- pyboard.py: refactor so target is not reset between scripts/cmd
- mpy-tool.py: add support for OPT_CACHE_MAP_LOOKUP_IN_BYTECODE

tests:
- micropython: add test for import from within viper function
- use read() instead of readall()
- basics: add test for logical constant folding
- micropython: add test for creating traceback without allocation
- micropython: move alloc-less traceback test to separate test file
- extmod: improve ujson coverage
- basics: improve user class coverage
- basics: add test for dict.fromkeys where arg is a generator
- basics: add tests for if-expressions
- basics: change dict_fromkeys test so it doesn't use generators
- basics: enable tests for list slice getting with 3rd arg
- extmod/vfs_fat_fileio: add test for constructor of FileIO type
- extmod/btree1: exercise btree.flush()
- extmod/framebuf1: add basics tests for hline, vline, rect, line
- update for required byteorder arg for int.from_bytes()/to_bytes()
- extmod: improve moductypes test coverage
- extmod: improve modframebuf test coverage
- micropython: get heapalloc_traceback test running on baremetal
- struct*: make skippable
- basics: improve mpz test coverage
- float/builtin_float_round: test round() with second arg
- basics/builtin_dir: add test for dir() of a type
- basics: add test for builtin locals()
- basics/set_pop: improve coverage of set functions
- run-tests: for REPL tests make sure the REPL is exited at the end
- basics: improve test coverage for generators
- import: add a test which uses ... in from-import statement
- add tests to improve coverage of runtime.c
- add tests to improve coverage of objarray.c
- extmod: add test for utimeq module
- basics/lexer: add a test for newline-escaping within a string
- add a coverage test for printing the parse-tree
- utimeq_stable: test for partial stability of utimeq queuing
- heapalloc_inst_call: test for no alloc for simple object calls
- basics: add tests for parsing of ints with base 36
- basics: add tests to improve coverage of binary.c
- micropython: add test for micropython.stack_use() function
- extmod: improve ubinascii.c test coverage
- thread: improve modthread.c test coverage
- cmdline: improve repl.c autocomplete test coverage
- unix: improve runtime_utils.c test coverage
- pyb/uart: update test to match recent change to UART timeout_char
- run-tests: allow to skip set tests
- improve warning.c test coverage
- float: improve formatfloat.c test coverage using Python
- unix: improve formatfloat.c test coverage using C
- unix/extra_coverage: add basic tests to import frozen str and mpy
- types1: split out set type test to set_types
- array: allow to skip test if "array" is unavailable
- unix/extra_coverage: add tests for importing frozen packages

unix port:
- rename define for unix moduselect to MICROPY_PY_USELECT_POSIX
- Makefile: update freedos target for change of USELECT config name
- enable utimeq module
- main: allow to print the parse tree in coverage build
- Makefile: make "coverage_test" target mirror Travis test actions
- moduselect: if file object passed to .register(), return it in .poll()
- Makefile: split long line for coverage target, easier to modify
- enable and add basic frozen str and frozen mpy in coverage build
- Makefile: allow cache-map-lookup optimisation with frozen bytecode

windows port:
- enable READER_POSIX to get access to lexer_new_from_file

stmhal port:
- dma: de-init the DMA peripheral properly before initialising
- i2c: add option to I2C to enable/disable use of DMA transfers
- i2c: reset the I2C peripheral if there was an error on the bus
- rename mp_hal_pin_set_af to _config_alt, to simplify alt config
- upgrade to STM32CubeF4 v1.13.0 - CMSIS/Device 2.5.1
- upgrade to STM32CubeF4 v1.13.0 - HAL v1.5.1
- apply STM32CubeF4 v1.13.1 patch - upgrade HAL driver to v1.5.2
- hal/i2c: reapply HAL commit ea040a4 for f4
- hal/sd: reapply HAL commit 1d7fb82 for f4
- hal: reapply HAL commit 9db719b for f4
- hal/rcc: reapply HAL commit c568a2b for f4
- hal/sd: reapply HAL commit 09de030 for f4
- boards: configure all F4 boards to work with new HAL
- make-stmconst.py: fix regex's to work with current CMSIS
- i2c: handle I2C IRQs
- dma: precalculate register base and bitshift on handle init
- dma: mark DMA sate as READY even if HAL_DMA_Init is skipped
- can: clear FIFO flags in IRQ handler
- i2c: provide custom IRQ handlers
- hal: do not include <stdio.h> in HAL headers
- mphalport.h: use single GPIOx->BSRR register
- make-stmconst.py: add support for files with invalid utf8 bytes
- update HALCOMMITS due to change to hal
- make-stmconst.py: restore Python 2 compatibility
- update HALCOMMITS due to change to hal
- moduselect: move to extmod/ for reuse by other ports
- i2c: use the HAL's I2C IRQ handler for F7 and L4 MCUs
- updates to get F411 MCUs compiling with latest ST HAL
- i2c: remove use of legacy I2C_NOSTRETCH_DISABLED option
- add beginnings of port-specific machine.I2C implementation
- i2c: add support for I2C4 hardware block on F7 MCUs
- i2c: expose the pyb_i2c_obj_t struct and some relevant functions
- machine_i2c: provide HW implementation of I2C peripherals for F4
- add support for flash storage on STM32F415
- add back GPIO_BSRRL and GPIO_BSRRH constants to stm module
- add OpenOCD configuration for STM32L4
- add address parameters to openocd config files
- adc: add "mask" selection parameter to pyb.ADCAll constructor
- adc: provide more accurate measure of VBAT and VREFINT
- adc: make ADCAll.read_core_temp return accurate float value
- adc: add ADCAll.read_vref method, returning "3.3v" value
- adc: add support for F767 MCU
- adc: make channel "16" always map to the temperature sensor
- sdcard: clean/invalidate cache before DMA transfers with SD card
- moduos: implement POSIX behaviour of rename, allow to overwrite
- adc: use constants from new HAL version
- refactor UART configuration to use pin objects
- uart: add support for UART7 and UART8 on F7 MCUs
- uart: add check that UART id is valid for the given board
- cmsis: update STM32F7 CMSIS device include files to V1.1.2
- hal: update ST32CubeF7 HAL files to V1.1.2
- port of f4 hal commit c568a2b to updated f7 hal
- port of f4 hal commit 09de030 to updated f7 hal
- port of f4 hal commit 1d7fb82 to updated f7 hal
- declare and initialise PrescTables for F7 MCUs
- boards/STM32F7DISC: define LSE_STARTUP_TIMEOUT
- hal: update HALCOMMITS due to change in f7 hal files
- refactor to use extmod implementation of software SPI class
- cmsis: add CMSIS file stm32f767xx.h, V1.1.2
- add NUCLEO_F767ZI board, with openocd config for stm32f7
- cmsis: add CMSIS file stm32f769xx.h, V1.1.2
- add STM32F769DISC board files
- move PY_SYS_PLATFORM config from board to general config file
- mpconfigport: add weak-module links for io, collections, random
- rename mp_const_vcp_interrupt to mp_kbd_exception
- usb: always use the mp_kbd_exception object for VCP interrupt
- use core-provided keyboard exception object
- led: properly initialise timer handle to zero before using it
- mphalport.h: explicitly use HAL's GPIO constants for pull modes
- usrsw: use mp_hal_pin_config function instead of HAL_GPIO_Init
- led: use mp_hal_pin_config function instead of HAL_GPIO_Init
- sdcard: use mp_hal_pin_config function instead of HAL_GPIO_Init
- add support for STM32 Nucleo64 L476RG
- uart: provide a custom function to transmit over UART
- uart: increase inter-character timeout by 1ms
- enable utimeq module

cc3200 port:
- tools/smoke.py: change readall() to read()
- pybspi: remove static mode=SPI.MASTER parameter for latest HW API
- mods/pybspi: remove SPI.MASTER constant, it's no longer needed
- update for moduselect moved to extmod/
- re-add support for UART REPL (MICROPY_STDIO_UART setting)
- enable UART REPL by default
- README: (re)add information about accessing REPL on serial
- make: rename "deploy" target to "deploy-ota"
- add targets to erase flash, deploy firmware using cc3200tool
- README: reorganize and update to the current state of affairs
- modwlan: add network.WLAN.print_ver() diagnostic function

esp8266 port:
- enable uselect module
- move websocket_helper.py from scripts to modules for frozen BC
- refactor to use extmod implementation of software SPI class
- mpconfigport_512k: disable framebuf module for 512k build
- enable native emitter for Xtensa arch
- enable inline Xtensa assembler
- add "ota" target to produce firmware binary for use with yaota8266
- use core-provided keyboard exception object
- add "erase" target to Makefile, to erase entire flash
- when doing GC be sure to trace the memory holding native code
- modesp: flash_user_start(): support configuration with yaota8266
- force relinking OTA firmware image if built after normal one
- scripts/inisetup: dump FS starting sector/size on error
- Makefile: produce OTA firmware as firmware-ota.bin
- modesp: make check_fw() work with OTA firmware
- enable utimeq module
- Makefile: put firmware-ota.bin in build/, for consistency
- modules/flashbdev: add RESERVED_SECS before the filesystem
- modules/flashbdev: remove code to patch bootloader flash size
- modules/flashbdev: remove now-unused function set_bl_flash_size
- modules/flashbdev: change RESERVED_SECS to 0

zephyr port:
- add .gitignore to ignore Zephyr's "outdir" directory
- zephyr_getchar: update to Zephyr 1.6 unified kernel API
- switch to Zephyr 1.6 unified kernel API
- support raw REPL
- implement soft reset feature
- main: initialize sys.path and sys.argv
- use core-provided keyboard exception object
- uart_core: access console UART directly instead of printk() hack
- enable slice subscription

docs:
- remove references to readall() and update stream read() docs
- library/index: elaborate on u-modules
- library/machine.I2C: refine definitions of I2C methods
- library/pyb.Accel: add hardware note about pins used by accel
- library/pyb.UART: added clarification about timeouts
- library/pyb.UART: moved writechar doc to sit with other writes
- esp8266/tutorial: update intro to add Getting the firmware section
- library/machine.I2C: fix I2C constructor docs to match impl
- esp8266/tutorial: close socket after reading page content
- esp8266/general: add "Scarcity of runtime resources" section
- library/esp: document esp.set_native_code_location() function
- library/esp: remove para and add further warning about flash
- usocket: clarify that socket timeout raises OSError exception

travis:
- build STM32 F7 and L4 boards under Travis CI
- include persistent bytecode with floats in coverage tests

examples:
- hwapi: button_led: Add GPIO pin read example
- hwapi: add soft_pwm example converted to uasyncio
- http_client: use read() instead of readall()
- hwapi: add uasyncio example of fading 2 LEDs in parallel
- hwapi: add example for machine.time_pulse_us()
- hwapi: add hwconfig for console tracing of LED operations
- accellog.py: change 1: to /sd/, and update comment about FS
- hwapi/hwconfig_console: don't alloc memory in value()

v1.8.6

Toggle v1.8.6's commit message
ESP8266 port uses SDK 2.0, has more heap, has support for 512k devices

This release brings some code size reductions to the core as well as
more tests and improved coverage which is now at 94.3%.

The time.ticks_diff(a, b) function has changed: the order of the arguments
has been swapped so that it behaves like "a - b", and it can now return a
negative number if "a" came before "b" (modulo the period of the ticks
functions).

For the ESP8266 port the Espressif SDK has been updated to 2.0.0, the
heap has been increased from 28k to 36k, and there is support for 512k
devices via "make 512k".  upip is included by default as frozen bytecode.
The network module now allows access-point reconnection without WiFi
credentials, and exposes configuration for the station DHCP hostname.  The
DS18B20 driver now handles negative temperatures, and NeoPixel and APA102
drivers handle 4 bytes-per-pixel LEDs.

For the CC3200 port there is now support for loading of precompiled .mpy
files and threading now works properly with interrupts.

A detailed list of changes follows.

py core:
- py.mk: automatically add frozen.c to source list if FROZEN_DIR is defined
- be more specific with MP_DECLARE_CONST_FUN_OBJ macros
- specialise builtin funcs to use separate type for fixed arg count
- {modbuiltins,obj}: use MP_PYTHON_PRINTER where possible
- modbuiltins: add builtin "slice", pointing to existing slice type
- add "delattr" builtin, conditional on MICROPY_CPYTHON_COMPAT
- sequence: fix reverse slicing of lists
- fix null pointer dereference in mpz.c, fix missing va_end in warning.c
- remove asserts that are always true in emitbc.c
- fix wrong assumption that m_renew will not move if shrinking
- change config default so m_malloc0 uses memset if GC not enabled
- add MICROPY_FLOAT_CONST macro for defining float constants
- move frozen bytecode Makefile rules from ports to common mk files
- strip leading dirs from frozen mpy files, so any path can be used

extmod:
- vfs_fat_file: check fatfs f_sync() and f_close() returns for errors
- vfs_fat_file: make file.close() a no-op if file already closed
- utime_mphal: ticks_diff(): switch arg order, return signed value
- utime_mphal: add MP_THREAD_GIL_EXIT/ENTER warppers for sleep functions
- utime_mphal: implement ticks_add(), add to all maintained ports
- utime_mphal: allow ticks functions period be configurable by a port

lib:
- utils/pyhelp.c: use mp_printf() instead of printf()
- utils/pyexec: add mp_hal_set_interrupt_char() prototype
- libm: move Thumb-specific sqrtf function to separate file

drivers:
- add "from micropython import const" when const is used

tools:
- upgrade upip to 1.1.4: fix error on unix when installing to non-existing
  absolute path
- pip-micropython: remove deprecated wrapper tool
- check_code_size.sh: code size validation script for CI
- replace upip tarball with just source file, to make its inclusion as
  frozen modules in multiple ports less magic

tests:
- extmod/vfs_fat: improve VFS test coverage
- basics/builtin_slice: add test for "slice" builtin name
- basics: add test for builtin "delattr"
- extmod/vfs_fat_fsusermount: improve fsusermount test coverage
- extmod/vfs_fat_oldproto: test old block device protocol
- basics/gc1: garbage collector threshold() coverage
- extmod/uhashlib_sha1: coverage for SHA1 algorithm
- extmod/uhashlib_sha256: rename sha256.py test
- btree1: fix out of memory error running on esp8266
- extmod/ticks_diff: test for new semantics of ticks_diff()
- extmod/framebuf1: test framebuffer pixel clear, and text function

minimal port:
- Makefile: split rule for firmware.bin generation

unix port:
- Makefile: remove references to deprecated pip-micropython
- modtime: use ticks_diff() implementation from extmod/utime_mphal.c
- mphalport.h: add warning of mp_hal_delay_ms() implementation
- modtime: switch ticks/sleep_ms/us() to utime_mphal
- fix symbol references for x86 Mac
- replace upip tarball with just source file

windows port:
- enable utime_mphal following unix, define mp_hal_ticks_*
- fix utime_mphal compilation for msvc
- implement mp_hal_ticks_cpu in terms of QueryPerformanceCounter

qemu-arm port:
- exclude ticks_diff test for qemu-arm port
- exclude extmod/vfs_fat_fileio.py test
- exclude new vfs_fat tests
- enable software floating point support, and float tests

stmhal port:
- modutime: refactor to use extmod's version of ticks_cpu
- refactor pin usage to use mp_hal_pin API
- led: refactor LED to use mp_hal_pin_output() init function
- Makefile: use standard rules for frozen module generation
- modutime: consistently convert to MP_ROM_QSTR/MP_ROM_PTR
- enable SD power save (disable CLK on idle)

cc3200 port:
- use mp_raise_XXX helper functions to reduce code size
- mods/pybspi: allow "write" arg of read/readinto to be positional
- enable loading of precompiled .mpy files
- fix thread mutex's so threading works with interrupts

teensy port:
- update to provide new mp_hal_pin_XXX functions following stmhal

esp8266 port:
- Makefile: use latest esptool.py flash size auto-detection
- esp_init_data: auto-initialize system params with vendor SDK 2.0.0
- esp8266.ld: move help.o to iROM
- esp8266.ld: move modmachine.o to iROM
- esp8266.ld: move main.o to iROM
- add MP_FASTCODE modifier to put a function to iRAM
- main: mark nlr_jump_fail() as MP_FASTCODE
- modules/webrepl: enforce only one concurrent WebREPL connection
- etshal.h: add few more ESP8266 vendor lib prototypes
- modesp: add flash_user_start() function
- add support for building firmware version for 512K modules
- scripts: make neopixel/apa102 handle 4bpp LEDs with common code
- modutime: consistently convert to MP_ROM_QSTR/MP_ROM_PTR
- modnetwork: config(): fix copy-paste error in setting "mac"
- scripts/port_diag: add descriptions for esf_buf types
- modnetwork.c: allows AP reconnection without WiFi credentials
- main: bump heap size to 36K
- etshal.h: add prototypes for SPIRead/SPIWrite/SPIEraseSector
- etshal.h: adjust size of MD5_CTX structure
- modules: fix negative temperature in ds18x20 driver
- rename "machine" module implementation to use contemporary naming
- rework webrepl_setup to run over wired REPL
- espneopixel.c: solve glitching LED issues with cpu at 80MHz
- include upip as a standard frozen bytecode module
- update docs for esptool 1.2.1/SDK 2.0 (--flash_size=detect)
- modnetwork.c: expose configuration for station DHCP hostname

zephyr port:
- implement utime module
- use board/SoC values for startup banner based on Zephyr config
- initial implementation of machine.Pin
- zephyr_getchar: update for recent Zephyr refactor of console hooks
- support time -> utime module "weaklink"
- README: update for the current featureset, add more info
- mpconfigport.h: move less important params to the bottom
- Makefile: allow to adjust heap size from make command line
- Makefile: update comments to the current state of affairs
- Makefile: allow to override Zephyr config from make command line
- Makefile: add minimal port
- Makefile: add -fomit-frame-pointer to reduce code size
- mphalport.h: update for new "unified" kernal API (sleep functions)

docs:
- machine.SPI: bring up to date with Hardware API, make vendor-neutral
- machine.SPI: improve descriptions of xfer methods
- library/builtins: add docs for delattr and slice
- library/network: reword intro paragraph
- library/network: typo fixes, consistent acronym capitalization
- library/index: update TOCs so builtins sorted before modules
- utime: document ticks_cpu() in more detail
- utime: describe new semantics of ticks_diff() (signed ring arithmetics)
- utime: add docs for ticks_add(), improvements for other ticks_*()
- esp8266: update for new WebREPL setup procedure
- */quickref.rst: use new semantics of ticks_diff()
- library/machine.Pin: update Pin docs to align with new HW API

travis:
- integrate tools/check_code_size.sh
- minimal: Use CROSS=1, for binary size check

examples:
- http_server_simplistic: add "not suitable for real use" note
- hwapi: example showing best practices for HW API usage in apps
- hwapi: add hwconfig for DragonBoard 410c

v1.8.5

Toggle v1.8.5's commit message
New port to Zephyr, upip runs on baremetal, and reduction in code size

This release adds a new port of MicroPython to run on top of the Zephyr
real-time operating system.  As part of this there is now basic support for
using mbedTLS as the ussl module.  The release also brings initial support
for running the package manager upip on baremetal systems with low heap
memory (such as esp8266), through a Python module interface.

Work has been done in this release to clean up the core, removing redundant
and/or unreachable code, and factoring existing duplicated code patterns.
This brings a reduction of 828 bytes in code size to the bare-arm port, and
1368 bytes to the minimal port.  There is also improved coverage through
the addition of new tests for corner cases.

The "micropython" module sees the addition of the "const" identity function
which should be used as "from micropython import const" in scripts that
want to use the MicroPython constant optimisations in the compile stage.
There is also the addition of the "opt_level" function to change the
parser/compiler optimisation level at runtime.

The behaviour of "sys.exit" (and "raise SystemExit") on baremetal is now
changed: this function no longer does a soft-reset of the board, rather it
just stops the running script and drops to the REPL.  In order to do an
actual soft reset the "machine.soft_reset" function has been added (to the
stmhal port only, for the time being).

Following CPython, KeyError exceptions for dictionary lookups now have the
failed key stored as the argument of the exception instance, accessible as
exc.args[0].  The "ujson.load" function has also been added, to load JSON
data from an arbitrary stream.

The I2C support in the machine module now has clock stretching, the
addition of the "addrsize" parameter in memory transfer methods, and I2C
scanning now uses dummy writes instead of dummy reads to make the scanning
more reliable.

The CMSIS library has been upgrade to v4.30, and the boards section of
the stmhal port has been refactored to use a common.ld script.  The stmhal
port now has a full implementation of the machine.SPI class, with support
for both hardware SPI peripherals and fast software SPI.  The USB HID
driver in stmhal has added support to receive USB HID messages from the
host.

py core:
- asmthumb: flush D-cache, and invalidate I-cache on STM32F7
- makeqstrdefs.py: use python 2.6 syntax for set creation
- objnone: remove unnecessary handling of MP_UNARY_OP_BOOL
- move frozen modules rules from esp8266 port for reuse across ports
- combine 3 comprehension emit functions (list/dict/set) into 1
- combine 3 comprehension opcodes (list/dict/set) into 1
- vstr: remove vstr.had_error flag and inline basic vstr functions
- objnone: use mp_generic_unary_op instead of custom one
- showbc: make printf's go to the platform print stream
- remove 'name' member from mp_obj_module_t struct
- builtinimport: fix nanbox build after change to better handle -m modules
- stream: remove unnecessary check for NULL return from vstr_extend
- py.mk: suppress some compiler warnings when building berkeley-db
- shrink mp_arg_t struct by using reduced-size integer members
- update opcode format table because 3 opcodes were removed, 1 added
- parse: only replace constants that are standalone identifiers
- py.mk: add support for building modussl_mbedtls
- only store the exception instance on Py stack in bytecode try block
- vm: use MP_OBJ_FROM_PTR to cast a type to an object
- modmicropython: add micropython.const, alias for identity function
- objstr: remove unreachable function used only for terse error msgs
- emitbc: remove/refactor unreachable code, to improve coverage
- objfun: remove unnecessary check for viper fun with 5 or more args
- objfun: use if instead of switch to check return value of VM execute
- objset: use mp_check_self() to check args of set/frozenset methods
- objset: ensure that use of frozenset.update raises an exception
- compile: fix async-for/async-with to work with simpler exc on stack
- scope: use lookup-table to determine a scope's simple name
- scope: shrink scope_t struct by 1 machine word
- scope: factor common code to find locals and close over them
- compile: fix typo when checking for parse-node kind
- argcheck: simplify if-chain so that the last one is the default
- objbool: defer bool's unary op implementation to small int
- objbool: make a slight simplification of bool constructor
- modstruct: remove unreachable code, and add comment about CPy diff
- add mp_raise_OSError(errno) helper function
- objstringio: add readinto() method
- modmicropython: add micropython.opt_level([value]) function
- compile: remove unreachable code
- mpz: in divmod, replace check for rhs!=0 with assert
- mpz: use assert to verify mpz does not have a fixed digit buffer
- factor duplicated function to calculate size of formatted int
- objint: use size_t for arguments that measure bytes/sizes
- compile: remove debugging code for compiler dispatch
- lexer: remove unnecessary code, and unreachable code
- vstr: combine vstr_new_size with vstr_new since they are rarely used
- objdict: fix optimisation for allocating result in fromkeys
- objdict: actually provide the key that failed in KeyError exception
- use mp_raise_msg helper function where appropriate
- add the module specified by -m to sys.modules as '__main__'

extmod:
- modussl_mbedtls: initial implementation of mbedTLS ussl module
- uctypes: allow full 32-bit address range
- modubinascii: fix crc32() function on 32-bit platforms
- modussl_mbedtls: implement key= and cert= args to wrap_socket()
- modussl_mbedtls: use 2-component include paths
- machine_i2c: add clock stretching support
- modussl_mbedtls: add server_hostname param for wrap_socket()
- uzlib: add tinfgzip.c (gzip header parsing) from upstream
- moduzlib: DecompIO: Add support for gzip-formatted streams
- uzlib/: update uzlib to v2.0.3
- vfs_fat: add fat_vfs_statvfs(), reused from stmhal
- machine_i2c: add support for the addrsize parameter in mem xfers
- machine_spi: simplify SPI xfer function to only take one buf len
- machine_spi: factor out software SPI code from esp8266 to extmod
- machine_spi: use delay_half, not baudrate, for internal timing
- machine_spi: add optional support for fast software SPI
- vfs_fat: use mp_raise_OSError helper function
- modlwip: use mp_raise_OSError helper function
- use mp_raise_OSError helper function
- vfs_fat_file: use MP_Exxx errno constants
- uzlib: update to upstream v2.1
- machine_i2c: use writes not reads in i2c.scan()
- vfs_fat: add file and directory checks for remove and rmdir
- modujson: implement ujson.load() to load JSON from a stream
- modujson: fix nanbox build
- utime_mphal: factor out implementations in terms of mp_hal_* for reuse
- utime_mphal: sleep_us/ms(): Don't wait on negative argument
- modussl_mbedtls: add dummy setblocking() method

lib:
- interrupt_char: factor out typical Ctrl+C handling from esp8266 port
- cmsis: move CMSIS headers to lib/
- cmsis: remove CMSIS-DSP headers, they are unused
- cmsis: upgrade CMSIS-CORE to V4.30
- utils/pyexec: don't treat SystemExit as "forced exit"
- utils/pyexec: allow behaviour of SystemExit to be configurable

drivers:
- dht: use mp_raise_OSError helper function

tools:
- update upip to 0.8, fixes IPv6 support
- upgrade upip to 1.0, fully self-hosted release (without fallbacks), and
  uses stream gzip decompression (step towards support for limited-heap
  baremetal systems)
- upgrade upip to 1.1.3, initial support for running on a baremetal,
  low-heap systems (like esp8266), using Python module interface

tests:
- pyb: add test for ExtInt when doing swint while disabled
- pyb: update exp file for previously updated extint test
- extmod/urandom: add urandom tests for error cases
- basics: add errno1 test, to check basics of uerrno module
- extmod: add test for machine.time_pulse_us()
- struct1: test "l" specifier to improve coverage
- array1: add tests for "l", "L" array types to improve coverage
- get cmdline verbose tests running again
- run-tests: add --via-mpy option to run test from precompiled code
- uzlib_decompio_gz: test for DecompIO with gzip bitstream
- basics: add test case for overflowing Py stack in try-finally
- micropython: add tests for const names being replaced in parser
- cmdline/cmd_showbc: fix test now that 1 value is stored on stack
- extmod/vfs_fat_ramdisk: add test for VFS.statvfs()
- float: add test for parsing a float from an empty string
- basics: add test for set.difference_update with arg being itself
- basics: add further tests for nonlocal scoping and closures
- import: add test for compiling "import a.b as c"
- basics: add test constructing a set from a non-trivial expression
- basics: add test for printing OSError when errno is unknown
- run-tests: disable cmdline/cmd_showbc test on Windows
- extmod/btree1: checks for put, seq, string print and unsupported binary op
- fix expected output of verbose cmdline test
- extmod/uzlib: test adaptive huffman tree for tinflate coverage
- improve coverage of struct with test for non-compliant behaviour
- io/write_ext: add description comment
- io/bytesio_ext: add test for readinto()
- micropython: add test for micropython.opt_level() function
- improve test coverage of py/compile.c
- extmod/vfs_fat: test coverage for remove() and rmdir()
- extmod: add test for ujson.load()
- extmod/vfs_fat: replace asserts with prints and expected outputs
- micropython: add tests for heap_lock, and emergency exceptions
- cmdline: improve coverage test for printing bytecode
- improve coverage of array, range, dict, slice, exc, unicode
- add test to print full KeyError exc from failed dict lookup
- run-tests: enable extmod/machine1.py on pyboard

unix port:
- fix build for when MICROPY_PY_SOCKET=0
- modjni: implement subscription for object arrays
- modjni: add array() top-level function to create Java array
- modjni: array(): Support creation of object arrays
- enable btree module for coverage build
- use mp_raise_OSError helper function
- use common RAISE_ERRNO macro from mphalport.h

windows port:
- enable MICROPY_PY_UERRNO

qemu-arm port:
- enable lots of extmods and enable tests for them

stmhal port:
- lcd: de-assert chip select after completing SPI transmission
- {accel,lcd}: use GPIO_{set,clear}_pin
- extint: force 0 to 1 transition on swint()
- boards: add pllvalues.py script to compute PLL values for sysclk
- boards: for OLIMEX_E407, enable UART1 and fix I2C1 mapping
- use attribute to avoid inlining
- put common definitions from linker files to common.ld
- remove STM32CubeF2 HAL files, they are unused/unsupported
- modmachine: fix clearing of reset-cause flags
- add virtual com port support for STM32L476DISC
- remove CMSIS STM32F2xx files, they are unused/unsupported
- spi: simplify spi_transfer function to take only one buf len arg
- mphalport: implement mp_hal_pin_{input,output,write}
- spi: make machine.SPI class conform to correct API
- mphalport: fix mp_hal_pin_write to use correct pin_mask
- spi: use software SPI if no periph id given, even if pins given
- spi: enable use of fast software SPI
- fix linker map for STM32L476 chips
- usbdev: add OUT endpoint to HID interface
- usb: add support to receive USB HID messages from host
- usb: use correct ClassData structure for HID receive
- usb: use real packet size (not maximum) in HID receive
- fix ESPRUINO_PICO by adding ld scripts with correct flash size
- mphalport: change pin obj type to const pointer, to avoid casts
- moduos: implement total-number-of-blocks field in statvfs
- disable network and usocket for ESPRUINO_PICO
- enable machine.time_pulse_us() function
- use mp_raise_OSError helper function
- pybstdio: use size_t instead of mp_uint_t
- modutime: refactor to use extmod/utime_mphal.c
- implement machine.soft_reset()
- enable str.center(), str.[r]partition() and builtin compile()

cc3200 port:
- add ssl_version argument to ssl.wrap_socket()

esp8266 port:
- Makefile: rename SCRIPTDIR to FROZEN_DIR for consistency with FROZEN_MPY_DIR
- ets_alt_task: ets_post: Should return 0 on success, !0 - failure
- esp_mphal: add tentative change to mp_hal_stdin_rx_chr() to wait IRQ
- extend system microsecond counter to 64-bits; use in ticks_ms
- add uos.statvfs() to get filesystem status
- moduos: move stat/statvfs funcs to sit within #if VFS guard
- modmachine: idle(): Return number of CPU cycles spent idling
- main: put /lib before / in sys.path
- modpybrtc.c: implement machine.RTC.alarm_left()
- make PY_UHASHLIB_SHA1 config depend on PY_USSL and SSL_AXTLS
- add FLASH_MODE,FLASH_SIZE options for make deploy target
- use mp_raise_OSError helper function
- make neopixel support configurable
- mpconfigport: enable MICROPY_PY_BUILTINS_SLICE_ATTRS
- enable sys.{stdin,stdout,stderr}.buffer for raw serial access
- enable importing of precompiled .mpy files
- enable micropython.alloc_emergency_exception_buf()

zephyr port:
- initial Zephyr RTOS port, MicroPython part
- initial Zephyr RTOS port, Zephyr part
- add zephyr_getchar module to handle console input
- switch to microkernel, required for network to work in background
- automatically derive ARCH
- support extra make targets
- Makefile: automatically derive target-specific CFLAGS
- use recently added "make outputexports" Zephyr target
- add README
- enable stack checking and micropython.mem_info()
- enable frozen modules support
- main: execute main.py frozen module on boot, if available
- zephyr_getchar: add support for Ctrl+C handling
- add Ctrl+C handling
- implement the help() function
- add copyright blurbs

README:
- remove issue-stats badges, the service is no longer available
- mention _thread module availability in select ports

docs:
- library/pyb.SPI: init(): describe "bits" argument
- library/machine: update description of disable/enable IRQ funcs
- uos: add uos.statvfs() documentation
- wipy: correct deep sleep current figure
- wipy: small doc fixes
- reference: add constrained.rst doc

travis:
- abandon mingw32 in favour of mingw-w64
- run feature and coverage test for precompiled mpy files

examples:
- network/http_client*: use \r\n line-endings in request