PYBD boards, BLE and littlefs, dynamic native modules, samd and powerpc
This release sees a reduction in overall bytecode size due to compression
of the bytecode prelude, saving 7 bytes of bytecode per function for
roughly 80% of functions. The bytecode opcode values are also redefined to
group them based on their argument size and format. Support is also added
for the matrix multiplication operator "@" (PEP 465).
The .mpy file format moved to version 5 to support the new bytecode
encoding, and added support for relocation of native machine code, along
with separate rodata and BSS sections. This allows a MicroPython system to
import dynamic native modules, .mpy files that are generated from C code.
Examples of this feature are provided in "examples/natmod/" and
documentation in "docs/develop/natmod.rst".
Some code-size saving optimisations were implemented leading to a reduction
in size of minimal firmware: bare-arm reduced by 584 bytes, minimal x86 by
5476 bytes (partly due to changed compiler optimisation flags) and minimal
ARM Thumb 2 by 1440 bytes (all measured with gcc 9.2.0).
A new mechanism to freeze scripts into firmware is provided - a frozen
manifest - whereby scripts to freeze are listed in a Python file (eg
manifest.py). All ports are updated to use this new feature.
When weak module links are enabled (via MICROPY_MODULE_WEAK_LINKS) an
import will now automatically search for the built-in u-variant of a module
if the non-u-variant fails (eg searches for "ufoo" if "foo" fails), so
ports no longer provide an explicit list of these. The unix and windows
ports now enable this feature.
A performance benchmarking test suite is added which can be used to compare
changes in absolute performance when optimising features, as well as
compare across different ports. See "tests/run-perfbench.py".
Bluetooth (BLE only) support is added via the "ubluetooth" module and
provides the ability to implement the four BLE roles. The BLE stack is
used is Mynewt Nimble and it currently runs on PYBD boards, STM32WB55 MCUs
and ESP32 boards.
Support for littlefs filesystems is added through the MicroPython VFS
interface, and it works on the unix, stm32, esp8266 and esp32 ports.
A new "machine.ADC.read_u16()" method is defined and implemented on stm32,
esp8266, esp32 and nrf ports, providing a consistent way to read an ADC
that returns a value in the range 0-65535. This new method should be
preferred to the existing "ADC.read()" method.
The stm32 port sees support for the new PYBD range of pyboards which
include a fully integrated CYW43xx WiFi/BT chip. USB is enhanced to
support VCP+MSC+HID mode and up to 3x simultaneous VCP interfaces. Support
is also added for STM32WBxx MCUs including BLE. There is a new machine.ADC
class which is compatible with other ports, along with a new machine.Timer
class that implements a software timer with millisecond resolution and
number of active timers only limited by RAM. Support for littlefs is
available by default via uos.VfsLfs2. Documentation for using littlefs is
found in "docs/reference/filesystem.rst".
The esp8266 port has switched to use per-board configurations and builds,
as well as the new frozen manifest feature. It also has optional littlefs
support (requires a separate build).
The esp32 port has the following new features: native code generation,
machine.SDCard, hardware I2C, mDNS queries and responder, esp32.Partition,
esp32.RMT, BLE (requires IDF v4), and built-in support for VfsLfs2. It has
switched to use per-board configurations and builds, and frozen manifests.
The default SSL output buffer is resized from 16kiB down to 4kiB to save
RAM.
There are new, minimal ports to Microchip SAMDxx microcontrollers, and
the bare metal PowerPC architecture.
A code-of-conduct based on the PSF's code is added in CODEOFCONDUCT.md.
The following new Git submodules are added: mbedtls, asf4, tinyusb,
mynewt-nimble. And a new third-party library: littlefs.
A detailed list of changes follows.
py core:
extmod:
data_alloc
length to truncate writeslib:
drivers:
tools:
tests:
mpy-cross:
all ports:
minimal port:
unix port:
windows port:
qemu-arm port:
stm32 port:
esp8266 port:
esp32 port:
javascript port:
nrf port:
powerpc port:
samd port:
zephyr port:
docs:
travis:
examples:
miscellaneous:
Improved mpy format with support for native code, and new JavaScript port
In this release the mpy file format has been moved to version 4 and has
some significant improvements: mpy file size is reduced on average by about
35%, loading time of mpy files is reduced by about 40%, and they now have
support to save native, viper and inline assembler code (or machine code
generated from any other source). Size reduction of mpy files was achieved
by adding a qstr window to reuse past qstrs when encoding them, by packing
qstrs directly in the bytecode, and by defining a static qstr set.
Some VM opcodes were also changed to fix a bug when doing a break/continue
out of a finally block, and to make some simplifications. In particular
POP_BLOCK and POP_EXCEPT opcodes were replaced with POP_EXCEPT_JUMP.
Most uppercase macros have been converted to lowercase to make a more
consistent C API, including all MP_OBJ_IS_xxx and MP_xxx_SLOT_IS_FILLED
macros.
The default PYTHON makefile variable is now changed from "python" to
"python3", but Python 2 is still supported via "make PYTHON=python2".
The mpy-cross compiler supports the new mpy version 4 and has new command
line options: "-march=" to select the native emitter, and "--version"
to print the MicroPython version and the mpy version. Also mpy-tool.py has
support for freezing native code.
A module system for external, user C modules has been implemented and
documentation for this is available in the new "docs/develop" section.
A new "javascript" port has been added which targets JavaScript as the
machine via Emscripten. This allows to run MicroPython as an application
within node.js, and to run it within a browser (among other things).
All bare-metal ports have the following improvements: machine.sleep() is
now machine.lightsleep(), and both lightsleep() and deepsleep() now take an
optional argument which is the maximum time to sleep in milliseconds.
These ports also now allow freezing of boot.py and main.py using the usual
methods. And a new I2C method i2c.writevto(addr, vect) is added which can
be used to write a tuple/list of buffers all at once to an I2C device.
The stm32 port now has a fully integrated Ethernet MAC driver (see the
network.LAN class) using lwIP for the TCP/IP stack, and sockets were made
significantly more robust. Support for F413 MCUs was added. There are
also some minor user-facing changes to this port:
For the esp32 port, the build process has been updated to align better with
the ESP IDF and now uses sdkconfig to configure features. Dual core mode
is now enabled by default, SPIRAM is in memory-mapped mode so all of it can
be used for the MicroPython heap, there is support to change the CPU
frequency, and the WDT now panics and resets the device if it times out.
A detailed list of changes follows.
py core:
extmod:
websocket
to uwebsocket
lib:
drivers:
tools:
tests:
mpy-cross:
all ports:
unix port:
windows port:
qemu-arm port:
stm32 port:
cc3200 port:
esp8266 port:
esp32 port:
javascript port:
nrf port:
zephyr port:
docs:
travis:
Vast improvements to native emitter, new nrf port, unified documentation
In this release there are a wide range of improvements and additions to
both the core and the ports. In the core the main improvement was to the
native emitter to have much more comprehensive support for general Python
features, such as generators and complex exception handling, and the
generated machine code is smaller and retains its efficiency. Elsewhere,
fuzzy testing was used to find and eliminate some corner-case bugs, user
classes were optimised when they don't use special accessors, underscores
in numeric literals are now supported (PEP515), and the uio.IOBase class
was added to allow user defined streams.
For the extended modules there is now a VfsPosix filesystem component,
a new ucryptolib module with AES support, addition of ure.sub() and of
uhashlib.md5, and the lwIP socket implementation now has working TCP
listen/accept backlog.
Compared to the last release the minimal baseline core code size is reduced
by about 2.2%, down by roughly 1500 bytes for bare-arm port and 3500 bytes
for minimal x86 port. Most other ports have increased in size due to the
addition of new features (eg ucryptolib, ure.sub).
The stm32 port sees the introduction of a new bootloader -- mboot -- which
supports DFU upload via USB FS, USB HS, as well as a custom I2C protocol,
and also support to program external SPI flash. There is significant
refactoring of the USB device driver, improved VCP throughput, and support
for 2x VCP interfaces on the one USB device. lwIP has been integrated, and
support added for SDRAM. Cortex-M0 CPUs are now supported along with
STM32F0 MCUs.
For the esp8266 port the heap is increased by 2kbytes, the radio is
automatically put to sleep if no WLAN interfaces are active, and the UART
can now be disconnected from the REPL and its RX buffer length configured.
Upon soft-reset sockets are now cleaned up.
The esp32 port has added support for external SPI RAM, PPPoS functionality,
improved performance and stability when using threads, and other general
bug fixes.
There is a new nrf port for Nordic MCUs, currently supporting nRF51x and
nRF52x chips.
The docs have now been unified so there is just one set of documentation
covering all ports. And initial documentation for the esp32 port is added.
There are two changes at the Python API level that are not backwards with
previous versions:
A detailed list of changes follows.
py core:
extmod:
lib:
drivers:
tools:
tests:
mpy-cross:
minimal port:
unix port:
windows port:
stm32 port:
cc3200 port:
esp8266 port:
esp32 port:
nrf port:
pic16bit port:
teensy port:
zephyr port:
docs:
travis:
examples:
README:
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:
extmod:
lib:
drivers:
tools:
tests:
minimal port:
unix port:
windows port:
qemu-arm port:
stm32 port:
teensy port:
esp8266 port:
esp32:
zephyr port:
docs:
travis:
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:
extmod:
lib:
drivers:
tools:
tests:
unix port:
stm32 port:
cc3200 port:
esp8266 port:
zephyr port:
pic16bit port:
docs:
travis:
examples:
all:
README:
.gitattributes:
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:
extmod:
lib:
drivers:
tools:
tests:
minimal port:
unix port:
stmhal port:
cc3200 port:
esp8266 port:
zephyr port:
docs:
all:
README:
CODECONVENTIONS:
travis:
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:
extmod:
lib:
tests:
unix port:
windows port:
qemu-arm port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
zephyr port:
docs:
examples:
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:
extmod:
lib:
drivers:
tools:
tests:
mpy-cross:
bare-arm port:
minimal port:
unix port:
windows port:
qemu-arm port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
zephyr port:
pic16bit port:
README:
travis:
gitattributes:
docs:
examples:
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:
extmod:
lib:
drivers:
tools:
tests:
unix port:
windows port:
stmhal port:
cc3200 port:
esp8266 port:
zephyr port:
docs:
travis:
examples:
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:
extmod:
lib:
drivers:
tools:
tests:
minimal port:
unix port:
windows port:
qemu-arm port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
zephyr port:
docs:
travis:
examples:
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:
extmod:
lib:
drivers:
tools:
tests:
unix port:
windows port:
qemu-arm port:
stmhal port:
cc3200 port:
esp8266 port:
zephyr port:
README:
docs:
travis:
examples:
Support for stream decompression in uzlib, and more ESP8266 features
This release includes some bug fixes, code clean-up, updates to the docs,
more tests, and various feature additions. The uzlib module now supports
efficient stream decompression in the form of the uzlib.DecompIO class.
Freezing of bytecode now supports floats for the ESP8266 port, as well as
complex numbers for all ports. The stmhal port has ADC working on L4
microcontrollers, fixed initialisation for DAC, and addition of the
machine.WDT class and machine.reset_cause function.
For the ESP8266 port Pin(16) now works as an input pin and the hardware
SPI peripheral is exposed as machine.SPI(1). The os.umount function is
implemented and the port supports mounting of externally connected SD
cards. The machine.WDT class is added, wlan.scan() is fixed to return all
access points, and there is support for DS18S20 devices.
py core:
extmod:
lib:
drivers:
tools:
tests:
unix port:
qemu-arm port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
docs:
misc:
Many small improvements and additions, with btree support in ESP8266 port
This release brings various improvements and additions to the core,
extended modules and the ESP8266 port, as well as enhancements to the docs.
There is now a "threshold" function in the gc module for the user to
configure the garbage collector to run earlier than usual, in order to help
reduce fragmentation of the heap. The btree module is now available in the
ESP8266 port, and there is improved WebREPL file transfer: get file is now
non-blocking (this change requires an update of the client software).
py core:
extmod:
lib:
tests:
mpy-cross:
minimal port:
unix port:
stmhal port:
esp8266 port:
docs:
misc:
examples:
qemu-arm:
Thread support, ESP8266 memory improvements, btree module, improved docs
This release brings multi-threading support in the form of the _thread
module, which closely matches the semantics of the corresponding CPython
module. There is support for GIL and non-GIL builds; without the GIL
enabled one must protect concurrent access to mutable Python state at the
Python level using Lock objects. Threading with the GIL is enabled in
the cc3200 port on the WiPy. Threading without the GIL is enabled on the
unix port. The ESP8266 port has support for frozen bytecode (for scripts
in the modules/ subdirectory), as well as optimisations for reduced
memory usage and decreased memory fragmentation. The ESP8266 RTC also
resumes correctly after a deepsleep. An initial "btree" module has been
implemented for database support (unix port only), and the documentation
has been further improved, with pre-built PDF versions of the docs now
available.
py core:
extmod:
lib:
drivers:
tests:
unix port:
windows port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
qemu-arm port:
docs:
examples:
Many ESP8266 improvements, enhanced WebREPL, and support for STM32L4 MCUs
This release brings general improvements and bug fixes, and some new
features. There is now a uerror module for consistent errno handling
across ports, as well as textual names of OS errors that are printed when
an OSError is raised. There is support for frozen packages, via both
frozen scripts and frozen bytecode. WebREPL on the ESP8266 is greatly
improved with many bug fixes and now supports an unlimited (or very large)
number of reconnects. The os module on the ESP8266 now has rename, chdir,
getcwd and stat. The unix port now includes the ussl module by default.
The stmhal port has support for STM32L4 MCUs including the STM32L476
Discovery board and the LimiFrog board.
README:
CODECONVENTIONS.md:
py core:
extmod:
lib:
drivers:
tools:
tests:
mpy-cross:
unix port:
windows port:
stmhal port:
esp8266 port:
docs:
travis:
First general release of ESP8266 port, and support for frozen bytecode
This release marks the first general release of official ESP8266 support
within the MicroPython code base. The ESP8266 port has many improvements
and additions, including: websocket and webrepl modules, deep-sleep mode,
reading on UART, enhanced I2C support, enhanced network configuration,
full sequence of start-up scripts (built-in _boot.py, boot.py and
main.py), improved filesystem support with automatic flash-size detection
as well as documentation and a tutorial.
Known issues with ESP8266 port are:
In addition to ESP8266 support, this release brings frozen bytecode
which allows to compile bytecode offline and link it into the firmware,
completely eliminating the need for compilation (and the associated
RAM usage) at runtime. Basic async/await syntax is now supported, and
qstrs are now auto-generated in the build system.
A detailed list of changes is given below.
README:
ACKNOWLEDGEMENTS:
py core:
extmod:
lib:
drivers:
tools:
tests:
minimal port:
unix port:
windows port:
stmhal port:
cc3200 port:
esp8266 port:
docs:
examples:
New MicroPython cross-compiler, and vastly improved ESP8266 port
This release adds the MicroPython cross-compiler that can generate .mpy
files (pre-compiled bytecode) which can be executed within any
MicroPython runtime/VM. The ESP8266 port is also vastly improved thanks
to a hugely successful Kickstarter campaign. This port now has an
alternative event loop implementation to allow proper Berkeley sockets
using lwIP built from source, and a greatly improved network module.
Many extension modules are now enabled (ujson, ubinascii, uctypes,
uhashlib, urandom, uheapq, ure, uzlib) and the machine module includes
Timer, Pin, PWM, ADC, I2C, SPI, and basic UART. Bignums are supported,
along with 30-bit precision floating point, and normal error messages.
There is FatFS support and uos.dupterm.
Many other improvements and bug fixes have been made to the core and
other ports. The basic test suite can now run within a 16k heap. Inline
assembler functions now support 4 arguments. The Unix port has the -i
option to start the REPL after a script is finished. The stmhal port now
exposes the flash and SD card as proper objects with the block protocol.
There is support for generic STM32F439 boards, the NUCLEO-F411RE board,
and targets to deploy via ST-LINK and OpenOCD.
py core:
extmod:
lib:
drivers:
tests:
mpy-cross:
unix port:
stmhal port:
qemu-arm port:
cc3200 port:
esp8266 port:
examples:
docs:
IPv6 support in unix, bignum constant folding, urandom module, faster VCP
In this release there are many bug fixes and consolidation of previous
features. Constant folding in the parser can now operate on arbitrary
precision integers, and the inline assembler is no longer restricted to
using small-ints or 30-bits. The urandom module has been added with the
most useful random functions included. The uhashlib module now
implements SHA1. The Unix port supports IPv6. The stmhal port has much
faster USB VCP for board to PC transfers, and Timer(3) is now freed up
for general purpose use by the user.
py core:
extmod:
tests:
minimal port:
unix port:
windows port:
stmhal port:
docs:
travis:
64-bit NaN-boxing, FreeDOS target, and PYBv1.1 and PYBLITEv1.0 boards
This release brings a new object model for 64-bit NaN-boxing on 32-bit
architectures, while allows double precision floating point numbers to
be used without allocating on the heap. Unix and Windows ports have
better handling of Ctrl-C, and there is now a FreeDOS target within the
unix Makefile. Windows (msvc) builds are now checked using Appveyor CI.
The stmhal port has new board config files for then next version of the
pyboard, PYBv1.1 and PYBLITEv1.0, as well as config files for the
STM32F429 discovery kit. There is now delayed RTC initialisation with
LSI fallback, and DMA support for the SD card. The DMA controllers are
turned off if DMA is idle for 100 msec or more, saving power.
py core:
extmod:
lib:
tools:
tests:
unix port:
windows port:
stmhal port:
cc3200 port:
esp8266 port:
docs:
pic16bit:
ports:
LwIP support, and preliminary implementation of persistent bytecode
This release includes the lwip network stack module with slip support.
There is a preliminary implementation of persistent bytecode which allows
to save compiled bytecode to a .mpy file, to be loaded at a later time by
another MicroPython instance. Double precision floating-point formatting
is now provided by the core, and the bundled upip module is no longer
dependent on FFI. stmhal port has improved RTC startup. There are many
bug fixes and improvements to the documentation.
py core:
extmod:
lib:
tools:
tests:
minimal port:
unix port:
windows port:
stmhal port:
cc3200 port:
teensy port:
esp8266 port:
examples:
docs: