MyGit

v1.13

micropython/micropython

版本发布时间: 2020-09-02 10:31:58

micropython/micropython最新发布版本:v1.23.0(2024-05-31 13:03:47)

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:

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

Main components

all:

py core:

extmod:

lib:

drivers:

mpy-cross:

Support components

docs:

examples:

tests:

tools:

CI:

The ports

all ports:

cc3200 port: no changes specific to this port

esp8266 port:

esp32 port:

javascript port: no changes specific to this port

mimxrt port:

minimal port:

nrf port:

pic16bit port: no changes specific to this port

powerpc port:

qemu-arm port:

samd port:

stm32 port:

teensy port: no changes specific to this port

unix port:

windows port:

zephyr port:

相关地址:原始地址 下载(tar) 下载(zip)

1、 micropython-1.13.tar.gz 91.42MB

2、 micropython-1.13.zip 102.9MB

查看:2020-09-02发行的版本