v1.12
版本发布时间: 2019-12-20 15:34:44
micropython/micropython最新发布版本:v1.23.0(2024-05-31 13:03:47)
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:
- nativeglue: make private glue funs all static, remove commented code
- nativeglue: remove dependency on mp_fun_table in dyn-compiler mode
- obj: optimise small-int comparison to 0 in mp_obj_is_true
- nlrthumb: save and restore VFP registers s16-s21 when CPU has them
- mkrules.mk: use $(CPP) not $(CC) -E for preprocessor rule
- define EMIT_MACHINE_CODE as EMIT_NATIVE || EMIT_INLINE_ASM
- persistentcode: fix compilation with load and save both enabled
- persistentcode: ensure prelude_offset is always initialised
- asmarm: use __clear_cache on Linux/GCC when creating new asm code
- nlrthumb: check thumb2 instead of ARM_ARCH_6M
- objgenerator: add missing #if guard for PY_GENERATOR_PEND_THROW
- asmarm: use __builtin___clear_cache instead of __clear_cache
- makeqstrdata.py: allow using \r\n as a qstr if a port requires it
- scheduler: rename sched_stack to sched_queue
- objstringio: guard bytesio_stream_p struct w/ MICROPY_PY_IO_BYTESIO
- objdict: quote non-string types when used as keys in JSON output
- builtinimport: populate file when importing frozen or mpy files
- runtime: allow to override builtins.import with Python func
- modio: call mp_import_name to do resource stream import
- allow to pass in read-only buffers to viper and inline-asm funcs
- showbc: fix off-by-one when showing address of unknown opcode
- implement new sys.atexit feature
- objarray: fix amount of free space in array when doing slice assign
- modmath: implement math.isclose() for non-complex numbers
- introduce MP_UNREACHABLE macro to annotate unreachable code
- nlr: use MP_UNREACHABLE at the end of arch-specific nlr_jump funcs
- compile: improve the line numbering precision for comprehensions
- emitbc: rewrite switch in load_const_tok to reduce code size
- emitbc: make all emit_write_bytecode_* funcs take a stack_adj arg
- objgenerator: move defn of mp_const_GeneratorExit_obj here
- vm: shorten error message for not-implemented opcode
- vm: don't add traceback info for exc's propagated through a finally
- vm: don't add traceback info for exceptions that are re-raised
- add global default_emit_opt variable to make emit kind persistent
- compile: improve the line numbering precision for lambdas
- bc: factor out code to get bytecode line number info into new func
- profile: add initial implementation of sys.settrace feature
- integrate sys.settrace feature into the VM and runtime
- profile: add debugging for sys.settrace feature
- objtuple: allow compatible subclasses of tuple in mp_obj_tuple_get
- modstruct: fix struct.unpack with unaligned offset of native type
- modstruct: fix struct.pack_into with unaligned offset of native type
- binary: change mp_uint_t to size_t for index, size, align args
- bc: fix size calculation of UNWIND_JUMP opcode in mp_opcode_format
- mkenv.mk: add GDB variable
- vm: factor cached map lookup code to inline function
- mkrules.mk: add QSTR_GLOBAL_REQUIREMENTS variable for qstr auto-gen
- persistentcode: enable persistent code saving for Windows ports
- lexer: reorder operator tokens to match corresponding binary ops
- parse: use calculation instead of table to convert token to operator
- compile: use calculation instead of switch to convert token to op
- add support for matmul operator @ as per PEP 465
- bc0: order opcodes into groups based on their size and format
- bc: replace big opcode format table with simple macro
- introduce and use constants for multi-opcode sizes
- split RAISE_VARARGS opcode into 3 separate ones
- nlr.h: factor out constants to specific macros
- emitnative: factor sizeof/offsetof calculations to macros
- rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions
- nativeglue: make mp_fun_table fixed size regardless of config
- persistentcode: bump .mpy version to 5
- ringbuf: add helpers for put16/get16
- bc: change mp_code_state_t.exc_sp to exc_sp_idx
- add n_state to mp_code_state_t struct
- compress first part of bytecode prelude
- rework and compress second part of bytecode prelude
- bc: don't include mp_decode_uint funcs when not needed
- compile: disallow 'import *' outside module level
- makeqstrdefs.py: remove unused blacklist
- vm: fix handling of unwind jump out of active finally
- runtime: fix PEP479 behaviour throwing StopIteration into yield from
- emitnative: add support for archs with windowed registers
- emitnative: add support for using setjmp with native emitter
- emitnative: add support for archs that cannot read executable data
- asmxtensa: add support for Xtensa with windowed registers
- add new Xtensa-Windowed arch for native emitter
- persistentcode: make .mpy more compact with qstr directly in prelude
- objtype: add type.bases attribute
- mkrules.mk: add warning/error for invalid frozen config
- objstr: size-optimise failure path for mp_obj_str_get_buffer
- automatically provide weak links from "foo" to "ufoo" module name
- modarray: rename "array" module to "uarray"
- runtime: reorder some binary ops so they don't require conditionals
- stream.h: add MP_STREAM_POLL_NVAL constant
- nativeglue: remove unused mp_obj_new_cell from mp_fun_table
- objgenerator: remove globals from mp_obj_gen_instance_t
- objgenerator: allow pend_throw to an unstarted generator
- persistentcode: move declarations for .mpy header from .c to .h file
- modsys: report .mpy version in sys.implementation
- emitnative: fix typo, REG_PARENT_ARG_RET should be REG_PARENT_RET
- emitnx86: make mp_f_n_args table match order of mp_fun_kind_t
- objdict: support ujson.dump() of OrderedDict objects
- ringbuf: add peek16 method
- compile: coalesce error message for break/continue outside loop
- builtinimport: raise exception on empty module name
- qstr: raise exception in qstr_from_strn if str to intern is too long
- objstringio: slightly optimize stringio_copy_on_write for code size
- objenumerate: check for valid args in enumerate constructor
- persistentcode: add ability to relocate loaded native code
- nativeglue: add new header file with native function table typedef
- nativeglue: add funcs/types to native glue table for dynamic runtime
- persistentcode: make ARM Thumb archs support multiple sub-archs
- nativeglue: add float new/get functions with both single and double
- dynruntime: add support for float API to make/get floats
- dynruntime: implement uint new/get, mp_obj_len and mp_obj_subscr
- persistentcode: move loading of rodata/bss to before obj/raw-code
extmod:
- add network-level class binding to cyw43 driver
- factor out makefile rules from py.mk to new extmod.mk file
- extmod.mk: integrate mbedTLS so it is built from source
- modussl_mbedtls: allow to build with object representation D
- extmod.mk: include mdns app source in lwIP build
- uos_dupterm: add mp_uos_dupterm_poll to poll all dupterms
- moduwebsocket: make close_resp static array const to not use RAM
- modwebrepl: make prompt/ver static arrays const to not use RAM
- modwebrepl: add config option to put filebuf[512] on stack/bss
- modlwip: for TCP send keep trying tcp_write if it returns ERR_MEM
- modlwip: use mp_sched_schedule to schedule socket callbacks
- modlwip: implement raw sockets for lwIP
- modure: make regex dump-code debugging feature optional
- moducryptolib: use "static" not "STATIC" for inline functions
- give vars/funcs unique names so STATIC can be set to nothing
- modujson: support passing bytes/bytearray to json.loads
- crypto-algorithms: add source to header and populate copyright
- vfs_posix: include stdio.h for declaration of function 'rename'
- nimble: add nimble bindings
- modbluetooth: add low-level Python BLE API
- modbluetooth_nimble: implement modbluetooth API with Nimble
- modbluetooth_nimble: use random addr if public isn't available
- modbluetooth: allow MP_BLUETOOTH_MAX_ATTR_SIZE in board config
- modbluetooth: allow config of scan interval/window
- modbluetooth: use us instead of ms for advertising interval
- modbluetooth: increase maximum connections from 1 to 4
- modbluetooth: clear gap_advertise payload when data is empty
- modbluetooth: fix order of params to IRQ_GATTS_WRITE event
- modbluetooth: improve ringbuf handling
- modbluetooth: make gap_disconnect not raise when disconnected
- modbluetooth: in gap_advertise only accept None to stop adv
- re1.5: support escaping within RE classes
- modbluetooth: make UUID support the buffer protocol
- modbluetooth: persist reference to NimBLE service instances
- modbluetooth_nimble: use
data_alloc
length to truncate writes - modbluetooth: rename module to "ubluetooth"
- factor out block-device struct to make independent of fatfs
- vfs_blockdev: factor out block device interface code
- vfs_blockdev: add extended read/write methods
- add VFS littlefs bindings
- vfs: rename BP_IOCTL_xxx constants to MP_BLOCKDEV_IOCTL_xxx
- vfs: add MP_BLOCKDEV_IOCTL_BLOCK_ERASE constant
- modbluetooth: add gatts_set_buffer
- vfs_lfs: allow compiling in VfsLfs1 and VfsLfs2 separately
- modlwip: unconditionally return POLLHUP when polling new socket
- modlwip: make socket poll return POLLNVAL in case of bad file
- modlwip: unconditionally return POLLHUP/POLLERR when polling
- modussl_mbedtls: fix getpeercert to return None if no cert avail
- modussl_mbedtls: check for invalid key/cert data
- nimble: remove unneeded nimble_sprintf wrapper function
- nimble: factor out stm32-specific HCI UART RX/TX code
- modbtree: make FILEVTABLE const to put it in ROM
- convert nlr_raise(mp_obj_new_exception_msg(x)) to mp_raise_msg(x)
- vfs: add autodetect of littlefs filesystem when mounting
- consolidate FAT FS config to MICROPY_VFS_FAT across all ports
- modbluetooth: prioritise non-scan-result events
- modbluetooth: create UUID from bytes and allow comparison ops
- modbluetooth_nimble: make gap_scan_stop no-op if no scan ongoing
- modbluetooh_nimble: fix UUID conversion for 16 and 32 bit values
- modbluetooth: simplify management of pre-allocated event data
- vfs_lfs: pass flag along to ioctl when init'ing bdev for lfs
- vfs_lfs: fix bug when passing no args to constructor and mkfs
- modbluetooth: simplify how BLE IRQ callback is scheduled
- modbluetooth: remove limit on data coming from gattc data input
- modbluetooth: add optional 4th arg to gattc_write for write mode
- modbluetooth: allow setting ringbuf size via BLE.config(rxbuf=)
- modbtree: use mp_printf instead of printf
- add dynamic-runtime guards to btree/framebuf/uheapq/ure/uzlib
- webrepl: move webrepl scripts to common place and use manifest
lib:
- cmsis: upgrade to CMSIS 5.5.1
- netutils: add DHCP server component
- add new submodule for mbedtls, currently at v2.17.0
- utils/sys_stdio_mphal: add support to poll sys.stdin and sys.stdout
- add asf4 as a submodule
- add tinyusb as a submodule
- stm32lib: update library for updated H7xx, new L0xx, new WBxx
- lwip: update lwIP to v2.1.2, tag STABLE-2_1_2_RELEASE
- mynewt-nimble: add Apache mynewt nimble as a submodule
- littlefs: add littlefs v1.7.2 source
- littlefs: add littlefs v2.1.3 source
- littlefs: add README describing origin and how to gen lfs1/lfs2
- libc/string0: add simple implementations of strspn and strcspn
drivers:
- add driver for CYW43xx WiFi SoCs
- memory/spiflash: add support to put SPI flash in sleep mode
- cyw43: add low-level CYW43xx Bluetooth HCI UART driver
- onewire/ds18x20.py: add support for DS1822 sensor
- sdcard: raise exception on timeout of readinto
- wiznet5k: allow selecting maximum fixed buffer size for MACRAW
tools:
- mpy-tool.py: fix linking qstrs in native code, and multiple files
- mpy-tool.py: fix linking of qstr objects in native ARM Thumb code
- add uf2conv.py from Microsoft/uf2 repository
- pyboard.py: add filesystem commands to ls/cat/cp/rm remote files
- mpy-tool.py: force native func alignment to halfword/word on ARM
- mpy-tool.py: add initial support for frozen with settrace
- mpy-tool.py: fix freezing of non-bytecode funcs with settrace
- make-frozen.py: allow to run with no directory passed in
- add mechanism to provide a manifest of frozen files
- makemanifest.py: eval relative paths w.r.t. current manifest file
- mpy-tool.py: use "@progbits #" attribute for native xtensa code
- makemanifest.py: follow symlinks when freezing linked directories
- makemanifest.py: skip freezing unsupported files with warning
- makemanifest.py: use sys.executable when invoking Python scripts
- mpy-tool.py: support qstr linking when freezing Xtensa native mpy
- mpy-tool.py: add ability to merge multiple .mpy files into one
- mpy_ld.py: add new mpy_ld.py tool and associated build files
- mpy-tool.py: raise exception if trying to freeze relocatable mpy
- pyboard.py: support executing .mpy files directly
- tinytest-codegen.py: add extra newline and result message
tests:
- rename "bench" tests to "internal_bench" and run-internalbench.py
- add performance benchmarking test-suite framework
- perf_bench: add some benchmarks from python-performance
- perf_bench: add some miscellaneous performance benchmarks
- perf_bench: add some viper performance benchmarks
- stress/recursive_iternext.py: increase large depth to 5000
- run-perfbench.py: add --emit option to select emitter for tests
- add tests for overriding builtins.import
- misc/sys_atexit: add test for new sys.atexit feature
- unix: update extra_coverage expected output with new atexit func
- extmod: split json.loads of bytes/bytearray into separate test
- split out test for optimisation level and line-no printing
- add tests for sys.settrace feature
- basics: add test for matmul operator
- update tests for changes to opcode ordering
- micropython: add test for native generators
- basics: add test for getting name of func with closed over locals
- basics: add test for throw into yield-from with normal return
- perf_bench: add bm_fft test
- run-perfbench.py: show error when truth check fails
- run-perfbench.py: skip complex tests if target doesn't enable it
- cpydiff: fix typo in types_bytes_keywords.py doc comments
- rename "array" module to "uarray"
- extmod: add littlefs tests
- extmod: add test for blockdev with standard and extended protocol
- basics: use str.format instead of % for formatting messages
- basics/builtin_dir.py: look for "version" in dir(sys)
- add feature check for bytearray and skip corresponding tests
- basics: split out specific bytearray tests to separate files
- basics: use bytes not bytearray when checking user buffer proto
- add feature check for slice and skip corresponding tests
- basics: split out specific slice tests to separate files
- run-tests: add misc list of tests that use slice, to skip them
- basics: automatically skip tests that use str/bytes modulo-format
- add feature check for uio module and skip corresponding tests
- basics: split sys.exit test to separate file so it can be skipped
- extmod: add test for ussl when passing in key/cert params
- stress: add test for maximum length limit of qstrs
- import: add test for importing viper code with additional flags
- add script to run dynamic-native-module tests
- add .exp files for basics/parser and import/import_override
- stress/qstr_limit: tune params to run with stm32 port
- basics/memoryview_itemsize: make portable to 32- and 64-bit archs
- extmod/vfs_lfs_error: use small ints in seek error test
- pyb: refactor pyboard tests to work on PYBv1, PYBLITEv1 and PYBD
mpy-cross:
- do not automatically build mpy-cross, rather do it manually
- main: only accept full emit cmdline options if native enabled
- make mpconfigport.h compatible with msvc compiler
- add msvc build of mpy-cross
- set number of registers in nlr_buf_t based on native arch
- enable Xtensa-Windowed native emitter
- support armv7em, armv7emsp, armv7emdp architectures
- README.md: add notes about -march and -O
all ports:
- provide mp_hal_stdio_poll for sys.stdio polling where needed
- add new make target "submodules" which inits required modules
minimal port:
- use soft float for CROSS=1 Cortex-M4 target
- frozentest: recompile now that mpy version has changed
- set CSUPEROPT=-Os to get minimal firmware size
unix port:
- mpconfigport.mk: update comment about TLS implementations
- unix_mphal: use CLOCK_MONOTONIC for ticks_ms/us when available
- enable sys.atexit, triggered after the main script ends
- main: only accept full emit cmd-line options if native enabled
- coverage: add coverage tests for ringbuf
- convert to use FROZEN_MANIFEST to specify frozen code
- enable module weak links
- enable uos.VfsLfs1, uos.VfsLfs2 on coverage build
- modtermios: fix output speed setter in tcsetattr
windows port:
- mpconfigport.h: define empty MP_WEAK symbol
- mpconfigport.h: don't define restrict/inline/alignof for C++
- msvc: treat compiler warnings as errors
- Makefile: make use of CFLAGS_EXTRA, LDFLAGS_EXTRA and SRC_MOD
- msvc: remove unneeded definitions for qstr generation
- msvc: move build options from .vcxproj to .props files
- msvc: enable overriding directories used in the build
- msvc: change the way sources are listed
- default to binary mode for files
- enable module weak links
qemu-arm port:
- add testing of frozen native modules
- convert to use FROZEN_MANIFEST to specify frozen code
- add ldscript dependency in the final firmware.elf target
- let tinytest.o be built by standard build rules
- Makefile: allow overriding CROSS_COMPILE from another makefile
stm32 port:
- usb: refactor CDC VCP code to enable N CDC interfaces
- usb: support up to 3 VCP interfaces on USB device peripheral
- boards/make-pins.py: allow pins.csv to skip or hide board-pin name
- boards/pllvalues.py: search nested headers for HSx_VALUE defines
- boards: add board definition files for PYBD -SF2, -SF3, -SF6
- modpyb: add pyb.country() function to set the country
- extint: add extint_set() function for internal C access to EXTI
- mphalport: add support for having MAC in OTP region
- add low-level SDIO interface for cyw43 driver
- integrate in the cyw43 driver and network.WLAN class
- boards/PYBD_SFx: enable CYW43 WLAN driver
- modnetwork: replace generic netif NIC polling with specific code
- integrate optional mbedTLS component for ussl module
- boards/PYBD_SFx: enable ussl module using mbedTLS
- support optional lwIP mDNS responder
- lwip_inc: update to enable mDNS, TCP listen backlog, faster DHCP
- usbd_msc: rework USBD MSC code to support multiple logical units
- usbd_msc: provide custom irquiry processing by MSC interface
- usbd_msc: provide Mode Sense response data in MSC interface
- usb: use ARG_xxx enums to access kw args in pyb_usb_mode
- usb: add "msc" kw-arg to pyb.usb_mode to select MSC logical units
- usbd_msc: allow to compile when USB enabled and SD card disabled
- in link script, define start of stack separately from heap end
- boards: enable ussl module via mbedtls for boards with network
- Makefile: print info messages about use of mboot/QSPI flash
- enter bootloader via a system reset
- boards/pllvalues.py: support HSx_VALUE defined without uint32_t
- boards: add stm32??xx_hal_conf_base.h files with common settings
- boards: rework all stm32??xx_hal_conf.h files to use common code
- usb: fix regression with auto USB PID value giving PID=0xffff
- boards: optimise flash and RAM allocation for L4 boards
- mpu: add helper functions for configuring MPU
- eth: use MPU helper functions to configure MPU for ETH use
- sdram: use MPU helper functions to configure MPU for SDRAM use
- qspi: use MPU to allow access to valid memory-mapped QSPI region
- qspi: force a reset of the QSPI peripheral when initialising it
- qspi: handle bus acquisition
- powerctrl: add hooks for a board to perform actions on sleep/wake
- boards/PYBD_SFx: put SPI flash to sleep during sleep modes
- mpconfigport.h: enable useful networking modules if lwIP enabled
- usb: add support to auto-detect USB interface, either FS or HS
- usb: add "port" keyword argument to pyb.usb_mode, to select FS/HS
- spi: factor out code to calculate SPI source frequency
- extint: simplify bitband support config for different MCUs
- modmachine: make RTC class available in machine module
- boards/PYBD_SF2: put mbedtls library code in external QSPI flash
- update components to work with new H7xx HAL
- Makefile: remove Wno-attributes for ll_usb HAL file
- Makefile: use startup_stm32*.s file from stm32lib
- boards: remove startup_stm32*.s files now they are in stm32lib
- mpu: include MPU functions when ETH is enabled
- lwip_inc: define LWIP_NO_CTYPE_H=1 to use lwIP ctype funcs
- modmachine: disable IRQs before entering bootloader
- boards/PYBD_SFx: configure EN_3V3 pin as output on boot
- sdcard: add hook for a board to power on SD/MMC
- boards/PYBD_SFx: automatically turn on EN_3V3 when powering SD/MMC
- add initial support for STM32L0xx MCUs
- boards: add MCU support files for STM32L072
- mpconfigport.h: make "framebuf" module configurable by a board
- boards/NUCLEO_L073RZ: add definition files for new board
- powerctrl: move L0's SystemClock_Config to powerctrlboot.c file
- powerctrl: move F0's SystemClock_Config to powerctrlboot.c
- remove SystemInit funcs, use stm32lib versions instead
- boards/NUCLEO_F446RE: enable DAC
- add support for STM32L452 MCUs
- boards/NUCLEO_L452RE: add definition files for new board
- boards/NUCLEO_F413ZH: remove STARTUP_FILE, it's defined globally
- mboot: make _estack an array to avoid compiler warnings
- mboot: remove use of BSRRL/H for H7 MCUs due to stm32lib update
- mboot: use STARTUP_FILE from stm32lib
- mboot: update dependencies to enable parallel build with -j
- boards/B_L072Z_LRWAN1: add definition files for new board
- gccollect: always use MP_STATE_THREAD(stack_top) to get stack top
- usb: add config options to disable USB MSC and/or HID
- usbd_cdc_interface: make CDC TX/RX buffer sizes configurable
- add support for USB on L0 MCUs
- powerctrlboot: increase SYSCLK to 32MHz for L0 MCUs
- mphalport: fix GPIO clock enable for L0 MCUs
- Makefile: allow a board to disable float support
- boards/B_L072Z_LRWAN1: enable USB VCP support
- boards/STM32F769DISC: fix length of FLASH_APP section
- make-stmconst.py: allow more variation in parens and int-suffix L
- add initial support for STM32WBxx MCUs
- boards: add MCU support files for STM32WB55
- boards/NUCLEO_WB55: add definition files for new board
- boards/USBDONGLE_WB55: add definition files for new board
- flashbdev: support internal filesystem on STM32F722/23/32/33
- boards/stm32f722.ld: provide memory regions for internal FS
- boards/NUCLEO_F722ZE: add definition files for new board
- dma: fix re-start of DMA stream by clearing all event flags
- usbd_hid_interface: rewrite USB HID interface code
- boards/xxx_WB55: enable USB HID now that it works on WB MCUs
- usbd_hid_interface: include extra header to build with threading
- lwip_inc: enable raw socket type
- mpconfigport.h: enable lwIP raw sockets
- sdcard: support configuring the SD/MMC bus width to 1 or 4 bits
- modpyb: support building with PY_PYB_LEGACY on and HW_USB_HID off
- usbd: introduce MICROPY_HW_USB_IS_MULTI_OTG to simplify USB config
- usbd: support USB device mode on STM32L432 MCUs
- boards/NUCLEO_L432KC: add config for USB VCP support
- usbd: make USB device FIFO sizes dynamically configurable
- i2c: fix generation of restart condition for hw I2C on F0/F7
- mphalport: put PYBD specific MAC code in board specific file
- mboot/Makefile: define "BUILDING_MBOOT" when building mboot
- boards/PYBD_SF2: exclude certain things when building mboot
- extint: fix EXTI mapping of PVD and RTC events for H7 MCUs
- stm32_it: include correct EXTI interrupt handlers for L0 MCUs
- dma: fix DMA config for L0 MCUs
- powerctrl: fix machine.bootloader() for L0 MCUs
- machine_adc: add machine.ADC class
- machine_adc: improve operation of ADC for H7, L4 and WB MCUs
- boards/stm32wb55_af.csv: fix ADC pin-channel function mapping
- mboot: support boards with only two LEDs
- boards/NUCLEO_L073RZ: fix typo in MCU name
- boards/MIKROE_CLICKER2_STM32: add MikroElektronika Clicker2 board
- boards/STM32F769DISC: fix number of SDRAM row bits
- board/NUCLEO_F746ZG: enable Ethernet periph, lwip and ussl
- usb: add support for VCP+MSC+HID mode, incl 2xVCP and 3xVCP
- usb: verify number of used endpoints doesn't exceed maximum
- lwip_inc: allocate additional MEMP_SYS_TIMEOUT when mDNS enabled
- lwip_inc: enable LWIP_NETIF_EXT_STATUS_CALLBACK for mDNS
- machine_adc: fix build for F4 and L4 MCUs that only have ADC1
- modusocket: fix NULL deref when accept() an unbound socket
- machine_i2c: add ability to specify I2C(4) by name
- can: factor CAN driver into low-level and Python bindings
- add support for FDCAN peripheral, exposed as pyb.CAN
- boards/NUCLEO_H743ZI: enable FDCAN on this board
- use mp_printf with MICROPY_ERROR_PRINTER for uncaught exceptions
- can: guard header file by MICROPY_HW_ENABLE_CAN
- usbd_cdc_interface: add CTS flow control option for USB VCP
- support disabling the compiler
- powerctrlboot: fix clock and PLL selection for HSI48 on F0 MCUs
- powerctrlboot: add support for HSI at 8MHz on F0 MCUs
- uart: add RTS/CTS pin configuration support to UART4
- provide port-specific implementation for Nimble on STM32
- mpconfigport.h: add modbluetooth module to stm32
- boards/PYBD: enable BLE for Pyboard D
- system_stm32: support selection of HSE and LSI on L4 MCUs
- boards: enable MICROPY_HW_RTC_USE_LSE on L4 boards
- {adc,machine_adc}: change ADC clock and sampling time for F0 MCUs
- usbdev: fix compile error if MICROPY_HW_USB_CDC_NUM is set to 2
- boards/PYBD_SF2: put nimble library in external QSPI XIP flash
- extract port-specific Nimble implementation
- mboot: add option to automatically reset when USB is disconnected
- sdcard: support boards with no SD card detect pin
- use hardware double sqrt on F7/H7 MCUs
- boards: add new board ADAFRUIT_F405_EXPRESS
- convert to use FROZEN_MANIFEST to specify frozen code
- adc: update ADC driver to work with the new H7 HAL
- adc: remove unused macro and channel check, and fix spacing
- adc: use IS_CHANNEL_INTERNAL macro to check for internal channels
- adc: fix sampling for internal channels on H7 MCUs
- mpu: save and restore the IRQ state when configuring MPU
- accel: rename MMA I2C macro constants to make it generic
- accel: add support for KXTJ3
- boards: add NADHAT_PYB405 board
- accel: fix Accel.read() method so it does read a byte
- powerctrlboot: fix config of systick IRQ priority on F0/L0/WB MCU
- sdram: fix to use new mpu_config_start/mpu_config_end signature
- Makefile: only enable hardware sqrt on parts that support it
- timer: fix Timer.freq() calc so mult doesn't overflow uint32_t
- add soft timer implementation, using SysTick at 1ms resolution
- add machine.Timer with soft timer implementation
- add support for RF coprocessor on WB55 MCUs
- boards: enable support for bluetooth on WB55 boards
- mpthreadport: include runtime.h to get defn of mp_raise_msg
- boards/stm32f405_af.csv: fix typo in ETH_RMII_REF_CLK on PA1
- nimble_hci_uart.c: prevent scheduler running during CYW-BT wakeup
- generalise flash mounting code so it supports arbitrary FS
- storage: make pyb.Flash configurable, and support ext block proto
- main: auto detect block device used for main filesystem
- moduos: add VfsLfs1 and VfsLfs2 to uos module, if enabled
- boards: enable LFS2 on PYBv1.x and PYBD boards
- storage: change storage_read/write_blocks to return int type
- storage: make start/len args of pyb.Flash keyword only
- qstrdefsport.h: remove unused qstrs and make USB ones conditional
- boards/NUCLEO_L073RZ: skip board-pin names for CPU only pins
- main: fix auto creation of pyb.Flash on boot with kw-only args
- mpconfigport.h: use IRQ_PRI_PENDSV to protect bluetooth ringbuf
- uart: add support for UART4/5 on L0 MCUs
- boards/xxx_WB55: enable littlefs2 on WB55 boards
- main: fix SKIPSD file detection so SD card is mounted by default
- Makefile: enable max buffer size on W5200 NIC when used with lwIP
- modusocket: handle case of NULL NIC in socket ioctl
- boards/PYBD_SF2: configure LEDs as inverted, for LED.intensity()
- boards/NUCLEO_F767ZI: add pins and config for using an SD card
- boards/NUCLEO_F767ZI: update pins, peripherals and total flash
- boards/NUCLEO_H743ZI: add extra pins and peripheral definitions
- timer: add missing TIM 1/15/16/17 IRQ handlers for H7 MCUs
- boards/PYBD: include webrepl helper scripts in frozen manifest
esp8266 port:
- uart: fix invalid ringbuf name when event driven REPL enabled
- provide custom machine_time_pulse_us that feeds soft WDT
- mpconfigport.h: enable lwIP raw sockets
- machine_uart: allow remapping UART TX/RX pins from 1/3 to 15/13
- put new profile code in iROM
- machine_adc: rename pyb_adc_* to machine_adc_*
- machine_adc: add read_u16 method and refactor
- add per-board configs, following other ports
- modules/ntptime.py: always close socket, and set day-of-week
- convert to use FROZEN_MANIFEST to specify frozen code
- allow building without a manifest
- boards: add manifest_release.py with files for a release
- modules/flashbdev.py: support extended block protocol
- moduos: add optional support for VfsLfs1 and VfsLfs2
esp32 port:
- machine_timer: reuse Timer handles, deallocate only on soft-reset
- add machine.SDCard class using built-in HW SD/MMC controller
- update to use ESP IDF v3.3-beta3
- modnetwork: still try to reconnect to WLAN even with AUTH_FAIL
- Makefile: include all driver/*.c source files in the build
- network_ppp: add ppp_set_usepeerdns(pcb, 1) when init'ing iface
- add support for hardware I2C
- Makefile: fix path expansion for ESPIDF_DRIVER_O
- Makefile: put OBJ and LIB rule additions in gen_espidf_lib_rule
- Makefile: simplify include of IDF source by using wildcards
- pin MicroPython tasks to a specific core
- Makefile: include CFLAGS_EXTRA in CFLAGS definition
- network_ppp: add authentication support to the PPP interface
- add support for mDNS queries and responder
- modules: on initial setup mount internal flash at root
- add per-board configs, following other ports
- add esp32.Partition class to expose partition and OTA funcs
- add 'config' function to network.LAN, reusing network.WLAN
- Makefile: fix subst->patsubst in ESPIDF_BOOTLOADER_SUPPORT_O
- machine_adc: add ADC.read_u16() method
- update to use ESP IDF v3.3
- boards/TINYPICO: switch to use QIO and 80MHz for SPI interface
- add VFS FAT partition to partitions.csv and mount it as the FS
- add support for ESP32-D2WD with 2MiB internal flash
- modules/inisetup.py: use bdev.ioctl instead of bdev.SEC_SIZE
- Makefile: add SDKCONFIG_H to QSTR_GLOBAL_REQUIREMENTS
- support building with ESP IDF 4.0-beta1
- add check to Makefile for pyparsing version
- add check to Makefile that the toolchain is in PATH
- main: use both 3.3 and 4.0 config vars to enable SPIRAM
- Makefile: fix printing of supported git hash
- enable native emitter
- implement BLE using Nimble from IDF 4.x
- boards: enable BLE by default when building with IDF 4.x
- add 4.x version of IDLE WDT config
- run NimBLE on the app core
- convert to use FROZEN_MANIFEST to specify frozen code
- machine_uart: add ability to invert UART pins
- boards: split out CPU frequency config, make 160MHz the default
- machine_hw_spi: fix exception msg when host is already in use
- Makefile: add correct arch to MPY_CROSS_FLAGS for native code
- remove unused "esponewire.c" in favour of extmod/modonewire
- esp32_partition: support extended block protocol
- moduos: enable uos.VfsLfs2 for littlefs filesystems
- boards/sdkconfig.base: resize SSL output buffer from 16 to 4kiB
- rtc: set system microseconds when setting time via RTC.datetime()
- machine_rtc: make RTC.memory size and availability configurable
- machine_rtc: reduce memory footprint of user mem functionality
- boards: enable ULP in base sdk configuration
- boards/TINYPICO: add tinypico.py, dotstar.py with custom manifest
- esp32_rmt: add initial support for RMT peripheral
javascript port:
- enable support for frozen bytecode via FROZEN_MPY_DIR
nrf port:
- led: adjust how board LEDs are defined
- clean up source by removing tabs, trailing spaces, non-ASCII chars
- machine/adc: add ADC.read_u16() method
- add ADC channel mapping to alt function table
- machine/adc: allow to pass a Pin object in to ADC constructor
- machine/adc: fix mapping of ADC channel to pin
- boards/make-pins.py: fix gen of board pins to use correct index
- Makefile: add support for flashing with a Black Magic Probe
- boards: add Particle Xenon board configuration (an nRF52840)
- boards: add board definition for uBlox Nina B1 series BLE modules
- i2c: add support for TWIM (EasyDMA)
- temp: move module configuration guard
- uart: add support for UARTE (EasyDMA)
- flash: update flash driver to use nrfx_nvmc driver
- led: expose public API for LED manipulation
- main: update the way the LED is used on startup
- add support to activate MICROPY_PY_SYS_STDFILES
- device: correct SPIM3 IRQ handler entry for nrf52840
- add tinyusb support for nrf52840
- boards: add support for pca10059
- add nrf9160 base support
- boards: add nrf9160 pca10090 board
- main: execute boot.py/main.py frozen modules without a file system
- boards/particle_xenon: enable USB CDC on Particle Xenon board
powerpc port:
- add initial port to bare metal PowerPC arch
samd port:
- add new port to Microchip SAMDxx microcontrollers
- make common linker scripts, rename board.mk to mpconfigboard.mk
- boards: add Adafruit Feather M0 Express board configuration
- boards: add Mini SAM M4 board configuration
- add minimum config for Atmel SAMD21-XPLAINED-PRO board
zephyr port:
- main: use mp_stack API instead of local pointer for stack top
docs:
- machine: add initial docs for new machine.SDCard class
- library/framebuf: add missing module reference in example code
- library/sys: add documentation for sys.atexit function
- pyboard: update name of mounted volume to match code
- pyboard: clarify initial files on pyboard and fix up formatting
- library: document that sys.version_info returns a 3-tuple only
- pyboard: emphasize the instructions for making a USB mouse
- reference/speed_python: update that read-only buffers are accepted
- reference/speed_python: add missing self to var caching example
- library/pyb.DAC.rst: correct frequency for triangle mode output
- rename machine.ADC docs to machine.ADCWiPy
- library: specify new machine.ADC class
- library/pyb.rst: update docs for pyb.usb_mode() function
- library/pyb.rst: update pyb.usb_mode() to mention VCP+MSC+HID
- library/pyb.USB_VCP.rst: add info about id and flow params
- develop/qstr.rst: add documentation for string interning
- library/bluetooth: add initial BLE documentation
- reference/glossary.rst: add new terms and reduce complexity of old
- library/bluetooth.rst: clarify gap_advertise adv_data behavior
- library/bluetooth.rst: explain how to increase char buffer size
- library/bluetooth.rst: fix typo in HR/UART services example
- esp8266/tutorial: make http_get sample function self contained
- library: clarify relation between machine and port-specific mods
- esp8266: add ntptime usage to esp8266 quickref
- fix spelling in various parts of the docs
- wipy/tutorial: link Blynk examples to the official library
- library: rename "array" module to "uarray"
- library/bluetooth: rename to "ubluetooth"
- move ubluetooth under "MicroPython-specific libraries"
- library: add documentation for extended block device protocol
- library/ubluetooth: add docs for gatts_set_buffer
- conf.py: fix path to favicon.ico
- templates/topindex.html: replace usage of deprecated defindex.html
- library/machine.SDCard.rst: fix various typos
- library/ubluetooth: fix name and link to FLAG_xxx constants
- reference: add docs describing use of pyboard.py
- library: add docs for pyb.Flash class
- add littlefs docs and a filesystem tutorial
- reference/filesystem: fix typo in block device code example
- reference/filesystem: add note and example about using filesystem
- library/ubluetooth: add note about API being under development
- library/uos: add notes and links about littlefs failures
- library/uos.rst: clarify why the extended interface exists
- esp8266/quickref: add note that machine.RTC is not fully supported
- reference: add documentation describing use of .mpy files
- develop: add documentation on how to build native .mpy modules
- esp32: add quickref and full docs for esp32.RMT class
travis:
- build PYBD_SF2 board as part of the stm32 job
- selectively fetch git submodules only when needed
- build esp8266 firmware as part of Travis CI
- build esp32 firmware as part of Travis CI
- enable performance benchmark tests on standard unix build
- add samd port to Travis build
- build stm32 mboot for PYBD_SF6 as part of CI
- switch unix stackless build to use clang
- build an stm32 board with threading enabled to test it with CI
- add new job to test unix port with sys.settrace enabled
- add ESP32 build with IDF v4
- build more stm32 boards to cover all supported MCUs
- build unix nanbox with PYTHON=python2
- add BLE submodules to ESP32 IDF4 build
- add esp8266 GENERIC_512K build to CI
- use "make submodules" to init required modules for each port
- add job to build and test unix minimal port
- add tests for building and importing dynamic native modules
- build urandom native module in coverage job
examples:
- bluetooth: add basic BLE peripheral examples
- bluetooth: use UUIDs directly to add services to adv payload
- bluetooth/ble_uart_peripheral.py: add usage demo
- embedding: replace symlink of mpconfigport.h with real file
- bluetooth/ble_uart_peripheral: use append mode for RX char
- embedding: remove obsolete fatfs files from build
- bluetooth: add helpers for decoding advertising payloads
- bluetooth: add example for reading temperature sensor
- natmod: add btree example
- natmod: add uheapq example
- natmod: add uzlib example
- natmod: add framebuf example
- natmod: add ure example
- natmod: add features1 and features2 examples
- natmod: add urandom native module example
- network: add testing key/cert to SSL HTTP server example
- natmod: add very simple features0 example to compute factorial
miscellaneous:
- top: add CODEOFCONDUCT.md document based on the PSF code of conduct
- gitignore: put build-*/ pattern in top-level gitignore file
- gitattributes: mark *.a files as binary
1、 micropython-1.12.tar.gz 37.98MB
2、 micropython-1.12.zip 45.31MB