MyGit

v1.18

micropython/micropython

版本发布时间: 2022-01-17 07:37:48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The zephyr port upgraded Zephyr to v2.7.0.

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

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

The changes that dominate these numbers are:

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

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

Main components

all:

py core:

extmod:

shared:

drivers:

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

lib:

Support components

docs:

examples: no changes specific to this component/port

tests:

tools:

CI:

The ports

all ports:

bare-arm port:

cc3200 port: no changes specific to this component/port

esp8266 port:

esp32 port:

javascript port: no changes specific to this component/port

mimxrt port:

minimal port:

nrf port:

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:

samd port:

stm32 port:

teensy port:

unix port:

windows port:

zephyr port:

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

1、 micropython-1.18.tar.xz 56.88MB

2、 micropython-1.18.zip 112.95MB

查看:2022-01-17发行的版本