登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
23
Star
47
Fork
2
Gitee 极速下载
/
micropython
代码
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
标签
标签名
描述
提交信息
操作
v1.26.1
Patch release for ESP32 native USB support This is a patch release containing the following commits: - esp32: update esp_tinyusb component to v1.7.6 - tools: add an environment variable MICROPY_MAINTAINER_BUILD - esp32: add IDF Component Lockfiles to git repo - shared/tinyusb: fix hang from new tx_overwritabe_if_not_connected flag - shared/tinyusb/mp_usbd_cdc: rewrite USB CDC TX loop - tools/mpremote: don't apply Espressif DTR/RTS quirk to TinyUSB CDC dev
647c8b9
2025-09-11 12:21
下载
v1.27.0-preview
7e8705f
2025-08-10 06:42
下载
v1.26.0
I2CTarget, improved floats and native emitter, STM32N6 & ESP32C2 support This release of MicroPython sees the introduction of `machine.I2CTarget`, which allows Python code to implement an I2C target device. It's available on the alif, esp32, mimxrt, rp2, samd, stm32 and zephyr ports. In the simplest case it can create an I2C register/memory device that connects to a bytearray (or similar buffer) and allows an I2C controller to read from and write into that bytearray. For more complex scenarios the `I2CTarget` class exposes a set of interrupts which can be acted upon by Python code, allowing an arbitrary I2C device to be created. See the documentation for more details and examples. Floating point support has been improved in a few ways in this release. First, the formatting (printing) of floats has been rewritten to significantly improve the `repr` reversibility of floating-point numbers. That is, formatting and then re-parsing a float should return the original value. In MicroPython the percentage of floats that correctly repr and parse back was around 28% (single precision) and 38% (double precision), but has now been improved (in the standard build configuration) to 98.5% and 99.8% (single and double respectively). In addition to printing out more accurate floats, that helps a lot when saving floats to .mpy files, because it means they can be loaded back to the same value. Second, there is now support in the compiler for handling floats as constants. Floats can now be folded (along with integers) in arithmetic operations, and be part of `const` assignments. This helps to optimize bytecode because constant float expressions can now be evaluated in the compiler instead of at runtime. The third float improvement involves object representation C, where floats are stored within the immediate object value rather than on the heap. In this object module, the float can only take up 30 bits, so the last two bits of the single precision number are lost. Previously they were just truncated, but now a heuristic is applied when recovering the float value from the object such that the last two bits are copied from the previous two. This alleviates a bias towards zero and in general improves floating point calculations when using this representation. The native and viper emitter backends have been improved to emit more optimal machine code, for example to use more compact instructions in loads and stores. This is for all supported architectures: ARM, Thumb, Xtensa, RISC-V 32, x86 and x64. Thumb v1 (for example RP2040) now supports long jumps greater than 12 bits, allowing larger Python functions to be compiled to this native architecture. Also, the inline Xtensa assembler now implements most of the LX3 opcodes, with additions including addx2, subx2, ssl and ssr, among others. Two new MCUs are supported by this release: STM32N6xx and ESP32-C2 (aka ESP8684). The STM32N6xx is a new STMicroelectronics MCU running at 800MHz with a large amount of RAM and machine-learning accelerators. MicroPython now supports this MCU with USB, XSPI memory-mapped external flash, a filesystem, basic peripherals and deepsleep. The ESP32-C2 is by Espressif and is a small and low cost RISC-V MCU with WiFi and BLE. MicroPython running on this MCU supports a REPL, filesystem, GPIO, I2C, ADC, PWM, timers, WiFi and BLE. The date range supported by the `time` module has now been standardized to work the same across all platforms. The functions `time()`, `localtime()` and `mktime()` now work properly on a reasonable range of dates, from at least 1970 up to 2099, regardless of the Epoch used by the platform. The MicroPython virtual machine is now able to avoid heap-allocating slices when subscripting bytearray and memoryview objects, for example expressions like `bytearray_obj[a:b] = c`. The slice object is now allocated on the C stack, helping to reduce memory churn and allowing such expressions to work when the heap is locked, for example during a hard interrupt handler. This improvement goes in the general direction of MicroPython using the heap as little as possible, making execution more deterministic. Other improvements to the core runtime include support for using `__all__` in star imports, support for PEP487's `__set_name__` special method, support for the _b/o/x specifier in `str.format`, and arrays can now be extended from any iterable, not just from an object with the buffer protocol. A new MicroPython-specific `sys.implementation._thread` attribute has been added, which exists when threading is enabled and tells which threading model is used (GIL or unsafe/no-GIL). The `framebuf` module now supports blit'ing read-only data to a `FrameBuffer`, which helps when implementing custom fonts that can now be stored in ROM. The DTLS implementation in the `tls` module now enables DTLS HelloVerify and Anti Replay protection (for the mbedTLS backend), allowing proper DTLS servers to be implemented. The lwIP socket layer now has a queue of incoming UDP and raw packets (previously it only had room for one outstanding packet), allowing for more robust and efficient UDP protocols. Mpremote has had a few improvements. There is a new `fs tree` command which mimics the Unix `tree` command, and includes the `-s` and `-h` options to show the file sizes in the output. The `df` command has been enhanced to use the new no-argument `vfs.mount()` query, and shows a much better summary of the mounted filesystems. The `mip install` command now uses hashes to skip files that exist. The location of the user `config.py` file is now more portable across many different OSes and configuration styles, thanks to the use of the `platformdirs` helper package. There is also support for targets without the `errno` module, improved disconnect handling, and better ESP-device detection for USB-CDC ports. The `mpy_ld.py` linker can now resolve fixed-address symbols if requested, for example on ESP8266 it can link to ROM-provided functions. There is also now support for ABS32 text relocations on ARMv6M (RP2040). These improvements extend the set of C extensions that can be compiled for such targets. Libraries that have been updated in this release include: lwIP updated to STABLE-2_2_1_RELEASE, LittleFS updated to v2.11, libhydrogen updated to the latest release, and stm32lib updated to include support for STM32N6. There have been many improvements to the test suite, to both the tests and the test runners. This is in part to aid the new Octoprobe test framework, which provides hardware-in-the-loop testing. The continuous integration testing now also includes an undefined behaviour sanitizer (UBSan) build, an address sanitizer (ASan) build, a long-long unix variant, and also testing of object representation C. MicroPython has a lot of tests! The alif port now supports pin interrupts, has improved SPI transfers, and I2C configuration now allows changing the SCL and SDA pins. The esp32 port is updated to use ESP-IDF v5.4.2, and now supports ESP32-C2. Most ESP32-based boards now auto-detect the size of their flash on boot and automatically create an appropriate vfs partition based on the size of the flash. This allows the same firmware image to work on boards with various flash sizes. This port has also added a new `esp32.PCNT` class along with `machine.Counter` and `machine.Encoder`, which can count input edges, including motor rotation. The PWM class has been improved, and its API now matches other ports. There is support for the LAN8670 PHY, and a new `esp32.idf_task_info()` function (useful with the new `utop` package in micropython-lib). The `UART.sendbreak()` method has been rewritten so that it doesn't reconfigure the UART during its execution. The nrf port has had fixes and improvements to its UART REPL to make it more robust, and work with mpremote. It also now uses the correct iRAM address for native code execution on nRF52 MCUs. The nrf implementation of `machine.enable_irq()` and `machine.disable_irq()` has been reworked so it uses the code common with all other ports, and this is a breaking change (on nrf boards only) due to the signature change of `enable_irq()`. Previously the signature was `enable_irq()`, and now the signature matches other ports, and the docs, and is `enable_irq(state)`, where `state` is the return value from `disable_irq()`. The rp2 port now enables compressed error messages by default, which reduces firmware size by about 3000 bytes. The pico-sdk alarm pool is now used (again, instead of custom soft-time code) for power-saving delays, and lightsleep has been improved. Open drain mode has been fixed on RP2350 with more than 32 GPIOs, and support for hard IRQ timer callbacks has been added. The webassembly port has seen improvements to its FFI interface with JavaScript: it improves "has" and "get" proxying, fixes binding of self to JavaScript methods, implements equality for `JsProxy` objects, and reuses `JsProxy` references when possible to improve equality relationships of JavaScript objects on the Python side. The zephyr port has been updated to use Zephyr v4.0.0, and many improvements have been made: PWM support has been added, UARTs are now interrupt driven with ring-buffers and can set the baudrate and other parameters, GPIO supports open-drain mode, SoftI2C and SoftSPI have been enabled, and the `zephyr.FlashArea` class now contains constants which enumerate the available partitions. REPL reliability has also been improved and it now supports ctrl-C in the default configuration. BLE can now create services at runtime using the standard `BLE.register_services()` method. Other small things have been added to make the zephyr port match the behaviour of other bare-metal ports, including: `boot.py` and `main.py` are now executed at start-up, `/lib` is added to `sys.path` as appropriate, stdin/out/err have been enabled in the `sys` module, along with the ability to import .mpy files, and await/async keywords are enabled. This port now uses the standardized ROM configuration levels, with the default being the "basic" level. New boards added in this release are: GARATRONIC_PYBSTICK26_ESP32C3 and SPARKFUN_IOT_REDBOARD_ESP32 (esp32 port), SPARKFUN_REDBOARD_TURBO and SPARKFUN_SAMD21_DEV_BREAKOUT (samd port), NUCLEO_N657X0 and OPENMV_N6 (stm32 port), beagleplay_cc1352p7, nrf5340dk, nrf9151dk and rpi_pico (zephyr port). The change in code size since the previous release for select builds of various ports is (absolute and percentage change in the text section): bare-arm: -96 -0.168% minimal x86: -207 -0.112% unix x64: -376 -0.045% stm32: +3776 +0.966% cc3200: +392 +0.212% esp8266: +3484 +0.498% esp32: +19064 +1.122% mimxrt: +3600 +0.970% renesas-ra: +1296 +0.207% nrf: +1140 +0.607% rp2: +556 +0.245% (RPI_PICO board) rp2: +2252 +0.245% (RPI_PICO_W board) samd: +3296 +1.233% The leading causes of these changes in code size are: - bare-arm, minimal: various code size improvements including optimized integer var-arg handling - unix: remove static PATH variable (bss size reduction), implement DTLS HelloVerify and Anti Replay protection (size increase) - stm32: implement `machine.I2CTarget`, improve accuracy of float formatting and range of time functions, improve native emitter and inline assembler, update LittleFS to v2.11. - cc3200: enable `io.IOBase` at core feature level, avoid heap-allocating slices when subscripting built-ins. - esp8266: add more LX3 opcodes to the inline assembler, update LittleFS to v2.11, native emitter improvements, add float constant folding. - esp32: update to IDF 5.4.2 (+10k), implement `machine.I2CTarget`. - mimxrt: implement `machine.I2CTarget`, improve accuracy of float formatting, improve native emitter, add float constant folding, update LittleFS to v2.11. - renesas-ra: improve accuracy of float formatting, native emitter improvements, add float constant folding. - nrf: improve accuracy of float formatting, enable `io.IOBase`, standardize the range of time functions. - rp2 (RPI_PICO): enable compressed error messages (-3k), implement `machine.I2CTarget`, improve accuracy of float formatting. - rp2 (RPI_PICO_W): enable compressed error messages (-3k), implement `machine.I2CTarget`, implement DTLS HelloVerify and Anti Replay. - samd: implement `machine.I2CTarget`, improve accuracy of float formatting, improve native emitter, float constant folding. Thanks to everyone who contributed to this release: Alessandro Gatti, Andrea Giammarchi, Andrew Leech, Angus Gratton, Anson Mansfield, Anton Blanchard, Ayush Singh, Chris Webb, Christian Lang, Damien George, Daniel Campora, Daniël van de Giessen, David Schneider, David Yang, Detlev Zundel, Dryw Wade, dubiousjim, Elvis Pfutzenreuter, ennyKey, Garatronic, Herwin Grobben, iabdalkader, IhorNehrutsa, Jeff Epler, Jim Mussared, Jonathan Hogg, Jos Verlinde, Koudai Aono, Malcolm McKellips, Matt Trentini, Maureen Helm, Meir Armon, Patrick Joy, Peter Harper, Phil Howard, purewack, Rick Sorensen, robert-hh, root, SiZiOUS, stijn, TianShuang Ke, Vdragon, Yanfeng Liu, Yoctopuce dev, Yuuki NAGAO. MicroPython is a global Open Source project, and contributions were made from the following timezones: -0600, -0500, -0400, -0300, +0000, +0100, +0200, +0300, +0530, +0800, +0900, +1000, +1100. The work done in this release was funded in part through GitHub Sponsors, and in part by George Robotics, Espressif, Arduino, OpenMV, Yoctopuce, Microbric and Planet Innovation. What follows is a detailed list of changes, generated from the git commit history, and organized into sections. Main components =============== all: - rename the "NORETURN" macro to "MP_NORETURN" - bump Ruff version to v0.11.6 - go back to using default ruff quote style py core: - objrange: match CPython range slicing - objstr: fix handling of OP_MODULO with namedtuple - dynruntime.mk: fix use of musl's libm.a when LINK_RUNTIME=1 - mkrules.cmake: add CMake support for compressed error messages - make struct-initializing macros compatible with C++ - malloc: add mutex for tracked allocations - modthread: initialize thread state nlr_top to NULL - makeversionhdr.py: change utcfromtimestamp() to fromtimestamp() - mpconfig: enable io.IOBase at core feature level - emitinlinethumb: refactor string literal as array initializer - objstr: add support for the :_b/o/x specifier in str.format - emitnative: improve Viper register-indexed code for Arm - emitnative: improve Viper register-indexed code for Thumb - emitnative: refactor Viper register-indexed load/stores - asm: remove unused generic ASM API opcode definitions - asmthumb: generate proper sequences for large register offsets - emitnative: clean up int-indexed Viper load/store code - persistentcode: allow a port a custom commit function and track data - asmxtensa: replace printf messages with exceptions - asmxtensa: make the generated code dumper work on mpy-cross - emitinlinextensa: add the rest of LX3 opcodes to the assembler - asmxtensa: emit prologue jump only when constants table is in use - scheduler: only run scheduler callbacks queued before run started - emitnative: let Viper int-indexed code use appropriate operands - asmthumb: extend load/store generators with ARMv7-M opcodes - asmxtensa: extend existing specialised load/store operations range - emitnative: remove redundant RV32 Viper int-indexed code - asmarm: extend int-indexed 32-bit load/store offset ranges - asmarm: give a proper name to the temporary register - asmxtensa: extend BCCZ range to 18 bits - asmxtensa: extend BCC range to 18 bits - asmthumb: implement long jumps on Thumb/armv6m architecture - dynruntime.mk: enable single-precision float by default on armv6/7m - parsenum: reduce code size in check for inf/nan - parsenum: further reduce code size in check for inf/nan - objarray: allow extending array with any iterable - parsenum: fix parsing complex literals with negative real part - objfloat: change MSVC workaround for NAN being a constant - mpz: avoid undefined behavior decrementing NULL - objlist: reduce code size in slice operations - mpprint: remove unused "PF_FLAG_NO_TRAILZ" flag - asmbase: fix assertion error with viper code - fix undefined left shift operations - modio: fix the case where write fails in BufferedWriter.flush - repl: skip private variables when printing tab completion options - runtime: add support for using __all__ in star import - obj: fix nan handling in object REPR_C and REPR_D - misc: fix fallback implementation of mp_popcount - misc: introduce macros to check values' bits size - asmrv32: implement the full set of Viper load/store operations - asmarm: implement the full set of Viper load/store operations - asmxtensa: implement the full set of Viper load/store operations - asmthumb: remove redundant load/store opcode implementations - asmx86: implement the full set of Viper load/store operations - asmx64: implement the full set of Viper load/store operations - asmthumb: clean up integer-indexed load/store emitters - emitnative: let emitters know the compiled entity's name - runtime: initialize profile fields in mp_thread_init_state - profile: fix printing lineno in frame objects - bc: factor out helper for line-number decoding - showbc: use line-number decoding helper - objcode: implement co_lines method - obj: add functions to retrieve large integers from mp_obj_t - vm: avoid heap-allocating slices when subscripting built-ins - mpprint: rework integer vararg handling - objint_longlong: add arithmetic overflow checks - smallint: update mp_small_int_mul_overflow() to perform the multiply - parsenum: extend mp_parse_num_integer() to parse long long - objcode: remove co_lnotab from v2 preview - mkrules.mk: mute blobless errors - modsys: add sys.implementation._thread attribute - obj: fix REPR_C bias toward zero - obj: add new type flag to indicate subscr accepts slice-on-stack - objint_longlong: fix left shift of negative values - mpconfig: define new HEX_FMT formatting macro - cast type names to qstr explicitly - fix mp_printf integer size mismatches - objcell: fix printing of cell ID/pointer - mpprint: fix printing pointers with upper bit set - objint_mpz: fix pow3 where third argument is zero - objint_longlong: fix overflow check in mp_obj_int_get_checked - objint_longlong: fix longlong interoperability with floats - objtype: add support for PEP487 __set_name__ - mphal: add stddef.h header for size_t - objboundmeth: add option to use mp_is_equal instead of == comparison - parsenum: refactor float parsing code - formatfloat: improve accuracy of float formatting code - parse: add support for math module constants and float folding - asmthumb: don't corrupt base register in large offset store - parse: fix missing nlr_pop call in complex path of binary_op_maybe extmod: - machine_usb_device: add exception text wrappers - modbluetooth: use newer mp_map_slot_is_filled function - asyncio: fix early exit of asyncio scheduler - create common cyw43 driver config header - cyw43: move the LWIP responder fix into common CYW43 config - moductypes: refactor string literal as array initializer - modlwip: implement a queue of incoming UDP/raw packets - vfs_lfsx: fix errno value raised from chdir - modjson: detect unterminated composite entities - network_cyw43: disconnect STA if making inactive - modlwip: add optional flags argument for recv and recvfrom - modbluetooth: add timeout to deinit - modframebuf: add support for blit'ing read-only data - modnetwork: consolidate definition of common drivers - modre: use specific error message if regex is too complex - machine_pulse: optimise time_pulse_us for code size - modlwip: fix crash when calling recv on listening socket - network_lwip: add sys_untimeout_all_with_arg helper function - mbedtls: implement DTLS HelloVerify cookie support - mbedtls: implement recommended DTLS features, make optional - mbedtls: undefine ARRAY_SIZE if defined by platform - vfs_lfsx: allow overriding the LFS2 on-disk version format - vfs_posix: add additional readonly checks - vfs_posix: add MICROPY_VFS_POSIX_WRITABLE option - modlwip: print timeout with correct format string - modtls_mbedtls: do gc_collect and retry ssl_init on any error - machine_i2c_target: add new machine.I2CTarget class shared: - tinyusb: use device event hook to schedule USB task - timeutils: standardize supported date range on all platforms - netutils: cast the ticks value before printing drivers: - ninaw10/machine_pin_nina: add exception text wrappers - esp-hosted: rename Bluetooth HCI backend driver - ninaw10: rename Bluetooth HCI backend driver - cyw43: remove old BTHCI UART backend - esp-hosted: replace EVENT_POLL_HOOK with mp_event_wait_ms - support special QSPI direct-read protocol mpy-cross: - main: exit with error if arch not specified with emit=native - main: document emit=host option in help lib: - lwip: update lwIP to STABLE-2_2_1_RELEASE - littlefs: update LittleFS to v2.10.2 - littlefs: reuse existing CRC32 function to save space - littlefs: fix string initializer in lfs1.c - littlefs: update LittleFS to v2.11 - libhydrogen: update to latest release - berkeley-db-1.xx: update submodule to latest - libm_dbl: support FLT_EVAL_METHOD == 16 - stm32lib: update library for N6 v1.1.0 - pico-sdk: fix Pico SDK fetching develop picotool - micropython-lib: update submodule to latest Support components ================== docs: - zephyr: add quick reference for PWM support - zephyr: add zephyr FlashArea IDs docs - fix SparkFun capitalization - esp32: improve PWM documentation and examples - esp32/quickref: add PWM lightsleep example - reference/mpremote: document the 'fs tree' command - library/time: amend the documentation of time.mktime() - esp32/quickref: mention the different timer counts - esp32: mention the use of Timer(0) by UART.IRQ_RXIDLE - add a description of recv/recvfrom flags argument - rp2: document the new rp2 Timer hard= option - develop/natmod: add notes on Picolibc and natmods - reference/speed_python: document schedule/GIL limitation of native - document PEP487 __set_name__ implementation - library/bluetooth: document all allowed args to UUID constructor - library/rp2.StateMachine: add a note about PIO in and jmp pins - library/btree: fix method links to explicitly specify class - library: document the new machine.I2CTarget class - esp32: add documentation for esp32.PCNT - library/machine: add docs for Counter and Encoder - reference/mpremote: document location of config file examples: - natmod/random: fix build for Xtensa - natmod/framebuf: fix build for Xtensa - natmod/deflate: fix build for Xtensa - natmod/btree: fix build for Xtensa - rp2/pio_uart_rx.py: fix use of PIO constants - natmod/btree: fix build on RV32 with Picolibc - natmod: use LINK_RUNTIME=1 when building for armv6m - usercmodule: cast arguments for printf - bluetooth/ble_advertising.py: fix decoding UUIDs tests: - basics/builtin_range.py: add more tests for range slicing - extmod: skip binascii tests when hexlify/unhexlify don't exist - extmod/vfs_lfs_ilistdir_del.py: skip test if not enough memory - extmod/vfs_mountinfo.py: don't import unused errno module - extmod/vfs_posix.py: fix test on Android - net_hosted: only run network loopback test on supported targets - ports/rp2: convert rp2.DMA test to a unittest - ports/rp2: tune rp2.DMA test so it runs in all configurations - extmod: rename ssl tests that only use the tls module - net_inet: update micropython.org certificate for SSL tests - extmod/vfs_rom.py: clear sys.path before running test - multi_net: add test that requires queuing UDP packets - ports/rp2: update machine idle test to revert skip for RP2350 - ports/rp2: add a test case for light sleeping from CPU1 - cpydiff: document format separator difference - extmod/vfs_lfs_error.py: test value of all OSError's errno - cpydiff: explain the numeric literal parsing difference - cpydiff: document that uPy requires space after number+period - cpydiff: add test of underscore-in-literals - cpydiff: ensure all have two levels of category - run-tests.py: add list of passed/skipped tests to _result.json - micropython/viper_ptr: add tests for arch edge cases - float/math_constants.py: test actual e and pi constant values - run-tests.py: change _results.json to have a combined result list - multi_net: add test coverage for socket recv flag MSG_PEEK - multi_net: add test coverage for socket recv flag MSG_DONTWAIT - run-natmodtests.py: allow injected code customisation - run-tests.py: automatically skip tests that are too large - run-tests.py: remove filename arg from prepare_script_for_target - run-tests.py: unconditionally enable native tests if asked - extmod/random_extra_float.py: skip when funcs not available - run-tests.py: factor out helper function to create test report - run-multitests.py: create a _result.json at end of run - run-natmodtests.py: create a _result.json at end of run - run-perfbench.py: create a _result.json at end of run - run-natmodtests.py: consider a test skipped if mpy doesn't exist - ports/rp2: add tests for rp2-specific timer options - cpydiff: document complex() parsing difference - extmod: add platform_basic.py for basic coverage test of platform - run-tests.py: add support for ctrl keys in REPL tests - cmdline: add a test for REPL paste mode - micropython: improve viper ptr boundary tests - run-tests.py: allow injected code customisation - misc: improve test coverage of py/profile.c - extmod/machine_uart_tx.py: support STM32WB boards - extmod_hardware: add UART config for STM32WB boards - extmod_hardware/machine_uart_irq_rxidle.py: ignore inital IRQ - extmod_hardware/machine_uart_irq_rxidle.py: test multiple writes - ports/stm32: tweak tests to run on a wider set of boards - extmod/select_poll_eintr.py: skip test if target can't bind - basics/fun_code_full: test code objects with full feature set - basics/fun_code_colines: test decoded co_lines values - extmod/asyncio_iterator_event.py: use format instead of f-string - micropython: add missing SystemExit after printing SKIP - run-tests.py: consider tests ending in _async.py as async tests - extmod: close UDP sockets at end of test - add specific tests for "long long" 64-bit bigints - extmod/json_loads_int_64.py: add test cases for LONGINT parse - thread: rename thread_lock4 test to thread_lock4_intbig - skip bm_pidigits perf test if no arbitrary precision int support - basics/fun_code_lnotab: test removal of co_lnotab from v2 - extmod/select_poll_eintr.py: pre-allocate global variables - thread/stress_aes.py: reduce test time on PC targets - run-tests.py: detect threading and automatically run thread tests - thread: allow thread tests to pass with the native emitter - net_inet: update micropython.org certificate for SSL tests - run-tests.py: use TEST_TIMEOUT as timeout for bare-metal tests - extmod_hardware/machine_uart_irq_break.py: remove send_uart - multi_bluetooth: synchronise MTU exchange in BLE MTU tests - multi_net: update DTLS multi-net test - extmod: add (failing) test for VfsPosix in readonly mode - micropython: rename viper boundary tests that depend on big int - basics: add tests for PEP487 __set_name__ - internal_bench/class_create: benchmark class creation - internal_bench/var: benchmark descriptor access - run-internalbench.py: allow running internalbench on hardware - run-natmodtests.py: automatically skip tests that are too large - multi_bluetooth: extend the deep sleep test timeout - run-multitests.py: escape encoding errors instead of crashing - cpydiff: remove passing types_float_rounding test - micropython: test that viper offset stores don't clobber base reg - extmod_hardware: add self unittest for I2CTarget - multi_extmod: add I2CTarget multi tests - extmod_hardware: add basic tests for machine.Counter and Encoder tools: - mpremote: use zlib.compressobj instead of zlib.compress - mpremote/tests: add tests for errno behavior - mpremote: refactor error handling to apply generally to any errno - mpremote: fix possibly-missing EOPNOTSUPP errno name - mpremote/tests: add test for rm -r on /remote vfs - mpremote: prevent deletion of /remote files via rm -r - ci.sh: update URL for xtensa-lx106-elf-standalone.tar.gz - mpremote: for mip install, use hash to skip files that exist - verifygitlog.py: apply stricter rules on git subject line - verifygitlog.py: disallow a leading slash in commit subject line - verifygitlog.py: allow long co-author and sign-off names - gen-cpydiff.py: improve stdout vs stderr interleaving - gen-cpydiff.py: fix RST heading generation - gen-cpydiff.py: ensure every item has at least 2 TOC levels - mpremote: add new 'fs tree' command - mpremote/tests: add tests for 'fs tree' command - pyboard.py: avoid initial blocking read in read_until() - pyboard.py: introduce timeout_overall for read_until() - pyboard.py: add write_timeout and catch errors in enter_raw_repl - mpy_ld.py: resolve fixed-address symbols if requested - ci.sh: remove natmod build restrictions for Xtensa - ci.sh: clean the correct MPY files when batch compiling - ci.sh: allow errors in code-size build to fail the CI - boardgen.py: ensure board pin locals_dict has consistent order - ci.sh: fix nanbox CI test runs - mpy_ld.py: support R_ARM_ABS32 relocation in text - mpremote: improve df command to use new no-arg vfs.mount() query - ci.sh: add functions for sanitizer builds - autobuild: build alif boards as part of auto-build - ci.sh: disable "stack use after return" in ASan build - mpremote: fix disconnect handling on Windows and Linux - ci.sh: increase test timeout to 60s in coverage jobs - mpremote: support OSError's on targets without errno - ci.sh: always call `apt-get update` before `apt-get install` - pyboard.py: align execpty prefix - ci.sh: increase timeout for unix qemu test runs - ci.sh: increase timeout for stackless clang test runs - ci.sh: skip thread/stress_heap.py test on macOS test run - ci.sh: skip thread/stress_recurse.py on unix qemu test runs - ci.sh: change averaging to 1 for run-perfbench.py test - pyboard.py: add timeout argument to Pyboard.exec_/exec - ci.sh: test building all natmod examples with all ARM-M archs - mpremote: fix errno.ENOTBLK attribute error on Windows - mpremote: update ESPxxx detection for USB-CDC ports - mpremote: add platformdirs dependency to requirements.txt - mpremote: locate config.py location across different host OSes CI: - workflows: split QEMU/Arm builds into separate entries - workflows: use windows-latest runner for all Windows CI jobs - workflows: add sanitize_undefined workflow to unix port CI - workflows: run the address sanitizer (ASan) build during CI - workflows: remove the unix "settrace" CI job - workflows: use Python 3.11 for unix coverage testing - workflows: add new CI job to test unix port with GIL enabled - workflows: build unix port for docs and run workflow more often - workflows: add a CI job to build ESP32-C2 and ESP32-C6 boards The ports ========= all ports: - fix SparkFun capitalization - update board.json files for vendor/product consistency - eliminate define of {U,}INT_FMT where redundant - define new HEX_FMT formatting macro alif port: - create common cyw43 driver config header - Makefile: create firmware.zip with files needed for deploying - boards/ALIF_ENSEMBLE: add board.json and deploy instructions - README: update README with build instructions - Makefile: allow specifying a custom build directory - machine_pin: add support for machine.Pin IRQ - machine_spi: improve transfer function to poll events - lwip_inc: refactor lwipopts.h to use extmod's common options - machine_i2c_target: implement I2CTarget class - machine_i2c: allow changing I2C SCL/SDA pins bare-arm port: no changes specific to this component/port cc3200 port: no changes specific to this component/port embed port: - port: fix alloca include for Windows platforms esp8266 port: - main: print error information on crash-induced reboots - modmachine: use common machine_time_pulse_us implementation esp32 port: - enable compressed error messages by default - esp32_common.cmake: skip BTree module when requested - tools: update metrics_esp32 script for ESP-IDF >=v5.4.x - esp32_common.cmake: use the tinyusb source files from ESP-IDF - machine_timer: fix timer.value() for an uninitialized timer - esp32_common.cmake: allow adding defines and compiler flags - main: make the entry point function name configurable - machine_uart: correctly manage UART queue and event task - network_common: raise a memory error on ESP_ERR_NO_MEM - network_ppp: restructure to match extmod/network_ppp_lwip - machine_pwm: improve PWM and make its API match other ports - mpconfigport: document how to get more debug info - mpthreadport: fix double delete of tasks on soft reset - update to use ESP-IDF v5.4.1 - network_lan: add support for LAN8670 PHY - modesp32: implement esp32.idf_task_info() - machine_i2c: fix default I2C pins for C3, S3 - network_lan: add PHY_GENERIC device type - boards/SPARKFUN_IOT_REDBOARD_ESP32: add SparkFun board - modsocket: add optional flags argument for recv and recvfrom - machine_timer: do not free interrupt from ISR - re-use allocated timer interrupts and simplify UART timer code - update ADC driver update to the new esp_adc API - main: auto detect the size of flash and auto create vfs partition - boards: convert all boards to auto detect flash size - README: update README to describe auto filesystem sizing - modesp32: make wake_on_ulp available only on SoCs that support it - modesp32: make wake_on_touch available only on SoCs supporting it - modesp32: make wake_on_ext0 available only on SoCs supporting it - modesp32: make wake_on_ext1 available only on SoCs supporting it - modesp32: fix access to ext0_pin only if defined - boards/GARATRONIC_PYBSTICK26_ESP32C3: add pybstick26-esp32c3 defn - panichandler: support building against IDFv5.4.2 - machine_uart: improve sendbreak so it doesn't reconfig the UART - update to use ESP-IDF v5.4.2 - add support for ESP32-C2 (aka ESP8684) - add "Free RAM" optimisation config flags - fix first line ESP32-C2 serial output after reset or deepsleep - machine_i2c: factor default pin macros to header file - machine_i2c_target: implement I2CTarget class - modesp32: add esp32.PCNT class - modules/machine.py: add Counter and Encoder classes - mpconfigport: disable I2CTarget on ESP32-C6 to reduce code size - machine_timer: enable timer clock source for ESP32C6 - machine_timer: fix machine.Timer() tick frequency on ESP32C2,C6 mimxrt port: - machine_uart: enable CTS SION so it can be read - cyw43_configport: update cyw43 config to use new BTHCI UART - create common cyw43 driver config header - machine_i2c_target: support I2C target mode minimal port: no changes specific to this component/port nrf port: - use correct IRAM address for native code execution on nRF52 - only process interrupt chars on UARTs used for REPL - fix UART write on parts that can't write more than 255 bytes - boards: use 64 byte raw-paste buffer on PCA10028 and PCA10040 - use common implementation of machine disable/enable IRQ - revert "nrf/Makefile: Enable LTO by default only on newer gcc." - drivers/bluetooth: change soft-device download URL to self hosted pic16bit port: no changes specific to this component/port powerpc port: no changes specific to this component/port qemu port: - Makefile: allow passing flags to test_natmod via RUN_TESTS_EXTRA renesas-ra port: - replace MICROPY_EVENT_POLL_HOOK with mp_event_wait - mpconfigport: enable MICROPY_TIME_SUPPORT_Y1969_AND_BEFORE rp2 port: - add exception text wrappers - enable compressed error messages by default - create common cyw43 driver config header - move the LWIP responder fix into common CYW43 config - Makefile: add deploy target that uses picotool load - rp2_dma: fix default value used in pack_ctrl on RP2350 - add temporary workaround for GCC 15.1 build failure - use pico-sdk alarm pool instead of soft timer for sleep - modmachine: add debug code for mp_machine_lightsleep - modmachine: add mutual exclusion for machine.lightsleep() - disable the LWIP tick timer when not needed - machine_pin: replace macros with Pico SDK functions - machine_pin: fix simulated open drain with more than 32 GPIOs - boards/SPARKFUN_XRP_CONTROLLER_BETA: fix default I2C to use I2C1 - make FLASH LENGTH match PICO_FLASH_SIZE_BYTES in .ld files - machine_timer: support hard IRQ timer callbacks - rp2_flash: add MICROPY_HW_FLASH_MAX_FREQ to replace fixed max freq - rp2_flash: add default MICROPY_HW_FLASH_MAX_FREQ - CMakeLists.txt: make board's pins.csv configurable - CMakeLists.txt: make linker script configurable - mpnetworkport: deregister all sys timeouts when netif is removed - modmachine: do not use deprecated XOSC_MHZ and XOSC_KHZ - rp2_pio: configure jmp_pin for PIO use if it's isolation is set - CMakeLists.txt: fix flash size check logic - rp2_pio: fix use of PIO2 in prog data structure - machine_i2c: factor default pin macros to header file - machine_i2c_target: implement I2CTarget class - rp2_flash: add binary info for ROMFS samd port: - boards/SAMD_GENERIC_Dxxx: add Microchip URL to board.json - machine_i2c: add the timeout keyword argument to the constructor - modtime: change time.time_ns() to follow the RTC time - boards/SAMD_GENERIC_D51xxx: fix VFS settings for internal flash - samd_spiflash: improve the flash type detection - samd_qspiflash: remove the attempt to handle a unknown device - boards: add two SparkFun SAMD21 boards - boards: change the SparkFun vendor name to SparkFun - machine_i2c_target: support I2C target mode stm32 port: - main: replace mp_stack_set calls with new mp_cstack_init_with_top - cyw43_configport: update cyw43 config to use new BTHCI UART - create common cyw43 driver config header - allow QSPI to work on STM32G4 - machine_adc: enable ADC re-read errata handling for STM32WB55 - boards/ARDUINO_PORTENTA_H7: free reserved timer - main: add support for additional GC blocks - boards/ARDUINO_GIGA: define additional GC blocks in SDRAM - uart: enable UART FIFO for H7 MCUs - adc: apply re-read errata for WB55 - adc: simplify ADC calibration settings - adc: fix core temperature reading on WB55 - machine_adc: fix internal ADC channel reading on WB MCUs - uart: suppress additional RX idle IRQs on F4/L1 - irq: change SPI IRQ priority to be higher than DMA IRQ - dma: extend STM32H5 DMA use to SPI3 and SPI4 - machine_adc: add machine.ADC implementation for STM32L1 - boards/make-pins.py: support up to GPIO-O - add support for STM32N6xx MCUs - main: disable D-cache when debugging N6 - lwip_inc: increase lwIP memory on N6 - boards: add board support files for N6 - mboot: add support for STM32N6xx MCUs - spi: fail spi_init if pins can't be configured - boards/OPENMV_N6: add new board definition files - boards/NUCLEO_N657X0: add new board definition files - stm32.mk: error out if compiling for cortex-m55 on old gcc - add casts when printing small integers - i2c: move I2C IRQ handlers from stm32_it.c to i2c.c - i2cslave: change irq handler name to i2c_slave_irq_handler - i2cslave: add functions to read/write I2C data - i2cslave: support i2c_slave_process_tx_end callback on F4 - i2cslave: account for slow addr_match callback - machine_i2c_target: implement I2CTarget class unix port: - variants: enable os.uname() in coverage build for tests - main: remove PATH_MAX from realpath - mpthreadport: work around lack of thread cancellation on Android - coveragecpp: verify struct-initializing macros' C++-compatibility - modsocket: expose MSG_PEEK flag for recv & recvfrom - coverage: add coverage test for mp_sched_schedule_node - coverage: add coverage test for left adjusted print - README: add some small documentation about sanitizers - variants/coverage: enable sys.settrace - coverage: initialize more code_state fields - coverage: add missing MP_OBJ_FROM_PTR casts - Makefile: drop include path of "i686-linux-gnu" - coverage: expand mp_printf coverage tests - variants: add a 'longlong' variant to test 64-bit bigints in CI - allow the GIL to be enabled - variants/longlong: use REPR_C on this variant - mpconfigport: include time.h to get definition of time_t - mpthreadport: ensure consistent type of PTHREAD_STACK_MIN - coverage: avoid type checking an invalid string - coverage: cast type names to qstr explicitly - coverage: cast values to fit %x formatting code - coverage: cast values to int for format printing - coverage: provide argmuents of expected integer types - coverage: remove unused printf arguments webassembly port: - objpyproxy: avoid throwing on symbol or iterator has-check - objpyproxy: avoid throwing on implicit symbols access - proxy_c: provide constants for fixed JsProxy refs - objjsproxy: fix binding of self to JavaScript methods - objjsproxy: implement equality for JsProxy objects - proxy_js: reuse JsProxy ref if object matches windows port: no changes specific to this component/port zephyr port: - fix prj.conf for v4.1-rc1 - fix call to thread_analyzer_print for v4.0 - remove reference to CONFIG_MMC_VOLUME_NAME for v4.0 - upgrade to Zephyr v4.0.0 - machine_pwm: implement PWM support - boards: enable PWM on beagleconnect_freedom - create options to enable frozen modules - boards: add nrf5340dk board configuration - boards: add nrf9151dk board configuration - create ability to use device_next with CDC ACM as REPL - introduce auto-listing of FlashArea Partitions - boards: enable ADC on beagleconnect_freedom - modbluetooth_zephyr: allow BLE to create services at runtime - mpconfigport: fix mp_int_t and mp_uint_t to work on 64-bit archs - boards: add support for BeaglePlay CC1352p7 - boards/beagleconnect_freedom: enable networking - boards/beagleconnect_freedom: remove board overlay - machine_uart: complete UART driver and make it interrupt driven - machine_pin: configure OUT pin also as input so it's readable - boards: disable WDT on qemu boards and networking for cortex_m3 - README: update URL describing QEMU network settings - prj.conf: use UART for console as default, not CONSOLE_SUBSYS - update generated header path - main: execute boot.py and main.py like other ports - main: add /flash/lib or /sd/lib to sys.path on start up - enable sys.stdin/out/err - src: increase UART input buffer to 512 bytes and reduce latency - src: fix USB device_next driver to work with zephyr 4.0.0 - machine_pin: add Pin.OPEN_DRAIN constant - machine_pin: allow constructing a Pin with an existing Pin - mphalport: implement C-level pin HAL - mpconfigport: enable machine.SoftI2C and machine.SoftSPI - mpconfigport: enable import of mpy and a few related features - mpconfigport: enable MICROPY_NLR_THUMB_USE_LONG_JUMP - boards/frdm_k64f: improve board configuration - boards/nucleo_wb55rg: enable BLE, I2C, SPI and add filesystem - boards/rpi_pico: add board configuration for rpi_pico - mpconfigport: enable sys.maxsize - mpconfigport: enable emergency exception buffer - machine_timer: make machine.Timer id argument optional - machine_pin: retry configuring gpio with just GPIO_OUTPUT - mpconfigport_minimal: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM - mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_BASIC_FEATURES - machine_i2c_target: implement I2CTarget class
4ce2dd2
2025-08-09 21:31
下载
v1.26.0-preview
28901b2
2025-04-21 15:07
下载
v1.25.0
ROMFS, alif port, RISCV inline assembler, DTLS, mpremote recursive remove After more than three years in development, the "ROMFS" feature has been finalised, its filesystem format specified, and the VFS driver and supporting code are included in this release of MicroPython. This feature builds on bytecode version 6 (available for many years now), which supports executing bytecode in-place, that is, without the need to copy it to RAM. ROMFS defines a read-only, memory-mappable, extensible filesystem that can contain arbitrary resources, including precompiled mpy files, and allows executing bytecode directly from the filesystem. This makes importing significantly faster and use a lot less memory. Also, data resources such as fonts can be used in-place on a ROMFS without loading into RAM. ROMFS is currently enabled only on selected boards: PYBD-SFx, all alif-port boards, a new ESP8266_GENERIC variant called FLASH_2M_ROMFS, and all stm32 Arduino boards. Other boards will have ROMFS enabled in the future, or it can be manually enabled on user-defined boards. To build and deploy a ROMFS, mpremote has a new `mpremote romfs` command, with "query", "build", and "deploy" sub-commands, which can build and deploy a directory structure to a ROMFS partition on a target device. These initial ROMFS features will be extended in the future, but for now they provide a way to try out this long-anticipated feature. This release also introduces a brand new "alif" port supporting Alif Ensemble MCUs. These MCUs offer multiple ARM cores, including Ethos-U55 machine-learning processors, and a comprehensive set of peripherals. Current features of the MicroPython alif port include USB support via TinyUSB, dual-core support using OpenAMP, octal SPI flash with XIP, the machine classes Pin, UART, SPI and I2C, and cyw43 WiFi and BLE support. Two alif board definitions are currently available: ALIF_ENSEMBLE for the official Alif Ensemble E7 DevKit, and OPENMV_AE3 for OpenMV's upcoming AE3-based camera board. MicroPython's inline assembler now supports 32-bit RISC-V assembly code via the newly implemented `@micropython.asm_rv32` decorator. This allows writing small snippets of RISC-V machine code that can be called directly from Python code. It is enabled on the rp2 port when the RP2350 is running in RISC-V mode. Datagram TLS (DTLS) is now supported by the `tls` module and enabled on the alif, mimxrt, renesas-ra, rp2, stm32 and unix ports. An `SSLContext` can be created in DTLS mode using `tls.PROTOCOL_DTLS_CLIENT` or `tls.PROTOCOL_DTLS_SERVER` as the mode option, and this context can then be used to wrap a normal UDP socket to get a secure UDP connection. The mpremote command-line tool now supports recursive remove via the new `rm -r` option; for example, `mpremote rm -rv :` can be used to remove all files and directories in the current working directory of the target device. mpremote also now supports relative URLs in the `package.json` file, installing from the local filesystem, and has optimised readline support in `mpremote mount`. Improvements to the core interpreter include: full support for tuples and start/end arguments in the `str.startswith()` and `str.endswith()` methods; enabling of the two-argument version of the built-in `next()` function on most of the ports; a new `sys.implementation._build` entry which holds the build name of the target; and `vfs.mount()` with no arguments now returns a list of mounted filesystems. The `marshal` module has been added with `dumps()` and `loads()` functions, which currently support code objects and, in combination with `function.__code__`, allow converting functions to/from a bytes object. This module is not enabled by default but can be used in custom build configurations. The MicroPython native linker `mpy_ld.py` now includes support for linking in static libraries automatically. This allows the native-module build scripts to look for required symbols from libraries such as `libgcc` and `libm` that are provided by the compiler. This now makes it possible to use standard C functions like `exp()` in native modules. Also, native modules now support 32-bit RISC-V code. The esp32 port now supports IDF v5.3 and v5.4, and support for versions below v5.2.0 has been dropped. Dynamic USB device support is now enabled on ESP32-S2 and ESP32-S3 MCUs, allowing configuration of the USB device at runtime. I2S has been enabled on all ESP32-C3 boards, the `Pin.toggle()` method has been added, and the I2C bus identifier is now an optional argument (by default, bus 0 is used). Additionally, memory management has been improved for the allocation of TLS sockets to attempt to automatically free any existing unused TLS memory when needed. The mimxrt port now enables exFAT filesystem support and the PPP driver for boards with lwIP networking, and has support for a UF2 bootloader, making it easier to deploy firmware. The `machine.RTC.now()` method has been dropped (use `datetime()` instead), `ADC.read_uv()` has been added, and `machine.I2C` has support for the `timeout` keyword argument. The I2C, SPI and UART classes now support default buses, so the first argument to these constructors is no longer needed if the default bus is used. Some inconsistencies with PWM output have been fixed, along with an allocation bug for the UART RX and TX buffers. The rp2 port sees the introduction of many new RP2350 boards, including the Pico 2 W, as well as support for PSRAM with size autodetection. The PIO interface now supports `side_pindir` selection, and SPI allows the MISO pin to be unspecified. Both the I2C and SPI classes now have the bus identifier as an optional argument with a default based on the board configuration. WPA3 is now supported on the Pico W and Pico 2 W in both AP and STA modes. Lost WiFi events due to code executing on the second core have now been fixed, mDNS has been fixed, and `rp2.bootsel_button()` and USB sleep now work on RP2350. ROMFS support has been added but is not enabled on any board by default; see commit 50a7362b3eff211a5051eeaecc88bdde045c90d1 for information on how to enable it manually. The samd port has added full support for 9-bit data in the UART peripheral and supports default buses and pins for I2C, SPI and UART. DAC for two channels has been fixed on SAMD51, and UART buffering has had a few bug fixes. The stm32 port now deinitialises I2C and SPI buses on soft-reset, which may be a breaking change for certain applications; be sure to always initialise I2C and SPI instances when creating them. The CAN code has been refactored, and a few minor bugs have been fixed there. Corrupt littlefs filesystems are now handled properly at startup: instead of a failed mount leading to a hard fault, the code attempts to mount again with default block device parameters, and if that also fails, it prints a message and continues the boot process. ROMFS is enabled on PYBD-SFx boards and all Arduino boards and can be enabled on other boards by manual configuration; see commit bea7645b2e55881c4f42e6cfbe2a6433c5986794 for details. The PYBD-SF6 firmware now supports both original boards and new boards with larger SPI flash. WPA3 is now supported on boards using the cyw43-driver. mboot now includes a version string which is placed at the very end of the flash section allocated for this bootloader (usually 32k); this version can be retrieved using the `fwupdate.get_mboot_version()` function. The zephyr port has had `machine.Timer` and `machine.WDT` implemented. New boards added in this release are: ALIF_ENSEMBLE and OPENMV_AE3 (alif port), MAKERDIARY_RT1011_NANO_KIT (mimxrt port), MACHDYNE_WERKZEUG, RPI_PICO2_W, SEEED_XIAO_RP2350, SPARKFUN_IOTNODE_LORAWAN_RP2350, SPARKFUN_IOTREDBOARD_RP2350, SPARKFUN_PROMICRO_RP2350, SPARKFUN_THINGPLUS_RP2350, SPARKFUN_XRP_CONTROLLER, SPARKFUN_XRP_CONTROLLER_BETA and WEACTSTUDIO_RP2350B_CORE (rp2 port), ADAFRUIT_NEOKEY_TRINKEY, ADAFRUIT_QTPY_SAMD21, SAMD_GENERIC_D21X18, SAMD_GENERIC_D51X19 and SAMD_GENERIC_D51X2 (samd port), WEACT_F411_BLACKPILL (stm32 port). The change in code size since the previous release for select builds of various ports is (absolute and percentage change in the text section): bare-arm: +4 +0.007% minimal x86: -90 -0.049% unix x64: +16941 +2.046% stm32: -96 -0.025% cc3200: +280 +0.152% esp8266: +964 +0.138% esp32: +10956 +0.654% mimxrt: +7508 +2.065% renesas-ra: -160 -0.026% nrf: +168 +0.090% rp2: +7944 +0.872% samd: +1112 +0.418% The leading causes of these changes in code size are: - minimal, stm32, renesas-ra: various small code-size optimisations - unix: enable VfsRom, update mbedTLS to v3.6.2, enable DTLS - cc3200: implement `Pin.toggle()` method - esp8266: enable function attributes, implement `Pin.toggle()`, allow enumerating connected stations in AP mode, update requests package - esp32: lots of small fixes and improvements - mimxrt: enable exFAT, add `function.__code__` and function constructor - nrf: various small features such as `sys.implementation._build`, two-argument built-in `next()`, no-argument `vfs.mount()` - rp2: update mbedTLS to v3.6.2, enable DTLS, update cyw43-driver to 1.1.0 - samd: support UART 9-bit data, add `function.__code__` and function constructor, provide default IDs for UART, I2C and SPI Performance of the VM and runtime is effectively unchanged since the previous release. Thanks to everyone who contributed to this release: Alessandro Gatti, Alex Brudner, Amirreza Hamzavi, Andrew Leech, Angus Gratton, Anson Mansfield, Carl Pottle, Christian Clauss, chuangjinglu, Corran Webster, Damien George, danicampora, Daniël van de Giessen, Dryw Wade, eggfly, Garry W, garywill, Glenn Moloney, Glenn Strauss, Graeme Winter, Hans Maerki, Herwin Grobben, I. Tomita, iabdalkader, IhorNehrutsa, Jan Klusáček, Jan Sturm, Jared Hancock, Jeff Epler, Jon Nordby, Jos Verlinde, Karl Palsson, Keenan Johnson, Kwabena W. Agyeman, Lesords, machdyne, Malcolm McKellips, Mark Seminatore, Markus Gyger, Matt Trentini, Mike Bell, Neil Ludban, Peter Harper, peterhinch, Phil Howard, robert-hh, Ronald Weber, rufusclark, Sebastian Romero, Steve Holden, stijn, StrayCat, Thomas Watson, Victor Rajewski, Volodymyr Shymanskyy, Yoctopuce. MicroPython is a global Open Source project, and contributions were made from the following timezones: -0800, -0700, -0600, -0500, -0400, +0000, +0100, +0200, +0300, +0330, +0700, +0800, +1000, +1100, +1300. The work done in this release was funded in part through GitHub Sponsors, and in part by George Robotics, Espressif, Arduino, LEGO Education, OpenMV and Planet Innovation. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== py core: - objdeque: fix buffer overflow in deque_subscr - py.mk: add check that any specified USER_C_MODULES folder exists - usermod.cmake: add check that any specified USER_C_MODULES exists - usermod.cmake: if USER_C_MODULES is a folder add micropython.cmake - objfloat: workaround non-constant NAN definition on Windows MSVC - misc: fix msvc and C++ compatibility - emitglue: fix clear cache builtin warning on Clang for AArch32 - mkrules.mk: use partial clone for submodules if available - dynruntime.mk: delete compiled module file on clean - qstr: add qstr_from_strn_static() helper function - reader: provide mp_reader_try_read_rom() function - persistentcode: add support for loading .mpy files from a ROM reader - misc: add a popcount(uint32_t) implementation - emitinlinerv32: add inline assembler support for RV32 - obj: cast float literals to 64-bit to prevent overflow warning - obj: make literals unsigned in float get/new functions - asmarm: fix asm_arm_ldrh_reg_reg_offset to emit correct machine code - asmarm: allow function state to be larger than 255 - asmarm: fix locals address loading code generation with large imm - asmarm: fix halfword loads with larger offsets - mkrules.mk: move comment about partial clones outside make rule - persistentcode: initialize prelude_ptr to prevent compiler warning - parsenum: throw an exception for invalid int literals like "01" - emitnative: optimise Viper register offset load/stores on Xtensa - emitnative: emit shorter exception handler entry code on RV32 - emitnative: optimise Viper immediate offset load/stores on Xtensa - mkrules: add GIT_SUBMODULES_FAIL_IF_EMPTY flag for CMake ports - parsenumbase: favor clarity of code over manual optimisation - gc: split out running finalizers to a separate pass - gc: allow gc_free from inside a gc_sweep finalizer - add optional support for recursive mutexes, use for gc mutex - gc: reorder static functions for clarity - mkrules.mk: reset USER_C_MODULES when building mpy-cross dependency - emitnative: mark condition code tables as const - emitnative: load and store words just once for Viper code - objcode: factor code object out into its own file - objfun: implement function.__code__ and function constructor - persistentcode: add mp_raw_code_save_fun_to_bytes - mkrules.cmake: support passing CFLAGS_EXTRA in environment variable - emitinlinerv32: fix compilation with ESP-IDF v5.2 and later - emitinlinerv32: reduce the footprint of compiled code - emitinlinextensa: simplify register name lookup - parsenum: reduce code footprint of mp_parse_num_float - objstr: support tuples and start/end args in startswith and endswith - modsys: add sys.implementation._build entry - makeqstrdata.py: implement MicroPython compatibility - objarray: add MP_DEFINE_MEMORYVIEW_OBJ convenience macro - runtime: automatically mount ROMFS as part of mp_init - mpconfig: enable 2-argument built-in next() at basic feature level - dynruntime: make malloc functions raise MemoryError on failure - emitinlinerv32: move include of asmrv32.h to within feature guard extmod: - modlwip: fix IGMP address type when IPv6 is enabled - nimble: remove asserts of ediv_rand_present and adjust comments - modlwip: don't allow writing to a TCP socket that is connecting - network_ppp: add stream config parameter - network_ppp: allow stream=None to suspend PPP - vfs_blockdev: support bool return from Python read/write blocks - network_cyw43: fix isconnected() result on AP interface - network_cyw43: fix uninitialised variable in status('stations') - network_cyw43: allow configuring active AP interface - modframebuf: fix 0 radius bug in FrameBuffer.ellipse - modplatform: distinguish AArch64 from AArch32 - modplatform: add Clang to the known compilers list - modplatform: add Android to the recognised platforms list - extmod.mk: fix libmetal build prefix - modplatform: distinguish RISC-V 64 from RISC-V 32 - moductypes: fix large return values of addressof and INT_MAYBE - vfs: guard mutating fs functions with MICROPY_VFS_WRITABLE - vfs_rom: add VfsRom filesystem object - vfs_reader: add support for opening a memory-mappable file - modsocket: add missing static in private function definitions - moddeflate: add missing size_t cast - modlwip: fix incorrect peer address for IPv6 - lwip-include: factor common lwIP config into lwipopts_common.h - mbedtls: try GC before failing to setup socket on esp32, unix - modmarshal: add new marshal module - vfs_rom: remove ability to create VfsRom from an address - lwip-include: increase number of lwIP timers when mDNS enabled - modtls_mbedtls: wire in support for DTLS - vfs_rom: add bounds checking for all filesystem accesses - modvfs: add vfs.rom_ioctl function and its ioctl constants - vfs: add mp_vfs_mount_romfs_protected() helper - network_cyw43: add WPA3 security constants - moddeflate: keep DeflateIO state consistent on window alloc fail - vfs: refactor mp_vfs_mount to enable no-args mount overload - vfs: return mount table from no-args vfs.mount call - vfs_rom: implement minimal VfsRom.getcwd() method - implement UPDATE_SUBMODULES in CMake - extmod.mk: add cyw43_spi.c to list of sources - extmod.mk: switch from drivers/cyw43/cywbt to lib/cyw43-drivers shared: - tinyusb: set MSC max endpoint size based on device speed - runtime/gchelper_generic: fix AArch32 build on Clang - timeutils: add missing mp_uint_t casts - runtime/pyexec: add helper function to execute a vstr drivers: - memory/spiflash: add a config option to soft-reset SPI flash - add MP_QSPI_IOCTL_MEMORY_MODIFIED to indicate flash changed - memory/spiflash: allow a board/port to configure chip params - memory/spiflash: allow a board/port to detect SPI flash - bus/qspi: make num_dummy configurable for quad reads mpy-cross: no changes specific to this component/port lib: - micropython-lib: update submodule to latest - pico-sdk: update to version 2.1.0 - mbedtls: update to mbedtls v3.6.2 - pico-sdk: update to version 2.1.1 - cyw43-driver: update driver to latest version v1.1.0 - alif_ensemble-cmsis-dfp: add new submodule for Alif SDK v1.3.2 - alif-security-toolkit: add new submodule for Alif Security Toolkit Support components ================== docs: - reference/packages: fix description of --target option in mip - specify the recommended network.WLAN.IF_[AP|STA] constants - add a "Reset and Boot Sequence" reference page - rp2: add a small factory reset page - esp32: add a factory reset page - library: note link between machine.soft_reset() and sys.exit() - change copyright line to mention "authors and contributors" - update machine.TouchPad docs for ESP32-S2 and ESP32-S3 - fix some comments and error messages with doubled-up words - library/binascii: add docs for binascii.crc32 method - fix the quickref documentation of rtc.datetime() - reference/isr_rules: describe issue with hard ISRs and globals - esp32: update tutorial flashing steps to match deploy.md - esp32: defer to the download page for flashing steps - update copyright year range to include 2025 - samd/pinout: add pinout for Adafruit NeoKey Trinkey and QT Py - samd/pinout: add pinout for the Generic SAMD board types - esp32: add documentation for SPI Ethernet devices on esp32 port - note which ports have default or optional network.PPP support - reference: add strings vs bytes to speed optimisation tips - library/espnow: clarify usage of the "rate" configuration key - library/marshal: document the marshal module - fix double 'the' in documentation - library/machine.Pin: show availability of low, high and toggle - samd: update the SAMD documentation describing default IDs/pins - rp2: add network information to the rp2 quickref - library/vfs: document no-args mount output - reference/mpremote: update docs for mpremote rm -r - note that machine.USBDevice is now available on esp32 port examples: - natmod/re: fix build on RV32 with alloca tests: - basics/deque2.py: add tests for deque subscript-from-end - run-tests.py: simplify the way target-specific tests are given - run-tests.py: change --target/--device options to --test-instance - run-tests.py: add mimxrt and samd platforms - use the recommended network.WLAN.IF_[AP|STA] constants - cpydiff: fix test case for modules_json_nonserializable - net_hosted: improve and simplify non-block-xfer test - multi_espnow: add channel setting test, add some docs - add basic wlan test - misc/sys_settrace_features.py: add note about CPython 3.12 issue - extmod: workaround CPython warning in asyncio_new_event_loop test - run-tests.py: add support for tests to use unittest - run-tests.py: print .out file when there is no .exp file - ports/stm32_hardware: convert DMA test to use unittest - net_hosted: convert connect-nonblock-xfer test to use unittest - extmod: convert machine1.py test to use unittest - extmod_hardware: add a test for machine.PWM freq and duty - extmod: add test for uctypes.addressof function - run-tests.py: set name of injected test module to '__main__' - fix all file ioctl's to support only MP_STREAM_CLOSE - extmod: add VfsRom test - inlineasm: make room for RV32IMC inline asm tests - run-tests.py: detect inlineasm support and add tests if needed - run-tests.py: set __main__ module to __injected_test - run-tests.py: implement getcwd on __FS hook filesystem - extmod/vfs_rom.py: import errno for test - README: update TLS certificate generation instructions - multi_net: update TLS test certificates and keys - extmod/re_sub.py: fix test execution on Python 3.13 - basics/nanbox_smallint.py: fix incorrect use of int() in test - add a test for SSL socket memory leaks - ports/rp2: add test for SLEEP_ENx registers over lightsleep - multi_wlan: remove esp8266 port workaround - run-natmodtests.py: autodetect the test target architecture - run-tests.py: give more information when CPython crashes - multi_net: add test for DTLS server and client - four typos in tests directory - run-tests: remove any 'expected' file from a unittest run - multi_pyb_can: add multitests for pyboard CAN controller - cpydiff: remove builtin_next_arg2.py difference - extmod/vfs_mountinfo.py: add test for no-args mount output - cpydiff: update CPy diff for assign expr in nested comprehensions - cpydiff: remove types_str_endswith - ports/alif_hardware: add flash testing script - update UART and SPI tests to work on Alif boards - run-tests: print a note if it looks like unittest.main() missing tools: - mpremote: fix UnboundLocalError in Transport.fs_writefile() - ci.sh: fix commit msg checking when PR branch HEAD behind master - ci.sh: fix reference commit for code size comparison - mpremote: make sure stdout and stderr output appear in order - mpremote: add test for forced copy - mpremote: support trailing slash on dest for non-recursive copy - ci.sh: remove explicit macOS pkg-config install - ci.sh: re-enable vfs_posix tests on unix qemu MIPS CI - boardgen.py: provide macro defns for number of cpu/board pins - mpy_ld.py: add native modules support for RV32 code - verifygitlog.py: show invalid commit subjects in quotes - ci.sh: run test_full for qemu port CI - autobuild: don't allow a board to change its ID - pyboard.py: wait a bit before accessing the PTY serial port - autobuild: template the generation of esp32 port deploy.md - mpremote: avoid initial blocking read in read_until() - mpremote: introduce timeout_overall for read_until() - ci.sh: add natmod tests for QEMU/Arm - ci.sh: build MIMXRT1060_EVK with MSC enabled as part of mimxrt CI - mpremote: support mip install from package.json on local fs - pyboard.py: make get_time use machine.RTC instead of pyb.RTC - ci.sh: build the W5100S_EVB_PICO board with no threads - mpremote: add support for relative urls in package.json files - mpremote: optimise readline support in mount - mpremote/tests: add test for RemoteFile.readline - mpy-tool.py: add support for self-hosting of mpy-tool - mpy-tool.py: support calling main() from an external script - mpremote: add romfs query, build and deploy commands - mpy_ld.py: allow linking static libraries - ci.sh: build Xtensa natmods as part of the CI process - ci.sh: do not assume the Python interpreter is called "python" - mpremote: make mip install skip /rom*/lib directories - mpy_ld.py: give better error for unsupported ARM absolute relocs - ci.sh: manually install picotool for rp2 builds - gen-cpydiff.py: fail CPython diff generation if output matches - mpremote: allow .img for ROMFS file and validate ROMFS image - mpremote: add recursive remove functionality to filesystem cmds - mpremote/tests: add tests for mpremote rm -r CI: - upgrade codespell to v2.4.1 - upgrade to ruff v0.9.6 - workflows: workaround using CPython 3.12 in MSYS2 builds - workflows: bump codecov/codecov-action from 4 to 5 - workflows: use Python 3.11 for unix settrace jobs - workflows: use ubuntu-22.04 for unix qemu CI - workflows: stop using ubuntu-20.04 - workflows: include the Python version in the ESP-IDF cache key - workflows: add Alif port to CI - cache Zephyr workspace installation - pull the Zephyr CI docker image from GitHub container reg - add caching of ccache for Zephyr The ports ========= all ports: - make PWM duty_u16 have an upper value of 65535 across all ports - fix some comments and error messages with doubled-up words - fix machine.RTC.init() method so argument order matches the docs alif port: - tinyusb_port: add Alif TinyUSB DCD driver - tinyusb_port: disable USB IRQ on deinit - tinyusb_port: implement SOF event - add initial port to Alif Ensemble MCUs - system_tick: use a UTIMER for system ticks and timing - mphalport: enable efficient events and implement quiet timing - system_tick: integrate soft timer - modmachine: enable machine.Timer - se_services: add SE services interface - mpconfigport: enable os.urandom() - mpconfigport: enable MICROPY_PY_RANDOM_SEED_INIT_FUNC - modalif: add alif.info() function - modmachine: implement machine.unique_id(), fix machine.reset() - usbd: implement proper USB serial number - machine_adc: add basic ADC support - mcu: add ToC config for dual images - support building the port for HE or HP or both cores - support running the port on the HE core - implement Open-AMP port backend - irq: define more IRQ priorities - system_tick: implement optional LPTIMER support for systick - system_tick: implement optional ARM SysTick support for systick - mpconfigport: select SysTick on HE core - mpu: add custom MPU_Load_Regions function - ospi_flash: generalise flash driver to support MX chips - ospi_flash: enter XIP mode when flash is idle - mpu: define constants for MPU regions - mpmetalport: add Open-AMP MPU region - ospi_flash: fix XIP for 8-bit instructions (ISSI) - ospi_flash: support flash device auto-detection in runtime - ospi_flash: configure dummy cycles - ospi_flash: add negative clock pin - ospi_flash: enable pull-up IO2/WP - ospi_ext: optimize XIP speed - ospi_flash: use OSPI in XIP mode only - ospi_flash: add 16-bit words swap flash setting - se_services: use EUI extension for unique id - modmachine: implement proper low-power modes - add support for pin alternate function selection - machine_i2c: add machine.I2C peripheral support - machine_spi: add machine.SPI peripheral support - machine_rtc: add basic machine.RTC support - ospi_flash: use mp_hal_pin_config to configure OSPI pins - se_services: add a secondary MHU channel - mpmetalport: use MHU to notify remote cores - link with libnosys - mpmetalport: only notify after metal subsystem is init'd - mpuart: use mp_hal_pin_config for TX/RX configuration - alif_flash: distinguish between total flash size and FS size - alif_flash: make flash respond to the buffer protocol - mpu: add function to set read-only bit on MRAM MPU region - vfs_rom_ioctl: add vfs_rom_ioctl with support for OSPI and MRAM - modules: make HE core set /rom as current dir - mphalport: add mp_hal_pin_config_irq_falling helper - mpuart: generalise UART driver to suppot all UART instances - integrate lwIP and mbedTLS - integrate cyw43 WLAN driver - integrate cyw43 Bluetooth with NimBLE - mcu: remove json config files - mcu: pre-process Alif ToC config file - mpuart: enhance UART to support bits/parity/stop and more IRQs - machine_uart: add machine.UART peripheral support - support more fine-grained pin alternate function selection - ospi_flash: don't invalidate cache after erasing/writing - ospi_flash_settings: use 8-bit DFS for XIP - ospi_flash: restore XIP settings after erase and write - mpu: add MPU region for OSPI1 XIP memory range - boards/ALIF_ENSEMBLE: add Alif Ensemble board config - boards/OPENMV_AE3: add OpenMV AE3 board definition bare-arm port: no changes specific to this component/port cc3200 port: - mods/pybpin: implement Pin.toggle() method embed port: no changes specific to this component/port esp8266 port: - use the recommended network.WLAN.IF_[AP|STA] constants - mpconfigport: enable function attributes - Makefile: fix local toolchain builds on recent Linux systems - network_wlan: make WLAN.config('channel') use wifi_get_channel - network_wlan: make WLAN.config(channel=x) use wifi_set_channel - machine_pin: implement Pin.toggle() method - network_wlan: allow enumerating connected stations in AP mode - implement vfs.rom_ioctl with support for external flash - boards: add FLASH_2M_ROMFS variant with 320k ROM partition - rename ROMFS partition config variables to include "part0" esp32 port: - move the linker wrap options out of the project CMakeLists - add some notes about the different CMake files - machine_hw_spi: reject invalid number of bits in constructor - machine_pwm: use IDF functions to calculate resolution correctly - network_wlan: add missing WLAN security constants - machine_pwm: restore PWM support for ESP-IDF v5.0.x and v5.1.x - workaround native code execution crash on ESP32-S2 - use the recommended network.WLAN.IF_[AP|STA] constants - modsocket: fix getaddrinfo hints to set AI_CANONNAME - fix setting WLAN channel in AP mode - use hardware version for touchpad macro defines - fix machine.TouchPad startup on ESP32-S2 and S3 - update machine.TouchPad docs for ESP32-S2 and ESP32-S3 - add missing network.STAT_CONNECT_FAIL constant - fix link failure due to link library order - add basic espressif IDF v5.3 compatibility - fix machine_touchpad compiling on IDFv5.3 - pass V=1 or BUILD_VERBOSE through to idf.py when building - use capability defines to configure features - mpconfigport: use the appropriate wait-for-interrupt opcode - drop support for ESP-IDF below V5.2.0 - remove IDF-version-specific sdkconfig - simplify thread cleanup - enable machine.USBDevice to configure USB at runtime - machine_timer: restrict timer numbers for ESP32C6 to 0 and 1 - boards: remove remaining "id" entries from board.json - template the generation of esp32 port deploy.md - boards: update the product name for some UM boards - add support for IDF v5.4 - disable component manager when running 'make submodules' - don't add TinyUSB files to an ECHO_SUBMODULES build - README: fix board in octal-SPIRAM example make command - boards: enable I2S on ESP32C3 boards - machine_sdcard: fix invalid result of SDCard.read/writeblocks - remove unneeded "memory.h" header file - machine_i2c: make I2C bus ID arg optional with default - README: make some minor improvements to the README - esp32_common.cmake: allow overriding linker.lf - machine_pin: implement Pin.toggle() method - implement vfs.rom_ioctl with support for external flash - merge the per-SoC "main" components back together - remove the ESP32 ringbuffer linker workaround - machine_sdcard: add SDCard pin assignments for ESP32-S3 support - machine_sdcard: add SDCard SPI mode support for ESP32-S2,C3,C6 - boards: enable machine.SDCard on all boards - machine_pwm: correctly stop LEDC timer - machine_pin: fix logic clearing USB_SERIAL_JTAG_USB_PAD_ENABLE - machine_pin: fix availability of USB Serial/JTAG pins on ESP32-C6 - implement UPDATE_SUBMODULES in CMake - Makefile: use $(Q) prefix on all commands - esp32_common.cmake: use native gchelper for RISC-V - esp32_common.cmake: clean up RISC-V directives - esp32_common.cmake: remove obsolete definition mimxrt port: - machine_pwm: fix a few inconsistencies with PWM output - switch to shared TinyUSB descriptor - mpconfigport: update FATFS config to align with other ports - machine_rtc: deprecate RTC.cancel in MicroPython v2 - machine_rtc: drop machine.RTC.now() method - irq: add CSI IRQ - machine_rtc: fix build with new SDKs - mpconfigport: remove hard-coded CMSIS header - add support for a UF2 bootloader - hal: update the LUT and re-enable PAGEPROGRAM_QUAD - flash: swap the order of disabling IRQ and disabling the cache - boards: update the deploy instructions for the UF2 bootloader - boards: add flash configuration constants to mpconfigboard.mk - hal: set the flexspi flash CLK frequency on boot - add optional MSC support - boards: reduce stack size for 1011 and 1015 MCUs - boards/ADAFRUIT_METRO_M7: reduce flash freq to 100MHz - hal/flexspi_nor_flash: fix typo in comment about frequency - boards/MAKERDIARY_RT1011_NANO_KIT: add new Makerdiary board - machine_adc: add ADC.read_uv() method - mpconfigport: enable support for exFAT - mpconfigport: enable PPP for boards with lwIP - machine_uart: remove duplicate init and make IRQ optional - hal/qspi_nor_flash_config: use a safe common CS timing - machine_uart: fix rx/tx buffer allocation bug - machine_i2c: support the timeout keyword argument - enable default devices for I2C, SPI and UART - boards: update deploy instructions - Makefile: fix dependencies for generation of flexram_config.s minimal port: no changes specific to this component/port nrf port: - drivers/ticker: reset slow ticker callback count on soft reboot - boards/ARDUINO_NANO_33_BLE_SENSE: update LED and timer config - modules: fix access of read-only buffer in Flash.writeblocks pic16bit port: - make it build with recent XC16 versions powerpc port: no changes specific to this component/port qemu port: - Makefile: include unittest in firmware - mpconfigport: enable VFS reader, loading .mpy files and io.IOBase - add test_natmod target for RV32 and use as part of CI pipeline - mpconfigport: enable VfsRom - main: make GC heap size configurable on a per-arch basis - boards: exclude Thumb2 tests and tests failing with native emitter - Makefile: add test_full target to run a comprehensive test suite - mcu/arm: dump exception cause and registers on machine error - disable native emitter for the MICROBIT board - Makefile: increase GC heap size to 140KiB - boards/SABRELITE.mk: remove exception for omitted tests - boards: change boards to use a subdirectory like other ports - Makefile: fix shell interpolation for automated natmod tests - boards/SABRELITE: increase MicroPython heap to 160k renesas-ra port: - mpconfigport: switch FATFS LFN to type 2 - Makefile: remove id_code section from binary file generation - modrenesas: expose the Flash block device to Python code rp2 port: - README: remove redundant `global` statement from example code - mpconfigport: switch FATFS LFN to type 2 - pass V=1 or BUILD_VERBOSE to rp2 build - modmachine: fix USB sleep on RP2350 MCUs - CMakeLists.txt: add components required by bootrom.h - cyw43_configport: define cyw43 pins - mphalport: add mp_hal_is_pin_reserved() function - boards/RPI_PICO2_W: add new Pico 2 W board definition - boards/RPI_PICO2_W: add RISCV variant for Pico 2 W - boards/SPARKFUN_PROMICRO: fix SparkFun Pro Micro RP2040 image - mpconfigport: enable RV32 inline assembly support - mphalport: fix mp_hal_pin_low/high() for pin>=32 - machine_bitstream: tweak MP_HAL_BITSTREAM_NS_OVERHEAD for RP2350 - boards/SPARKFUN_PROMICRO_RP2350: add SparkFun Pro Micro RP2350 - boards/SPARKFUN_THINGPLUS_RP2350: add SparkFun Thing Plus RP2350 - migrate to the new mp_thread_recursive_mutex_t - modmachine: make lightsleep preserve SLEEP_EN0 and SLEEP_EN1 - rp2_flash: workaround multicore lockout not being reset - rp2_pio: add side_pindir support for PIO - boards: add SparkFun IoT Node LoRaWAN board - modules: fix memory leak and logic bug in handling of _pio_funcs - fix build failure if threads are disabled - boards/MACHDYNE_WERKZEUG: add support for Machdyne Werkzeug - boards/SPARKFUN_XRP_CONTROLLER_BETA: add SparkFun XRP Controller - machine_i2c: make I2C bus ID arg optional with default - implement vfs.rom_ioctl with support for external flash - modrp2: fix rp2.bootsel_button() function for RP2350 - boards/SPARKFUN_IOTREDBOARD_RP2350: add support for IoT RedBoard - boards/WEACTSTUDIO_RP2350B_CORE: add WeAct Studio RP2350B Core - boards/SPARKFUN_XRP_CONTROLLER: add SparkFun XRP Controller - boards/SPARKFUN_XRP_CONTROLLER_BETA: fix XRP Controller Beta URL - boards/SEEED_XIAO_RP2350: add new Seeed XIAO board definition - boards: fix SparkFun vendor name - boards/SPARKFUN_IOTNODE_LORAWAN_RP2350: add SD card support - machine_i2c: require an I2C bus ID when no default is available - machine_spi: make SPI ID optional - machine_spi: allow MISO to be unspecified - mpnetworkport: fix lost CYW43 WiFi events when using both cores - mpnetworkport: refactor out cyw43_has_pending global variable - pendsv: account for PendSV running on both cores, and without CYW43 - machine_uart: fix unintended UART buffer allocation on init() - implement UPDATE_SUBMODULES in CMake - print an error message if pico-sdk submodule is missing - Makefile: use $(Q) prefix on all commands - cyw43_configport: fix cyw43 mDNS by properly starting mDNS on netif - add support for PSRAM with auto-detection - mpconfigport: configure heap for PSRAM - rp2_flash: support flash writes from PSRAM - rp2_flash: configure optimal flash timings samd port: - machine_uart: add full support for 9-bit data - boards/SAMD21_XPLAINED_PRO: add specific deploy instructions - mboot: provide a UF2 bootloader for SAMD21 Xplained Pro - boards/SAMD21_XPLAINED_PRO: use the SPI flash for the file system - samd_flash: make flash read/write methods access self parameters - mboot/README.md: add information about the bootloader source - machine_dac: fix SAMD51 DAC for two channels - samd_qspiflash: correct QSPI baud calculation - boards: add generic SAMD21x18 board definitions - boards: add generic SAMD51x19 board definitions - boards: add generic SAMD51x20 board definitions - Makefile: add support for board variants - boards: add support for the Adafruit QT Py board - boards: add support for the Adafruit NeoKey Trinkey board - machine_i2c: support default instance and SCL/SDA pin values - machine_spi: support default instance and SCK/MOSI/MISO pin values - machine_uart: support default instance and TX/RX pin values - boards: add missing TX/RX, SCL/SDA and SCK/MOSI/MISO pin names - boards: provide default IDs for UART, I2C and SPI - machine_uart: fix unintended UART buffer allocation on init() - machine_uart: fix lock-up in loopback mode if read buffer is full stm32 port: - boards: update Arduino board configs for SPI reset and bootloader - boards: rename SDRAM frequency config option to make units clear - sdram: make SDRAM refresh count configurable by a board - spi: add spi_deinit_all function - pyb_i2c: add pyb_i2c_deinit_all function - main: deinitialize SPI and I2C on soft-reset - mpconfigport: switch FATFS LFN to type 2 - boards/STM32F429DISC: fix SDRAM configuration - pin: add option to exclude legacy Pin methods and constants - pin: add config option to exclude Pin alternate function - pin: exclude Pin.cpu/Pin.board if they contain no entries - extint: fix EXTI IRQ handlers for H5 MCUs - boards/WEACT_F411_BLACKPILL: add WeAct F411 'blackpill' boards - generate PLL tables from pre-processed headers - fix extraction of hse/hsi/pllm values from preprocessed source - mboot: add mboot version string - mpconfigboard_common: add MICROPY_HW_SPI_IS_STATIC macro - spi: retain the state of special SPI buses on soft reboot - boards: reserve SPI bus when it's used for external flash storage - boards: support 'FDCAN' in board pin CSVs - pyb_can: fix CAN-FD BRS baud initialisation - pyb_can: make pyb.CAN baud calculation a little more forgiving - pyb_can: include requested CAN baudrate in matching error - can: fix clearing filters on CAN3 (bxCAN) - fdcan: fix extended CAN ID filtering for stm32g4 - boards/ARDUINO_NICLA_VISION: fix CAN pin assignment - boards: update Arduino boards to reserve timers and fix USB PID - eth: make ETH DMA buffer attributes configurable - sdcard: fix unchecked uint32_t overflow in SD card driver - sdcard: drop the pyb.SDCard timeout from 60 to 30 seconds - implement vfs.rom_ioctl with support for internal/external flash - boards: enable ROMFS partitions on PYBD_SFx boards - rename ROMFS partition config variables to start at index 0 - boards/ARDUINO_GIGA: enable 4MiB ROMFS partition in ext flash - boards/ARDUINO_NICLA_VISION: enable 4MiB ROMFS part in ext flash - boards/ARDUINO_PORTENTA_H7: enable 4MiB ROMFS part in ext flash - can: refactor can.h API to not depend on pyboard can types - qspi: implement MP_QSPI_IOCTL_MEMORY_MODIFIED ioctl - main: catch and report corrupted lfs filesystem at startup - boards: add F427 AF CSV file - stm32_it: add handler for timer 20 interrupt - timer: use APB2 to calculate timer 20 source frequency - timer: add support for STM32H5 Timer 1 - qspi: add qspi_memory_map_exit and restart - boards/PYBD_SF2: restart qspi memory-mapped mode during startup - vfs_rom_ioctl: allow ROMFS configuration to be dynamic - qspi: allow SPI flash size to be decided at runtime - mboot: allow USB strings to be dynamic - modmachine: add SPI flash size to machine.info dump - boards/PYBD_SF6: support boards with larger SPI flash unix port: - force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI - enable VfsRom on standard and coverage variants - use the bare metal mbedTLS config in the coverage buiid - add recursive mutex support - main: add coverage test for mounting ROMFS filesystem at startup webassembly port: no changes specific to this component/port windows port: - force _FILE_OFFSET_BITS=64 to fix 32-bit file ABI zephyr port: - machine_wdt: add watchdog timer implementation - machine_timer: add machine.Timer class implementation
f498a16
2025-04-15 22:28
下载
v1.24.1
Patch release for mpremote, rp2 IGMP, esp32 PWM, SDCard, and AP channel This is a patch release containing the following commits: - tools/mpremote: fix UnboundLocalError in Transport.fs_writefile() - esp32/machine_pwm: use IDF functions to calculate resolution correctly - pic16bit: make it build with recent XC16 versions - py/objdeque: fix buffer overflow in deque_subscr - extmod/modlwip: fix IGMP address type when IPv6 is enabled - esp32/machine_pwm: restore PWM support for ESP-IDF v5.0.x and v5.1.x - esp32: workaround native code execution crash on ESP32-S2 - tools/mpremote: make sure stdout and stderr output appear in order - tools/mpremote: add test for forced copy - tools/mpremote: support trailing slash on dest for non-recursive copy - esp32/modsocket: fix getaddrinfo hints to set AI_CANONNAME - extmod/vfs_blockdev: support bool return from Python read/write blocks - extmod/network_cyw43: fix isconnected() result on AP interface - extmod/network_cyw43: fix uninitialised variable in status('stations') - extmod/network_cyw43: allow configuring active AP interface - esp32: fix setting WLAN channel in AP mode - esp32: use hardware version for touchpad macro defines - esp32: fix machine.TouchPad startup on ESP32-S2 and S3 - extmod/modframebuf: fix 0 radius bug in FrameBuffer.ellipse - nrf/drivers/ticker: reset slow ticker callback count on soft reboot - py/objfloat: workaround non-constant NAN definition on Windows MSVC
ecfdd5d
2024-11-29 20:53
下载
v1.25.0-preview
44dc6eb
2024-10-28 08:08
下载
v1.24.0
内容可能含有违规信息
f212bbe
2024-10-25 22:43
下载
v1.24.0-preview
2926001
2024-05-31 14:35
下载
v1.23.0
Dynamic USB devices, revamped webassembly port, openamp, tls, vfs modules This release of MicroPython adds support for dynamic USB devices defined in Python, adds new `openamp`, `tls` and `vfs` modules, completely revamps the webassembly port to add proxying between JavaScript and Python, and implements significant code size optimisations for frozen modules. There are also many other enhancements and bug fixes. Keep reading for a more detailed summary of the main changes. After a lot of design, development and testing, MicroPython now has full support for user-defined USB devices. The interface is via a new `machine.USBDevice` class, and this allows the user to specify the USB descriptors and implement Python callbacks for USB endpoint transfers. With this, any USB device can be implemented in pure Python. While the `machine.USBDevice` interface is low-level and complete, there is a higher-level USB library in `micropython-lib` that allows easier implementation of devices, with examples for keyboard, mouse, MIDI and serial CDC. This feature is currently available on rp2 and samd ports, and other ports will follow in the future. Support for the OpenAMP (asymmetric multiprocessing) protocol has been added through the new `openamp` module. This allows MicroPython to control other CPU cores in the system, to load and start processes and communicate with them through endpoints. This feature is currently available on the mimxrt and stm32 ports. Two other new modules have been added: `vfs` and `tls`. The `vfs` module contains all VFS (virtual filesystem) related functions and classes, such as `mount`, `umount` and `VfsFat`. These were originally in the `os` module but having them there is not compatible with CPython, so they have been moved to their own dedicated module. They still exist in the `os` module for now but will eventually be removed from there, so it's recommended to start using the `vfs` module from now on. Similarly the new `tls` module is an evolution of the `ssl` module, whereby all the existing functionality in `ssl` has been moved to the `tls` module. This is done because MicroPython's SSL interface is becoming increasingly different to CPython's and moving this SSL/TLS functionality to a new `tls` module gives it room to grow and obtain new features that are useful for embedded applications. And compatibility with normal Python is still retained via a pure Python implementation of the `ssl` module. One new feature in the new `tls` module is the ability to register a certificate verification callback. Other additions include more methods on the `deque` object so it is doubly-ended and supports iteration, and support for half-float 'e' format in `struct.pack`/`struct.unpack`. Dynamic native modules have had some additional runtime methods exposed, and the .mpy sub-version has been increased from v6.2 to v6.3 (native code in .mpy files will need to be recompiled, but bytecode does not and is still compatible). There has also been significant code size optimisations for frozen modules. A new internal `mp_proto_fun_t` type has been defined which allows the common case of bytecode functions (as opposed to native code) to be stored in frozen code without any additional overhead of the `mp_raw_code_t` descriptor structure. All firmware builds using frozen modules will see a significant decrease in size. Code size has also improved further for very small targets by adding an option to remove the qstr hash bytes. Internally in the source code the "STATIC" macro definition has been removed. Code should now just use "static" instead. If you have C/C++ code that uses "STATIC" then either replace it with "static", or provide your own #define to define "STATIC" as "static". See commit decf8e6a8bb940d5829ca3296790631fcece7b21 for details. Mbedtls has been updated to version 3.5.1. And network interface constants, such as `IF_STA` and `SEC_WPA2`, have now been consolidated across ports so they all live at the `WLAN` class level, for example `network.WLAN.SEC_WPA2` (existing constants at the `network` module level have been retained for backwards compatibility, but the new ones should be preferred from now on). The esp32 port has seen some important bug fixes in the BLE component, to deinitialise without crashing, and increase the BLE task stack size. This port also uses the new I2S IDF driver, and supports IDF 5.0.5 and 5.2. There is support to enter the bootloader via `machine.bootloader()` and a new `esp32.mcu_temperature()`, for ESP32-C3/S2/S3 devices. The rp2 port has added the new `machine.USBDevice` dynamic USB driver, and has had firmware performance optimisations applied to critical parts of the runtime and VM, giving about a 10% performance boost. There is now direct memory access to PIO and SPI FIFOs via proxy arrays, and bugs have been fixed with threads, lightsleep and UART IRQ latency. The stm32 port has integrated support for the new `openamp` module, which is enabled on all Arduino boards. And firmware for Arduino boards now freeze in additional Arduino-specific library code. There have been fixes for internal flash writes on STM32H5 and STM32H7 MCUs (bank selection and flashing of the last word in a buffer), an important fix to a SPI DMA caching bug, an I2C clock enable fix for I2C4 on STM32F7 MCUs, and a fix for the FDCAN source clock frequency on STM32G4 MCUs. Mboot has added support for a new raw filesystem, to allow simpler and more robust firmware updates. The webassembly port has seen a significant overhaul in its structure, and is now built as a JavaScript .mjs module that exports a user-friendly JavaScript-level API which is inspired by the API provided by Pyodide (which is a version of CPython that runs in the browser). This change is motivated by the need to use MicroPython as an engine within Pyscript, which is a platform for Python in the browser. New features in the webassembly port include proxying of objects between Python and JavaScript, a `js` module to interface with the JavaScript namespace, a `jsffi` module for miscellaneous proxy helpers, top-level async code, JavaScript driven asyncio support, automatic growing of the Python heap, integration of JavaScript and Python finalisation for global memory management, more `time` module functions, and support for build variants (following the unix port). The change in code size since the previous release for various ports is (absolute and percentage change in the text section): bare-arm: -220 -0.383% minimal x86: -341 -0.184% unix x64: +20168 +2.527% stm32: -1692 -0.430% cc3200: +256 +0.139% esp8266: -8880 -1.260% esp32: -3328 -0.194% mimxrt: -408 -0.112% renesas-ra: -464 -0.074% nrf: -640 -0.341% rp2: +5380 +1.626% samd: +3224 +1.229% The leading causes of these changes in code size are: - bare-arm, minimal: disabling qstr hashing - unix: updating mbedtls to version 3.5.1 - stm32: optimising size of frozen modules - cc3200: addition of new `vfs` module, and bug fixes in the VM and array type - esp8266: disabling unused `MICROPY_DEBUG_PRINTERS` and optimising frozen modules - esp32, mimxrt, renesas-ra, nrf: optimising frozen modules - rp2: addition of `machine.USBDevice`, enabling -O2 optimisations - samd: addition of `machine.USBDevice` Performance is effectively unchanged since the previous release on all ports, except the rp2 port which sees a performance improvement of roughly 10%. Thanks to everyone who contributed to this release: Amirreza Hamzavi, Andrew Leech, Angus Gratton, Brian Pugh, Carlosgg, Christian Walther, Damien George, Daniël van de Giessen, darc, Dash Peters, David Lechner, Felix Dörre, iabdalkader, IhorNehrutsa, Iksas, J. Neuschäfer, Jared Hancock, Jim Lipsey, Jim Mussared, Jochen Sprickerhof, Joey232, Jos Verlinde, Kwabena W. Agyeman, Maarten van der Schrieck, Matt Trentini, Matthias Urlichs, Michiel W. Beijen, MikeTeachman, Nicko van Someren, Olivier Lenoir, Phil Howard, Rick Sorensen, robert-hh, Sebastian Romero, Simon Wood, Stanislav Ponomarev, stijn, Takeo Takahashi, Trent Piepho, Trent Warlaven, Vonasmic, YAMAMOTO Takashi, Yoctopuce. MicroPython is a global Open Source project, and contributions were made from the following timezones: -0800, -0700, -0600, -0500, -0300, +0000, +0100, +0200, +0330, +0400, +0900, +1000, +1100. The work done in this release was funded in part through GitHub Sponsors, and in part by George Robotics, Espressif, Anaconda, Arduino, LEGO Education, OpenMV and Planet Innovation. What follows is a detailed list of all changes, generated from the git commit history, and organised into sections. Main components =============== all: - fix "reuse" and "overridden" spelling mistakes - update bindings, ports and tests for mbedtls v3.5.1 - use mp_obj_malloc_with_finaliser everywhere it's applicable - remove the "STATIC" macro and just use "static" instead - prune trailing whitespace - update extmod, ports, examples to build with new berkeley-db lib - add pre-commit hook for codespell - update copyright year range to include 2024 - ISSUE_TEMPLATE: convert issue templates to forms py core: - py.mk: remove extra build dir created for frozen_content - qstr: add support for MICROPY_QSTR_BYTES_IN_HASH=0 - mpconfig: disable qstr hashing at minimum feature level - builtinimport: simplify calls to stat_path() - compile: fix potential Py-stack overflow in try-finally with return - emitglue: reorder and resize members of mp_raw_code_t - emitglue: provide a truncated mp_raw_code_t for non-asm code - emitglue: simplify mp_raw_code_t's kind and scope_flags members - emitglue: introduce mp_proto_fun_t as a more general mp_raw_code_t - emitglue: include fun_data_len in mp_raw_code_t only when saving - makeversionhdr.py: reinstate MICROPY_GIT_HASH in mpversion.h - obj: change sizeof to offsetof in mp_obj_malloc_var macro - obj: introduce mp_obj_malloc_with_finaliser to allocate and set type - misc: remove m_new_obj[_var]_with_finaliser macros - objfun: make mp_obj_new_fun_native/mp_obj_new_fun_asm static-inline - objfun: split viper fun type out to separate mp_type_fun_viper type - emitnative: simplify layout and loading of native function prelude - objfun: support __name__ on native functions and generators - objfun: inline mp_obj_code_get_name() into mp_obj_fun_get_name() - emitglue: remove n_pos_args from DEBUG_printf - builtinevex: fix setting globals for native functions in compile() - compile: remove TODO about name mangling - emitglue: make mp_emit_glue_assign_native's fun_data arg a const ptr - mpconfig: change the default enable level for the vfs module - emitbc: remove call to adjust Python stack by 0 entries - mpstate: don't declare mp_thread_get_state() - modthread: move thread state initialisation to shared function - emitglue: add explicit cast of proto_fun to uint8_t pointer - objstr: add a macro to define a bytes object at compile time - stream: add mp_stream_seek() helper function - stream: factor stream implementations - objdeque: expand implementation to be doubly-ended and support iter - asm: add ASM_NOT_REG and ASM_NEG_REG macros for unary ops - asmxtensa: optimise asm_xtensa_mov_reg_i32_optimised() for tiny ints - emitnative: implement viper unary ops positive, negative and invert - binary: support half-float 'e' format in struct pack/unpack - parse: zero out dangling parse tree pointer to fix potential GC leak - compile: add option to allow compiling top-level await - nlr: add "memory" to asm clobbers list in nlr_jump - makeqstrdata.py: ensure that scope names get low qstr values - dynruntime: add mp_binary_get_size/get_val_array/set_val_array - persistentcode: bump .mpy sub-version to 6.3 - objfun: fix C++ compatibility with casting in inline functions - obj: fix initialiser order in MP_DEFINE_CONST_OBJ_TYPE_NARGS_ macros - objarray: fix use-after-free if extending a bytearray from itself - nlrthumb: make non-Thumb2 long-jump workaround opt-in - dynruntime: add mp_obj_exception_init function to create C exception - dynruntime: export mp_load_method_maybe and mp_arg_parse_all* funcs extmod: - extmod.mk: disable uninitialized warnings in kf_rem_pio2.c - asyncio: support gather of tasks that finish early - modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers - modssl_axtls: add SSLContext.load_cert_chain() - modtls: move the native ssl module to tls - modtls_mbedtls: implement cert verification callback for mbedtls - modvfs: add new "vfs" module with mount/umount and Vfs classes - btstack: reset pending_value_handle before calling write-done cb - btstack: reset pending_value_handle before calling read-done cb - modrandom: add integer type casts where appropriate - modlwip: support IPv6 - network_wiznet5k: adjust IP types for IPv6 - vfs_posix_file: ensure file object has safe default fd - modmachine: remove MICROPY_PY_MACHINE guard from header - modwebsocket: fix websocket to send correct close frame - modlwip: add back support for empty IP addresses - asyncio: make current_task raise exception when there is no task - nimble: override configuration options set in nimble_port_init - nimble: enable key distribution to support bonding - network_ninaw10: activate the NIC on demand - network_ninaw10: set the proper security mode if none provided - network_ninaw10: fix error messages - modmachine: add MICROPY_PY_MACHINE_SIGNAL configuration option - modmachine: add MICROPY_PY_MACHINE_MEMX configuration option - modmachine: add MICROPY_PY_MACHINE_RESET configuration option - nimble: check for active before setting address mode - machine_usb_device: add support for Python USB devices - libmetal: add MicroPython platform for libmetal - modopenamp: add new OpenAMP module - modopenamp_remoteproc: add new OpenAMP RemoteProc class - os_dupterm: handle exception properly when it occurs in parallel - modnetwork: implement IPv6 API to set and get NIC configuration - network_wiznet5k: properly enable interrupt signal on w5100s - add interface and security constants at WLAN class level - modtls_axtls: add verify_mode and CERT_NONE constant - modopenamp: set a default log handler for ports - modopenamp: use metal logging functions exclusively - modasyncio: make mp_asyncio_context variable public - network_wiznet5k: properly enable socket buffers for W5100(S) - modlwip: use Nagle algorithm and add support for TCP_NODELAY - modos: only sync FAT filesystems using disk_ioctl shared: - timeutils: remove useless void-return - tinyusb: don't disconnect on soft reset unless USB was active - tinyusb: update some code comments for runtime USB - tinyusb: increase default string descr max length to 40 chars - tinyusb: fix dynamic USB control callbacks for wLength==0 - tinyusb: stall the CDC IN endpoint while disconnecting drivers: - dht: only build DHT driver if MICROPY_PY_MACHINE_PULSE enabled - memory: add IS25LPWP064D chip to list of external flash devices mpy-cross: no changes specific to this component/port lib: - cmsis: update to CMSIS 5.9.0 - mbedtls: update to mbedtls v3.5.1 - mbedtls_errors: update error list for latest mbedtls - micropython-lib: update submodule to latest - cyw43-driver: update driver to latest version v1.0.3 - open-amp: add OpenAMP submodule - libmetal: add libmetal submodule - berkeley-db-1.xx: update submodule URL and version - arduino-lib: add Arduino's external library Support components ================== docs: - samd/pinout: update pinout docs with fixed pin assignment - develop/porting: fix argument type of mp_lexer_new_from_file() - add note about position-only arguments in CPython vs MicroPython - library/ssl: change wrap_socket args keyfile/certfile to key/cert - library: move vfs functions and classes from os to vfs module docs - reference/micropython2_migration.rst: add info about os and vfs - use vfs module instead of os - library/sys.rst: document implementation.version.releaselevel - library/bluetooth: add note that ESP32 supports pairing/bonding - library/openamp: document the new openamp module - library/collections: update deque docs to describe new features - library/rp2.DMA: add documentation for rp2 DMA support - library/machine.RTC: add docs for RTC.memory() method - reference/mpyfiles: document change in .mpy sub-version - develop/optimizations: fix typo identified in issue 14391 - esp32/quickref: add note about different ESP32 varieties - library/machine.USBDevice: update note about packages in mp-lib - reference: document how to mip install packages from GitLab - library/asyncio: document that ThreadSafeFlag now works on unix - update copyright year range to include 2024 examples: - embedding: add -fno-common to the sample compiler flags - natmod/framebuf: enable FrameBuffer.poly method - usb: add a very simple USBDevice example with host - usb: add a USBDevice example implementing the DFU protocol - network: rename SSL examples to start with https - network: add example of HTTPS client using non-blocking socket - usb: add README that points out the alternative usb modules - natmod/features4: create custom FactorialError as exc example - natmod/btree: make btree.open use mp_arg_parse_all for kwargs tests: - run-tests.py: remove machine_mem.py test from skip list - thread: adjust thread tests so most are able to run on rp2 port - thread: add a test for accuracy of sleep within a thread - run-multitests.py: change to dir of test script when running it - multi_net: generate smaller certs with 2048-bit RSA - run-tests.py: add an option for running only the failed tests - run-tests.py: remove unneeded argument from run_feature_check() - run-tests.py: make repl test detection more correct - run-tests.py: fix path-based special test detection - extmod/machine_uart_tx.py: add a test for timing of UART.flush() - move port-specific test directories into tests/ports/ directory - ports/rp2: add rp2-specific tests with a test for rp2.DMA - extmod/machine_i2s_rate.py: test multiple I2S instances - extmod/asyncio_wait_task.py: add test for raise and delayed wait - extmod: remove asyncio .exp files that match CPython output - extmod/framebuf_polygon.py: replace sys.stdout.write with print - ports/rp2/rp2_dma.py: tweak test to be more reliable - use vfs module instead of os - multi_bluetooth/ble_irq_calls.py: enhance test to test recursion - ports/unix: add coverage test for frozen functions and generators - cpydiff: add new CPy diff test for class name mangling - multi_bluetooth: move ble_deepsleep to stress_deepsleep_reconnect - basics: split MicroPython-specific deque tests to separate file - float/float_struct_e.py: add specific test for struct 'e' type - run-tests.py: support running webassembly tests via node - ports/webassembly: add webassembly JS tests - net_inet: add simpler tls sites test, and skip existing on axtls - cpydiff: add a note about risk of resizing memoryview targets - micropython/import_mpy_invalid.py: skip if target cant import mpy - run-natmodtests.py: fix search for supported native tests - extmod: fix regex strings to be of r"" type - extmod: add .exp test files for asyncio.get_event_loop tests - basics: split out generator.throw tests that pass multiple args - net_hosted/ssl_verify_callback.py: make exp match actual output - net_inet/tls_text_errors.py: tweak test for newer CPython version - float: use "not" instead of ~ to invert bool value - basics: add .exp file for slice_op test - basics: move str/bytes tests that give SyntaxWarning to sep file tools: - gen-changelog.sh: exclude "-preview" tags from generated log - mpremote: reduce dependency on importlib_metadata - manifestfile.py: change library search to use a list of paths - mpy-tool.py: fix static qstrs when freezing without qstr header - mpy-tool.py: skip generating frozen mp_raw_code_t when possible - manifestfile.py: add --unix-ffi option - ci.sh: add Arduino GIGA to stm32 CI build - mpy-tool.py: fix merging of more than 128 mpy files - ci.sh: update webassembly CI tests - manifestfile.py: fix freeze() when script is an empty iterable - mpremote: add support to mip install from GitLab - ci.sh: simplify selection of natmod tests to run CI: - workflows: bump actions/cache from 3 to 4 - workflows: run mimxrt and rp2 CI with space in repository path - workflows: move Windows CI from AppVeyor to GitHub Actions - workflows: bump setup-msbuild, setup-python, checkout versions - workflows: initialise micropython-lib submodule for windows CI - workflows: move codespell to a GitHub workflow, version it - workflows: add comments where tool versions need to be in sync - workflows: standardise formatting of ruff.yml - workflows: add Biome workflow for JavaScript formatting/linting - workflows: update coverage workflow to codecov-action@v4 - workflows: run code size workflow on shared or port code changes The ports ========= all ports: - move MICROPY_PY_LWIP_ENTER/REENTER/EXIT defns to mphalport.h - move MICROPY_INTERNAL_WFE definition to mphalport.h - fix handling of paths containing spaces in Makefiles - add LED pin aliases for all Arduino boards - use vfs module instead of os - on cold boot, enable USB after boot.py completes - don't include mpthread.h in mpthreadport.h bare-arm port: no changes specific to this component/port cc3200 port: no changes specific to this component/port embed port: - fix alloca include for FreeBSD and NetBSD - improve stack top estimation esp8266 port: - boards/ESP8266_GENERIC: disable MICROPY_DEBUG_PRINTERS - Makefile: add support for C++ user C modules - network_wlan: add interface and security WLAN constants esp32 port: - modsocket: use all supplied arguments to socket.getaddrinfo() - boards/UM_FEATHERS3: use read_uv() for accurate battery voltage - network_ppp: make PPP support optional - mpnimbleport: release the GIL while doing NimBLE port deinit - increase NimBLE task stack size and overflow detection headroom - machine_i2c: fix build warnings when I2C is disabled - machine_hw_spi: combine argument parsing for constructor and init - boards: add missing named digital pins for Arduino Nano ESP32 - machine_i2s: integrate new I2S IDF driver - add support for IDF version v5.0.5 - add support for IDF version v5.2 - add IDF-version-specific sdkconfig - mpconfigport: don't hang when machine.bootloader isn't supported - modmachine: support bootloader on ESP32-S2/S3/C2/C3 - network_lan: add a separate argument to set PHY power pin - machine_uart: always configure timeout_char setting in init() - boards/ESP32_GENERIC_S3: add 4MiB partitioning board variant - workaround IDF issue placing ISR ringbuf functions in IRAM - main: check if main GC heap allocation failed - network_wlan: add interface and security WLAN constants - modesp32: add mcu_temperature() function for C3/S2/S3 devices - panichandler: print support information on panic - add support for TCP_NODELAY mimxrt port: - mphalport: remove redundant NVIC/IRQ defines - mpbthciport: add missing extmod/modmachine.h header - boards: fix __VECTOR_TABLE link issue with CMSIS 5.9.0 - modmachine: fix deepsleep wakeup pin ifdef - fix header include guard names - mpconfigport: enable cryptolib and hashlib md5 - define the MICROPY_HW_ENABLE_USBDEV macro - set the security mode for the default WiFi AP - add support for OpenAMP minimal port: - allow compiling on macOS - use printf instead of echo -e nrf port: - modules/os/microbitfs: sweep the filesystem if any free chunk found - fix _start() build issue with CMSIS 5.9.0 - boards: add named pins for Arduino Nano 33 BLE - boards: enable MICROPY_HW_ENABLE_USBDEV on boards with USB CDC - Makefile: allow external board definitions - modules/machine: enable code formatting - fix non-running LFCLK - modules/machine: catch exceptions from pin interrupts - modules/machine/pwm: tag a PWM device as used in the constructor - main: fix build of microbit when SD is enabled - Makefile: clean up dangling LIBS declaration - mpconfigport: enable MICROPY_NLR_THUMB_USE_LONG_JUMP on nRF51xx pic16bit port: no changes specific to this component/port powerpc port: no changes specific to this component/port qemu-arm port: - mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES renesas-ra port: - ra: fix SysTick clock source - ra: remove unnecessary min_delay() declaration - boards/ARDUINO_PORTENTA_C33: fix the RTC clock source - ra/ra_i2c: fix 1 byte and 2 bytes read issue - fix spelling mistakes found by codespell - boards: add named pins for Arduino Portenta C33 - boards/ARDUINO_PORTENTA_C33: add Arduino's external library rp2 port: - rp2_flash: lockout second core only when doing flash erase/write - mutex_extra: implement additional mutex functions - mpthreadport: fix race with IRQ when entering atomic section - rp2_dma: fix fetching 'write' buffers for writing not reading - provide direct memory access to PIO and SPI FIFOs via proxy arrays - machine_uart: fix event wait in uart.flush() and uart.read() - mpconfigport: allow MICROPY_PY_THREAD to be disabled by a board - mpthreadport: make result of thread.get_ident() a non-zero integer - machine_uart: fix potential race condition in interrupt handling - boards/ARDUINO_NANO_RP2040_CONNECT: increase flash storage space - change machine.I2S and rp2.DMA to use shared DMA IRQ handlers - boards: add named digital pins for Arduino Nano RP2040 Connect - enable support for Python USB devices - CMakeLists: apply O2 optimisation to map, mpz and vm source code - modmachine: prevent lock-up when lightsleep() called within thread - README: fix typo, improve sentence about building with other boards - boards/W5500_EVB_PICO: update incorrect url in board.json samd port: - remove the MICROPY_PY_MACHINE_RTC config option - mcu/samd21: reorganize and enable more firmware features - mcu: fix wrong EIC table entries in pin-af-table.csv - mpconfigport: simplify and consolidate config options - mcu/samd21: enable MICROPY_STACK_CHECK on SAMD21 - enable support for Python USB devices - README: fix incorrect port directory name - boards: enable MICROPY_HW_DFLL_USB_SYNC on appropriate boards - mcu: update clock config after changes to USB - samd_spiflash: allow configuring the flash SPI baudrate - samd_qspiflash: avoid reading status byte 2 when not available - mcu: guard static function with appropriate #if stm32 port: - mboot: improve detection of invalid flash erase/write - mboot: improve mass erase to erase all non-protected pages - flash: remove commented-out flash functions - flash: simplify sector calculation for homogeneous flash layout - flash: change flash_erase to only erase a single sector at a time - flashbdev: don't rely on flash sector id - flash: factor and simplify erase code - flash: fix sector and bank calculation for H5 and H7 MCUs - mboot/Makefile: revert change to BOARD_DIR that removed abspath - disable qstr hashing on small boards - boards/ARDUINO_PORTENTA_H7: add pin configuration for SPI1 - modos: allow disabling MICROPY_PY_MACHINE_UART - spi: allow disabling MICROPY_PY_MACHINE_SPI - main: allow disabling MICROPY_PY_MACHINE - Makefile: ignore uninitialised variable warning in H5 HAL SD code - mboot: generate FLASH_LAYOUT_STR at runtime on H5 MCUs - mpbthciport: allow building with MICROPY_PY_MACHINE_UART disabled - sdram: support remapping FMC memory banks - network_lan: allow defining phy_addr in the LAN constructor - eth: remove redundant ETH clock enable code - network_lan: add the phy_type=x keyword option to network.LAN() - simplify D-cache clean and invalidate macros - mpu: rename MPU_CONFIG_DISABLE to MPU_CONFIG_NOACCESS - dma: add D-cache protection for DMA RX operations, including SPI - add support for dual-analog-pad "_C" pins on H7 MCUs - boards: add named digital and analog pins for Arduino boardrs - sdram: fix MPU config to use MPU_CONFIG_NOACCESS - mpu: add MPU config for shared, uncached memory region - implement port backend for libmetal - implement port backend for OpenAMP's remoteproc - boards/ARDUINO_GIGA: enable OpenAMP - boards/ARDUINO_NICLA_VISION: enable OpenAMP - boards/ARDUINO_PORTENTA_H7: enable OpenAMP - mboot: add support for a raw filesystem - boards/LEGO_HUB_NO6: move robust logic to mboot - boards/LEGO_HUB_NO6: use a raw filesystem for mboot to update fw - stm32.mk: enable _Float16 support on MCUs with hardware floats - boards/ARDUINO_GIGA: add Arduino's external library - boards/ARDUINO_NICLA_VISION: add Arduino's external library - boards/ARDUINO_PORTENTA_H7: add Arduino's external library - README: update list of supported STM32 series - set the security mode for the default WiFi AP - mpremoteprocport: use metal logging functions - boards/LEGO_HUB_NO6: write key after writing elements - boards/LEGO_HUB_NO7: add robust update logic to mboot - flash: fix writing final words to flash on H5 and H7 MCUs - mboot: buffer the correct amount of bytes for a flash write - i2c: fix clock enable for I2C4 on STM32F7 MCUs - pyb_can: fix STM32G4 FDCAN source clock frequency unix port: - variants: prefer unix-ffi packages when loading the manifest - input: flush the prompt after writing it to stdout - don't include system headers when features are disabled - variants: don't use native _Float16 type webassembly port: - Makefile: remove --memory-init-file from linker options - include lib in sys.path - move MP_JS_EPOCH init to library postset - implement MICROPY_PY_RANDOM_SEED_INIT_FUNC - enable time localtime, gmtime, time, time_ns - use POSIX write for output and add stderr - add support for enabling MICROPY_GC_SPLIT_HEAP_AUTO - clean up Makefile and add variant support - add JavaScript proxying, and js and jsffi modules - implement runPythonAsync() for top-level async code - implement runCLI() for a Node-based CLI - implement replInit() and replProcessChar() - variants/pyscript: add pyscript variant - update README.md to describe latest changes - library: fix formatting and style for Biome - proxy_c: ensure return value of async fun is passed to JS - proxy_js: promote Python thenable to a Promise - proxy_js: allow a Python proxy of a function to be undone - api: fix waiting for Emscripten module to be loaded - api: allocate code data on C heap when running Python code - objjsproxy: fix handling of thrown value into JS generator - proxy_c: fix proxy then reject handling - proxy_c: fix then-continue to convert reason to throw value - modjsffi: add jsffi.async_timeout_ms - add JavaScript-based asyncio support - api: inject asyncio.run if needed by the script - api: fix importing micropython.mjs module from node REPL - proxy_c: reject promises with a PythonError instance - proxy_c: only proxy across resolve/reject funs when needed - objjsproxy: fix proxying in arguments to JS new function - objpyproxy: implement JS iterator protocol for Py iterables - api: resolve thenables returned from runPythonAsync - proxy_c: support more than 4 args when JS calls Py func - asyncio: fix case where a Promise is resolved with no arg - proxy_c: ensure objs thrown into generators are exceptions - proxy_js: convert JS undefined and JS null to Py None - mpconfigport: enable importing of .mpy files - proxy_js: revert back to converting Py None to JS null - proxy_js: create a special "undefined" type for Python - proxy_c: return undefined if dict lookup failed on JS side - objjsproxy: make jsproxy_it keep ref to jsproxy - proxy_c: don't return value of a void function - track the current depth of calls to external C functions - set GC threshold and do top-level GC collect when possible - add C-level finaliser to JsProxy object - register PyProxy objects for JS-side finalisation - modjsffi: add mem_info function to get detailed stats windows port: - windows_mphal: fix mp_hal_delay_ms() so it runs events - Makefile: fix float exact int formatting on 32-bit mingw zephyr port: no changes specific to this component/port
a61c446
2024-05-31 12:19
下载
v1.22.2
Patch release for rp2 DMA, UART and BLE, esp32 BLE, renesas-ra I2C This is a patch release containing the following commits: - py/compile: fix potential Py-stack overflow in try-finally with return - extmod/asyncio: support gather of tasks that finish early - extmod/modssl_mbedtls: fix cipher iteration in SSLContext.get_ciphers - extmod/btstack: reset pending_value_handle before calling write-done cb - extmod/btstack: reset pending_value_handle before calling read-done cb - esp32/mpnimbleport: release the GIL while doing NimBLE port deinit - esp32: increase NimBLE task stack size and overflow detection headroom - mimxrt/modmachine: fix deepsleep wakeup pin ifdef - renesas-ra/ra: fix SysTick clock source - renesas-ra/boards/ARDUINO_PORTENTA_C33: fix the RTC clock source - renesas-ra/ra/ra_i2c: fix 1 byte and 2 bytes read issue - rp2/rp2_dma: fix fetching 'write' buffers for writing not reading - rp2/machine_uart: fix event wait in uart.flush() and uart.read() - rp2: change machine.I2S and rp2.DMA to use shared DMA IRQ handlers
8cd1582
2024-02-20 19:59
下载
v1.22.1
Patch release for rp2 atomic mutex This is a patch release to fix a race condition and potential deadlock in the rp2 port's mp_thread_begin_atomic_section() function, when the second core is in use.
9b8c64c
2024-01-05 09:33
下载
v1.23.0-preview
2037edb
2024-01-02 15:11
下载
v1.22.0
SSL support in asyncio, sorted qstr pools, common machine module bindings This release of MicroPython introduces SSL/TLS support to asyncio, for both the client and server sides. The interface matches CPython: `asyncio.open_connection()` and `asyncio.start_serve()` now both accept an `ssl` argument to supply an `SSLContext` object. As part of this, new methods were added to `SSLContext` to load certificates, and certificate date/time validation was enabled on all ports that use mbedTLS. Qstr pools are now sorted, which provides a significant performance boost for `qstr_find_strn()`, which is called a lot during parsing and loading of .mpy files, as well as interning of string objects, which happens in most string methods that return new strings. The static pool (part of the .mpy ABI) isn't currently sorted, but could be in the future. There have been many internal changes to the `machine` module (and on some ports the `os` module) to factor the Python bindings to a common location, reduce code duplication and make the API more consistent across all the ports. And a new `boardgen.py` script has been added to factor pin generation and enable a more consistent `machine.Pin` across ports. For consistency, the following user-facing changes have been made: - cc3200 port: The `machine` module gains `soft_reset()`, `mem8`, `mem16`, `mem32` and `Signal`; it loses `POWER_ON` (replaced by `PWRON_RESET`). `disable_irq()` now returns an (opaque) integer rather than a bool, and `enable_irq(state)` must be passed an argument which is the return value of `disable_irq()`, rather than a bool. In the `os` module, `dupterm()` has been converted to use the common implementation and has semantics the same as other ports, and `uname()` is removed to save space (sys.version and sys.implementation can be used instead). - esp32 port: In the `machine` module, `lightsleep()` and `deepsleep()` no longer take the `sleep` keyword argument, instead it's positional to match other ports. Also, passing 0 here will now do a 0ms sleep instead of acting like nothing was passed. And `reset_cause()` no longer accepts any arguments (before it would just ignore them). - esp8266 port: `machine.idle()` now returns None instead of the time elapsed. The `machine.WDT()` constructor now takes keyword arguments, and accepts the `timeout` argument but raises an exception if it's not the default value (this port doesn't support changing the timeout). - mimxrt port: `machine.freq()` now accepts an argument but raises `NotImplementedError`, and `machine.lightsleep()` has been added but also just raises `NotImplementedError` (this is to make these functions use an implementation common to the other ports). - nrf port: The `machine` module gains `unique_id()` (returns an empty bytes object), `freq()` (raises `NotImplementedError`) and `Signal`. `UART.sendbreak()` is removed, but this method previously did nothing. The `os.dupterm()` function has changed to match the semantics used by all other ports (except it's restricted to accept only `machine.UART` objects). - qemu-arm port: The `machine` module gains `soft_reset()` and `idle()`. - samd port: The `machine.deepsleep()` function now resets after sleeping. - unix port: Gains `machine.soft_reset()`. - zephyr port: The `machine` module gains `soft_reset()`, `mem8`, `mem16`, and `mem32`. The `UART` class gains the following methods: `init()` which supports setting `timeout` and `timeout_char`, `deinit()` which does nothing, `flush()` which raises `OSError(EINVAL)` because it's not implemented, and `any()` and `txdone()` which both raise `NotImplementedError`. The teensy port has been removed in this release. This port was largely unmaintained, had limited features (the only hardware support was for GPIO and timer, and no `machine` module), and only supported a small number of Teensy boards. A new preview versioning scheme has been introduced, whereby non-release builds are a preview of the next, upcoming release. This scheme is compatible with semver and should help to eliminate confusion matching documentation and firmware version numbers, among other things. Black has been replaced with ruff format as the Python code formatter. This required a few small changes to Python code, and now allows linting and formatting with ruff. Bound method instances now support comparison and hashing, matching CPython semantics. The .mpy sub-version has been updated from 6.1 to 6.2 due to a change in the native .mpy ABI. A new option `MICROPY_PREVIEW_VERSION_2` has been added which provides a way to enable features and changes slated for MicroPython 2.x, by running `make MICROPY_PREVIEW_VERSION_2=1`. This is an alternative to having a 2.x development branch, and any feature or change that needs to be "hidden" until 2.x will use this flag. LittleFS has been updated to v2.8.1. The associated MicroPython VfsLfs2 driver can read existing LFS2 filesystems, but any writes will update the filesystem to a newer LFS2 version that cannot be read by older drivers, so take this into account when updating, for example update mboot first. The VFS sub-system has a new file ioctl to set the read-buffer size, which is used by mpremote to significantly increase performance of the "mpremote mount" feature. Manifest files now allow registering an external library path via `add_library(name, path)`. `sys.stdout.buffer.write()` now returns the actual number of bytes written (although this is complicated when output goes to multiple destinations). The esp32 port has been updated to use IDF version 5.0.4, and the initial GC heap size tuned so that, after doubling the heap size, WiFi can still be started and an SSL connection made. `RMT.source_freq()` is now a class method, socket connect timeout has been implemented, RTC user memory is now preserved over most reset causes, and `hashlib.md5` enabled. The mimxrt port has RTC alarm/wakeup functionality added, along with support for `machine.deepsleep()`. The rp2 port sees the introduction of a new `rp2.DMA` class for control over DMA transfers. It has switched to use the same math library as other ports to get more accurate floating point behaviour, and enabled `os.dupterm_notify()` for WebREPL use. The TinyUSB stack is now scheduled to run from the IRQ handler (instead of polled in the VM) which slightly improves performance of the VM and USB. The port also makes better use of event scheduling and WFE to be more efficient. It also has added support for external ADC channels (for example when using the ninaw10 driver). The stm32 port has improved support for STM32H5xx MCUs, including Ethernet support, frequency scaling with HSI, sleep mode and SD card support. The NUCLEO_WL55 board now freezes in the LoRa driver, the I2S driver has improved accuracy of the clock frequency, and mboot now supports Microsoft WCID to set the USB driver. New boards added in this release are: UM_TINYWATCHS3 (esp32 port), POLOLU_3PI_2040_ROBOT, POLOLU_ZUMO_2040_ROBOT and SIL_RP2040_SHIM (rp2 port), NUCLEO_H563ZI (stm32 port). The change in code size since the previous release for various ports is (absolute and percentage change in the text section): bare-arm: +216 +0.381% minimal x86: +624 +0.340% unix x64: +8283 +1.050% stm32: +1368 +0.350% cc3200: +1184 +0.649% esp8266: +800 +0.114% esp32: +35348 +2.100% mimxrt: +2172 +0.602% renesas-ra: +96 +0.015% nrf: +1460 +0.785% rp2: +6100 +1.880% samd: +1476 +0.568% The changes that dominate these numbers are: - bare-arm, minimal: comparing and hashing bound methods, sorted qstr pools - unix: updating LittleFS to 2.8.1, enabling certificate date/time validation, adding SSLContext certificate methods, asyncio SSL support - stm32: sorted qstrs, updating LittleFS to 2.8.1, I2S clock frequency improvements, asyncio SSL support - cc3200: sorted qstrs, more machine module functions, use of the common `os.dupterm` implementation - esp32: switching ESP-IDF from 5.0.2 to 5.0.4 - esp8266: updating LittleFS to 2.8.1 - mimxrt: adding RTC alarm/wakeup functionality, updating LittleFS to 2.8.1, asyncio SSL support - nrf: updating LittleFS to 2.8.1, enabling `machine.Signal`, asyncio SSL support - rp2: using locally-provided math library, adding new `rp2.DMA` class - samd: sorted qstrs, updating LittleFS to 2.8.1, asyncio SSL support With the new sorted qstr pools, performance is significantly improved for qstr-heavy operations, between +50% and +200% improvement. Other areas have their performance unchanged since the last release. Thanks to everyone who contributed to this release: Alessandro Gatti, Andrew Leech, Angus Gratton, Carlosgg, Christian Walther, Damien George, Daniël van de Giessen, Elias Wimmer, Glenn Moloney, iabdalkader, Ihor Nehrutsa, Jeff Epler, Jim Mussared, Kwabena W. Agyeman, Maarten van der Schrieck, Mark Blakeney, Mathieu Serandour, Matthias Urlichs, MikeTeachman, Ned Konz, Nicko van Someren, Pascal Brunot, Patrick Van Oosterwijck, Paul Grayson, Peter Züger, Rene Straub, robert-hh, Scott Zhao, Sebastian Romero, Seon Rozenblum, stijn, Thomas Ackermann, Thomas Wenrich, ThomHPL, Trent Piepho. Contributions were made from the following timezones: -0800, -0700, -0600, -0500, +0000, +0100, +0200, +1000, +1100. The work done in this release was funded in part through GitHub Sponsors, and in part by George Robotics, Planet Innovation, Espressif, Arduino, LEGO Education and OpenMV. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== all: - switch to new preview build versioning scheme - replace "black" with "ruff format" - update Python formatting to ruff-format py core: - vm: don't emit warning when using "raise ... from None" - builtinevex: handle invalid filenames for execfile - objboundmeth: support comparing and hashing bound methods - objboundmeth: optimise check for types in binary_op - obj: generalise mp_get_buffer so it can raise if a flag is set - dynruntime: add mp_get_buffer - persistentcode: bump .mpy sub-version - modthread: initialise nlr_jump_callback_top on threads - makeqstrdefs.py: print a nicer error when preprocessing stage fails - mkrules.mk: add MICROPY_PREVIEW_VERSION_2 - asm: remove unused asm helper macros - qstr: add support for sorted qstr pools - mkrules.mk: add rule for compiling auto-generated source files - runtime: remove declaration of function from inside function - lexer: change token position for new lines - misc: change sizeof to offsetof for variable-length alloc - qstr: special case qstr_find_strn for empty string - obj: fix mp_obj_is_type compilation with C++ - objslice: validate that the argument to indices() is an integer - mkrules: add support for custom manifest variables - modbuiltins: share vstr_add_char's implementation of utf8 encoding - mphal: move configuration of ATOMIC_SECTION macros to mphal.h - add port-agnostic inline functions for event handling - modsys: implement optional sys.intern - mkrules.mk: list hash files as byproducts - makeqstrdefs.py: don't skip output for stale hash file - makeqstrdefs.py: stop generating temporary intermediate file - gc: improve calculation of new heap size in split-heap-auto mode - mkrules.mk: fix dependency file generation for compiler wrappers extmod: - moductypes: validate that uctypes.struct addr argument is an int - asyncio: emit errors to stderr, not stdout - modframebuf: validate FrameBuffer bounds against input buffer - modframebuf: fix FrameBuffer get-buffer implementation - modframebuf: remove FrameBuffer1 from natmod build - vfs_posix: fix relative root path - vfs_posix: fix accidentally passing tests - vfs_posix: fix relative paths on non-root VFS - vfs_posix: fix getcwd() on non-root VFS - vfs_posix: additional tests for coverage of error cases - network_ninaw10: raise an error if nina_ioctl fails - machine_wdt: factor ports' WDT Python bindings to common code - machine_pwm: remove header file and move decls to .c file - machine_i2s: factor ports' I2S Python bindings to common code - machine_i2s: factor stream and ring-buf code - machine_i2s: factor I2S.shift method - machine_i2s: factor I2S.irq method - machine_i2s: factor print function - machine_i2s: factor init_helper argument parsing - machine_i2s: factor comments, some enums and macros - machine_adc: factor ports' ADC Python bindings to common code - machine_uart: factor ports' UART Python bindings to common code - modmachine: clean up decls of machine types to use common ones - modmachine: consolidate simple machine headers into modmachine.h - modmachine: consolidate mem, i2c and spi headers to modmachine.h - network_ninaw10: fix select flags handling in socket poll - remove empty utime_mphal.h file - machine_adc_block: factor esp32 ADCBlock bindings to common code - machine_i2c: do a fast poll during I2C.scan() - vfs_reader: add file ioctl to set read buffer size - modbluetooth: initialise nlr_jump_callback_top for IRQ handlers - vfs_posix_file: make standard file objects non-const - extmod.mk: allow enabling lwip loopback support - modmachine: make I2C/SPI defns available when soft impl enabled - modmachine: factor ports' machine module dict to common code - modmachine: provide common Python bindings for machine.idle() - modmachine: add MICROPY_PY_MACHINE_PIN_BASE option - modmachine: provide common Python bindings for bootloader() - modmachine: provide common bindings for 6 bare-metal functions - modmachine: provide common implementation of disable/enable_irq - mbedtls: enable certificate time/date validation by default - modnetwork: add deinit function to NIC protocol - network_ninaw10: switch to using soft-timer for polling - switch to use new event functions - add lists of libm/libm_dbl source files for ports to use - modssl_mbedtls: add SSLContext certificate methods - modssl_mbedtls: make SSLSocket.getpeercert() optional - modssl_mbedtls: fix parsing of ciphers in set_ciphers method - asyncio: add ssl support with SSLContext - modonewire: adopt Maxim recommended read timings - modonewire: improve write timings for better reliability - modos: factor os.dupterm_notify() function to common extmod code - os_dupterm: prevent recursive execution of mp_os_dupterm_rx_chr - asyncio: remove non-working Stream __aenter__/__aexit__ methods - modselect: handle growing the pollfds allocation correctly - modhashlib: support MD5 with mbedtls 3.x - os_dupterm: let mp_os_dupterm_tx_strn() return num bytes written - vfs_lfs: fix lfs cache_size calculation - nimble: do not set GAP device name after sync shared: - libc/string0: don't deref args for n==0 case - tinyusb: schedule TinyUSB task function from dcd_event_handler - tinyusb: expose mp_usbd_task as a public function - tinyusb: add a helper for hex string conversion - runtime/softtimer: generalise soft_timer to work without SysTick drivers: - ninaw10: add ioctl for reading analog pins - ninaw10: add support for external ADC channels mpy-cross: no changes specific to this component/port lib: - littlefs: update LittleFS to v2.8.1 - uzlib: for matches of the same length, take the closest one - mbedtls_errors: update error list for latest esp32 mbedtls - micropython-lib: update submodule to latest Support components ================== docs: - reference/mpyfiles: document change in .mpy sub-version - library/io: remove io.FileIO and io.TextIOWrapper - reference/micropython2_migration: add migration guide - mimxrt: change the examples which denote a Pin with a number - samd: fix the pinout for SAMD21 Itsy Bitsy Express M0 - library/esp: correct the description of esp.osdebug() - esp32/quickref: add DAC example - library: document SSLContext cert methods and asyncio support examples: - pins.py: remove this pins printing example tests: - basics/boundmeth1.py: add tests for bound method equality/hash - perf_bench: add string/qstr/map tests - extmod/asyncio_as_uasyncio.py: fix qstr order dependency - net_hosted/asyncio_loopback.py: add loopback test - extmod/deflate_compress.py: add a test for optimal compression - float/inf_nan_arith.py: include -inf in argument combos - run-tests.py: skip Thumb2 tests if target doesn't support them - update SSL network tests to use SSLContext, and work on CPython tools: - ci.sh: ensure enough commits are fetched for a common ancestor - boardgen.py: add initial implementation of a common make-pins.py - tinytest-codegen.py: externalise tests list - mpremote: add ioctl to specify large read buffer size - ci.sh: build ESP32_GENERIC-SPIRAM as part of esp32 CI - ci.sh: set `ulimit -n` for unix CI - manifestfile.py: add support for external libraries CI: - workflows: pin ruff to 0.1.0 and change flags for new version - workflows: cache ESP-IDF checkout and installation - workflows: use build matrix for esp32 port - workflows: enable build matrix for stm32 port - workflows: enable ccache for esp32 build - workflows: bump actions/github-script from 6 to 7 - workflows: bump actions/setup-python from 4 to 5 - workflows: bump actions/upload-artifact from 3 to 4 The ports ========= all ports: - make all ports skip execution of main.py if boot.py fails - remove SRC_QSTR_AUTO_DEPS from all ports' Makefiles - standardise arguments and output for make-pins.py script - fix incorrect identifiers on Arduino boards - move definitions of ATOMIC_SECTION macros to mphalport.h - switch build to use common lib/libm list of source files - fix sys.stdout.buffer.write() return value bare-arm port: - lib: add minimal strncmp implementation cc3200 port: - boards/make-pins.py: don't generate qstrs - boards/make-pins.py: add a note about tools/boardgen.py - mods/modmachine: use common implementation of disable/enable_irq - convert dupterm to use common extmod implementation - convert os module to use extmod version - eliminate dependency on stm32's irq.h - application.mk: don't add stm32 to build include path embed port: no changes specific to this component/port esp8266 port: - rename MICROPY_ESPNOW to MICROPY_PY_ESPNOW - machine_spi: rename machine_hspi to machine_spi - esp_mphal: make atomic section more atomic - modmachine: use common implementation of disable/enable_irq - avoid including ep_mphal.h directly - update port to use new event functions esp32 port: - rename MICROPY_ESPNOW to MICROPY_PY_ESPNOW - boards: update UM board image names for consistency - boards/UM_TINYWATCHS3: add new UM TinyWATCH S3 board - boards: update UM board settings to use custom PID/VID - network_ppp: allow building with IPv6 disabled - poll serial/JTAG for unread data to prevent blocking - mpconfigport: remove port-specific GAP name - machine_uart: add error checking for IDF API's - network_ppp: reduce PPP thread CPU usage - boards: disable ALPN support - network_lan: fix and simplify the code for ETH-SPI devices - network_lan: fix LAN.isconnected() - network_lan: register the hostname setting for Ethernet - modmachine: fix deepsleep() when previous sleep delay was set - boards: reduce size of D2WD and OTA firmware - use better build settings for ESP32-C3 - mphalport: add function to wake main from separate FreeRTOS task - usb: wake main thread when USB receives data - machine_pin: make irq object a sub-field of pin object - esp32_rmt: change RMT.source_freq() to class method - esp32_rmt: add RMT.PULSE_MAX constant - modsocket: implement socket connect timeout - modsocket: try garbage collection if the socket limit is reached - boards/sdkconfig.base: fix increasing log level via esp.osdebug() - boards/ESP32_GENERIC: reduce size of D2WD variant to fit in flash - uart: preserve console UART clock, fix UART console with DFS - uart: make compatible with sclk type change in ESP-IDF 5.3 - network_wlan: reduce RAM usage if SPIRAM fails to initialise - network_wlan: fix network.WLAN.status() to return better info - esp32_rmt: fix RMT looping - enable mbedtls cert time validation - boards: enable further IRAM saving opts to fit ESP32-SPIRAM fw - machine_rtc: preserve RTC user memory over most reset causes - boards/UM_TINYPICO: fix typo in baudrate instructions - boards/sdkconfig.base: disable unused mbedtls options - machine_i2c: use APB_CLK_FREQ instead of I2C_APB_CLK_FREQ - modnetwork: add WiFi AUTH_WPA3_ENT_192 authenticate mode - machine_dac: support one-shot mode of driver - modmachine: fix deprecated esp_pm_config_XXX_t - machine_i2s: fix deprecated fields and constants - mpconfigport: keep some funcs out of IRAM for ESP32-SPIRAM builds - boards/ESP32_GENERIC: disable network.LAN and VM-opt on D2WD - change minimum supported IDF version to v5.0.4 - re-enable custom mbedtls error string tables - add MICROPY_GC_INITIAL_HEAP_SIZE option and tune it - mpconfigport: enable MICROPY_PY_HASHLIB_MD5 mimxrt port: - led: fix LED init call from main, and simplify led_init - boards: define missing SNVS pins for all processors - machine_rtc: add RTC alarm/wakeup functionality - modmachine: add support for machine.deepsleep - boards/make-pins.py: update to use tools/boardgen.py - modmachine: fix settings for the MIMXRT1170 board - boards/OLIMEX_RT1010: adjust the UART pin assignment minimal port: no changes specific to this component/port nrf port: - boards: automatically configure MICROPY_PY_MACHINE_PWM - modules/machine: use SPI Python bindings provided by extmod - boards/make-pins.py: don't generate qstrs - boards/make-pins.py: add a note about tools/boardgen.py - use MICROPY_PY_MACHINE_SPI instead of MICROPY_PY_MACHINE_HW_SPI - use dupterm_objs[0] instead of board_stdio_uart - convert os module to use extmod version - mpconfigport: enable MICROPY_PY_MACHINE_BOOTLOADER - boards/ARDUINO_NANO_33_BLE_SENSE: don't enable MICROPY_MBFS - main: add /flash and /flash/lib to sys.path 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 renesas-ra port: - boards/make-pins.py: don't generate qstrs - boards/make-pins.py: update to use tools/boardgen.py - boards/ARDUINO_PORTENTA_C33: fix incorrect I2C pins - consolidate MICROPY_PY_MACHINE_I2C option rp2 port: - cyw43_configport: use m_tracked_calloc and m_tracked_free - machine_adc: add support for external ADC channels - boards/ARDUINO_NANO_RP2040_CONNECT: add external analog pins - boards/make-pins.py: don't generate qstrs - machine_uart: fix handling of serial break condition - machine_adc: refactor channel/pin validation code - remove 1ms timeout to make idle waiting tickless - change to use TinyUSB dcd_event_handler hook - mphalport: run TinyUSB stack while waiting for CDC input/output - integrate soft_timer using the alarm pool - mpbthciport: rework HCI polling timer to use soft_timer - mpnetworkport: rework lwIP polling to use soft_timer - mphalport: optimise exit of mp_hal_delay_ms loop - cyw43_configport: implement cyw43_delay_ms as mp_hal_delay_ms - switch to locally provided math library - switch rp2 and drivers to use new event functions - main: enable SEVONPEND CPU interrupt bit - mpconfigport: enable MICROPY_PY_OS_DUPTERM_NOTIFY - add new NO_DEFAULT_PINS config options for i2c, spi, and uart - boards: add support for Pololu 3pi+ and Zumo robots - boards: add SIL_RP2040_SHIM board by Silicognition LLC - rp2_dma: introduce a new rp2.DMA class for control over DMA xfers samd port: - boards/make-pins.py: update to use tools/boardgen.py - mpconfigport: set MICROPY_USE_INTERNAL_ERRNO to 1 - machine_uart: add machine_uart_set_baudrate() function - pin_af: fix a typo in a conditional compile - switch TinyUSB to run via a scheduled task - mphalport: run TinyUSB stack while waiting for CDC input/output - switch to shared TinyUSB implementation - use unique id for USB serial number stm32 port: - boards/ARDUINO_GIGA: add QSPI fix/workaround to early init - boards/ARDUINO_GIGA: fix name of pins in board init - eth: add Ethernet support for H5 MCUs - boards/STM32H573I_DK: enable ETH and DAC peripherals - powerctrl: add support for frequency scaling with HSI on H5 MCUs - boards/make-pins.py: don't generate qstrs - boards: fix errors in pins.csv and af.csv - boards: format stm32 alternate function csv files - rename pin_obj_t to machine_pin_obj_t - boards/make-pins.py: update to use tools/boardgen.py - boards/make-pins.py: add initial support for H7 dual-pad pins - add configuration options for analog switches - add STM32H5 support for sleep mode - boards/make-pins.py: fix H7 ADC generation - boards/stm32f4x9_af.csv: fix DCMI_VSYNC - boards/stm32g474_af.csv: fix final row ADC column - boards/make-pins.py: only support ADC1-3 - boards/NUCLEO_WL55: freeze LoRa driver - mpu: enable STM32WB mpu use to support qspi flash - add optional lwip loopback support - boards/NUCLEO_F446RE: add UARTs 1, 3 and 4 - boards/NUCLEO_H563ZI: add new NUCLEO-H563ZI board definition - sdcard: add SD card support for H5 MCUs - boards/STM32H573I_DK: enable the SD card - add missing header include for debug builds - modmachine: only enable machine.I2C if hardware I2C is enabled - usbd_cdc_interface: include header to get machine_bootloader decl - machine_i2s: improve accuracy of SCK frequency - usbdev: optionally pass through vendor requests to Setup function - mboot: guard use of tx_pending with USE_USB_POLLING option - mboot: expand device descriptor to make it easier to understand - mboot: add support for Microsoft WCID teensy port: - remove the teensy port unix port: - mbedtls: enable mbedtls cert time validation - update port to use the new event functions webassembly port: no changes specific to this component/port windows port: - use the MicroPython logo as application icon - implement MICROPY_INTERNAL_WFE() macro zephyr port: no changes specific to this component/port
9feb068
2023-12-27 12:35
下载
v1.22.0-preview
69e34b6
2023-10-04 08:20
下载
v1.21.0
内容可能含有违规信息
e00a144
2023-10-06 07:32
下载
v1.20.0
New mip package manager, compressed type structs and Pico W support This release of MicroPython introduces a new lightweight package manager called mip, which uses a custom protocol to query and install packages that is optimised for embedded systems. It is intended to take over the role of upip and supports installing packages from micropython-lib as well as any URL. Mip can be run directly on a device (with network connectivity) or via mpremote. As part of this, all pure-Python drivers have been moved from the micropython repository to the micropython-lib repository, making it easier to install the packages needed for a given project. In the MicroPython runtime, core/built-in types have been compressed by only including in the C-level type struct as many slots for C function pointers as is needed for a given type (instead of storing NULL pointers for unused slots). This resulted in a reduction of code size of many kilobytes for all ports (eg around 1200 for bare-arm) with a very minimal loss in performance. Any third-party C extensions will need to be updated to work with this change. See commits 662b9761b37b054f08fe2f7c00d0fce3a418d0b0 and 3ac8b5851e5f4dade465d52b91ed2ccc17851263 for details. The MicroPython VM/runtime has also seen many improvements and bug fixes, including: addition of hex/fromhex methods to bytes/memoryview/bytearray, dictionary union (PEP 584), support for __float__ and __complex__ functions, support for __dict__ on module objects and UTF-8 validation of all strings. Whole number floats are now formatted exactly, and there have been other accuracy improvements to parsing and formatting of floats. A sub-version has been introduced for .mpy files which is used only when a .mpy file includes native code, allowing the native ABI to change while retaining backwards compatibility with pure bytecode .mpy files. There is now an option to have the GC heap split across more than one pool of memory, although this is not yet in use by the ports. And root pointer registration has been simplified with the new MP_REGISTER_ROOT_POINTER macro. In the network module, the keyword arguments to scan(), connect() and config() have been renamed to be more consistent across ports and drivers. The changed argument names are: "essid" changed to "ssid", "auth" or "authmode" changed to "security", and "password" changed to "key". The old keyword arguments are still supported so this change is backwards compatible. The functions network.hostname() and network.country() have also been added and provide a standard interface across ports to set the global networking configuration for all interfaces and interface types. In particular, setting the hostname is now supported for all CYW43xx-based boards (pyboard-D, Arduino Portenta, Pico W, and others). The mbedtls (SSL library) settings have also been unified across ports that use this library and enable elliptic curve DH and DSA cryptography enabled so that devices can connect to more websites. The cert_reqs and cadata arguments have also been implemented. Sockets now support leaving multicast groups. WebREPL will now run the page from the device, allowing WebREPL resources to load from a HTTPS site. The bluetooth module has a minor breaking change for IRQ_GATTC_CHARACTERISTIC_RESULT: def_handle has been replaced with end_handle. This is not expected to affect most programs as def_handle is unlikely to be used. See commit cacc96d98c2a70dc7e5194331ea70746c39746ec. The uasyncio module now supports stream read(-1), handles gather with no awaitables, and adds a clear() method to ThreadSafeFlag. The framebuf module adds ellipse and polygon drawing methods, and a fill argument to rect() for consistency with those new methods. A new port has been added, the "embed" port, which is a port of MicroPython that targets the C language and outputs a set of self-contained .c and .h files for embedding into a wider project. An example is provided to show how this works. The esp8266 port has reverse-special-methods enabled on the GENERIC board, uart.flush() and uart.txdone() added, real open drain output enabled on pins driven by PWM, and adds the ability to set TX power for the WLAN interface. The esp32 port now uses synchronous BLE events which allows support for BLE pairing and bonding. The LAN driver adds support for LAN8710, KSZ8081, configuration of ETH ref_clk pin, and support for SPI-based Ethernet chips. UART now supports setting timeout_char and implements uart.flush() and uart.txdone(). New boards include ESP32S3 with octal SPIRAM, Olimex PoE boards and a generic board for unicore chips. There have also been many bug fixes, in particular for newer MCU versions such as S2, S3 and C3. The mimxrt port has seen a lot of clean up of the code, support for MIMXRT1176 MCUs and the MIMXRT1170_EVK board, a soft-timer implementation of machine.Timer, addition of machine.bootloader(), as well as uart.flush() and uart.txdone(). On the nrf port, machine.UART and machine.PWM have been improved to match other ports (the PWM change is a breaking change), and machine.I2C now supports the freq argument. New boards include the Arduino Nano 33 BLE sense board and the Seeed XIAO NRF52840 Sense. The rp2 port sees the integration of the CYW43xx WiFi driver which is used in the new Pico W board, a board similar to the Pico but with WiFi support. Other new boards include W5500_EVB_PICO, WEACTSTUDIO and the nullbits Bit-C PRO board. Support has been added for named pins, including Pin.board and Pin.cpu attributes, consistent with other ports that support this feature. The machine.lightsleep() function has been implemented, along with SSL certificate time validation, and more accurate formulas are used to determine PWM frequency and duty. The GC heap available to MicroPython programs has been increased to use the maximum available free RAM, adding about 20k to the user heap. There have also been important bug fixes to threading and concurrency when using both cores. The samd port has been significantly extended to include: named pins with a pins.csv file, and Pin.board and Pin.cpu attributes; ADC, PWM, DAC, SoftSPI, SoftI2C, SPI, I2C and RTC classes added to the machine module; pin.irq() method and OPEN_DRAIN mode for pins; freq, disable_irq, enable_irq, idle, lightsleep and time_pulse_us functions added to the machine module. Floating point support has been added for SAMD21 devices, and the math module enabled for SAMD51. A board definition for Sparkfun Think Plus has been added. The stm32 port sees support added for STM32L1xx MCUs, STM32H723, USB on STM32G0xx and mboot support for STM32G0xx. The existing CYW43xx WiFi driver has been replaced with the open-source version of cyw43-driver and this has been integrated with all existing boards with CYW43xx chips. Support for the CC3000 WiFi driver has been removed, and the Wiznet driver integration has been reworked to use the generic one shared with other ports (and also uses lib/wiznet5k instead of the old drivers/wiznet5k). Hardware I2C implementation has been added for STM32L1xx and STM32L4xx, support added for Arduino 1200bps touch to enter the bootloader (only on Arduino boards), mbedtls (SSL) certificate time validation added, and link-time-optimisation (LTO) enabled by default on boards with small flash size. New board definitions include: LEGO Hub No. 7, NUCLEO-L152RE, NUCLEO-F756ZG, NUCLEO-H723ZG, Arduino Nicla Vision and Arduino Giga H7. Arduino boards also now include a range of frozen libraries including senml. For the unix and windows ports, build outputs (including executables) are now kept inside the $(BUILD) directory associated with the build. As part of this the variant suffix has been removed from the executable name. For example, what was micropython-coverage is now build-coverage/micropython, and the standard variant is build-standard/micropython. Furthermore, the dev variant has been removed and its features enabled instead on the standard variant, which now enables the same feature set as a typical bare-metal board, making it more convenient to use for development. The remaining variants are: minimal, standard, nanbox, coverage. The SSL implementation for this port has switched from axtls to mbedtls, again to match most bare-metal ports. The javascript port has been renamed to the webassembly port, and adds support for VFS and VfsPosix using Emscripten's POSIX filesystem layer. The way stdout printing works has also changed to dispatch via a custom event called "micropython-print". The zephyr port upgraded Zephyr to v3.1.0, added custom configuration for bbc_microbit_v2, and enabled finalisers. The change in code size since the previous release for various ports is (absolute and percentage change in the text section): bare-arm: -1124 -1.934% minimal x86: -4322 -2.967% unix x64: +264181 +50.533% standard stm32: -3592 -0.906% PYBV10 cc3200: -1832 -0.990% esp8266: -2284 -0.327% GENERIC esp32: +9659 +0.632% GENERIC nrf: -84 -0.045% pca10040 rp2: +13096 +4.291% PICO samd: +127776 +90.488% ADAFRUIT_ITSYBITSY_M4_EXPRESS The changes that dominate these numbers are: - bare-arm, minimal, stm32, cc3200, esp8266: reduced size due to compressed type structs - unix: switching axtls for mbedtls, merging in dev configuration options and features - esp32: new Ethernet drivers and some additional machine module functionality - nrf: compressed type struct and machine module improvements - rp2: additional mbedtls features and ciphers - samd: many new features, and machine module classes and functions Thanks to everyone who contributed to this release: Alex Riesen, Andrew Leech, Andrew Scheller, Angus Gratton, Antonello Margottini, Antonin ENFRUN, Ayke van Laethem, Blake Felt, brave ulysses, Brian Cooke, Brian Pugh, Carlosgg, Chris Overgaauw, Chris Swan, Chris Waggoner, chrismas9, Christian Clauss, Christian Walther, Clayton Cronk, cpottle9, Dale Weber, Damiano Mazzella, Damien George, Damien Tournoud, Dan Ellis, Daniel Jour, David (Pololu), David Grayson, David Lechner, David Peake, David Yang, Dorukyum, Efi Weiss, enriquezgarc, Felix Dörre, Florian Weimer, glenn20, hoihu, Howard Lovatt, iabdalkader, Ian Davies, IcedRooibos, Ihor Nehrutsa, Jacob Siverskog, Jan Hrudka, Jan Willeke, Jared Hancock, Jatty_, Jay Greco, Jeff Epler, Jeremy Rand, Jim Mussared, Jonas Scharpf, Jos Verlinde, Juan Francisco Cantero Hurtado, Koen De Vleeschauwer, Kyuchumimo, Lars Haulin, Laurens Valk, LiaoJingyi_winY7kp, Luiz Brandao, ma-lalonde, manobendro, Maripo GODA, Mark Grosen, Martin Milata, Mat Booth, Matt Trentini, Maureen Helm, Michael Bentley, Michael Mogenson, MrJake222, Nathan Hendler, Ned Konz, Nicholas H.Tollervey, Oliver Joos, omogenot, Patrick, Patrick Joy, Paul Grayson, Paul Warren, Pepijn de Vos, Peter Harper, Peter Hinch, PGE, Phil Howard, Philip Peitsch, Philipp Ebensberger, pmendham, Rayane Chatrieux, Red_M, Rob Knegjens, robert-hh, Sebastian Romero, Simon Arlott, Sky, Stewart C. Russell, Stig Bjørlykke, stijn, Stuart Langridge, Takeo Takahashi, Thorsten von Eicken, Tim Gates, Tobias Thyrrestrup, Tomasz 'CeDeROM' CEDRO, Tomofumi Inoue, TPReal, Trammell hudson, Wind-stormger, yn386, Yonatan Goldschmidt, 小权一句两句. The work done in this release was funded in part through GitHub Sponsors, by George Robotics, and by Planet Innovation. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== all: - fix paths to mpy-cross and micropython binaries - remove MICROPY_PY_IO_FILEIO config option - update all manifest.py files to use new features - simplify buffer protocol to just a "get buffer" callback - standardise mp_obj_type_t initialisation - make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE - fix #if inside MP_DEFINE_CONST_OBJ_TYPE for msvc - remove unnecessary locals_dict cast - use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS - keep msvc build output in build/ directories - fix Python comparison to None and True, and use "not in" - use micropython-lib unconditionally in manifests - replace upip with mip everywhere - update Python formatting to black "2023 stable style" - update copyright year range to include 2023 py core: - vm: change comparison for finally handler search from > to >= - emit: remove logic to detect last-emit-was-return-value - emit: suppress unreachable bytecode/native code that follows jump - objcell: make cell get/set funcs static-inline to reduce code size - parsenum: support parsing complex numbers of the form "a+bj" - parsenum: fix parsing of complex "j" and also "nanj", "infj" - parsenum: optimise when building with complex disabled - objclosure: forward function attributes for closures - objfun: support function attributes on native functions - builtin: remove unnecessary module declarations - builtinhelp: don't show help for an MP_MODULE_ATTR_DELEGATION_ENTRY - mkrules.cmake: improve printing of git-submodules error - scheduler: de-inline and fix race with pending exception / scheduler - vm: document internal SELECTIVE_EXC_IP option - emitnative: fix STORE_ATTR viper code-gen when value is not a pyobj - vm: remove check for ip being NULL when handling StopIteration - vm: in YIELD_FROM opcode, expand helper macros and remove them - vm: consistently indent #if guards to match the code they surround - objnamedtuple: fix segfault with empty namedtuple - misc: add MP_STATIC_ASSERT_NOT_MSC() - obj: add static safety checks to mp_obj_is_type() - obj: add debug-only runtime checks to mp_obj_is_type() - make_root_pointers: add MP_REGISTER_ROOT_POINTER parser/generator - mpstate: drop MICROPY_PORT_ROOT_POINTERS from mp_state_vm_t - persistentcode: use MP_REGISTER_ROOT_POINTER() - modsys: use MP_REGISTER_ROOT_POINTER() - scheduler: use MP_REGISTER_ROOT_POINTER() - misc: fix msvc compilation with compressed error messages - qstr: make mp_decompress_rom_string decl and def the same - gc: allow the GC heap to be split over multiple memory areas - gc: reduce code size when MICROPY_GC_SPLIT_HEAP is disabled - obj: add support for __float__ and __complex__ functions - obj: make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first - compile: support large integers in inline-asm data directive - modio: remove FileIO and TextIOWrapper from io module - formatfloat: format all whole-number floats exactly - builtinimport: remove duplicate static function argument - mkenv.mk: use micropython-lib from submodule by default - runtime: fix crash in star arg unpacking - mpprint: fix formatting typo with mp_print_ext_t struct name - objstr: reformat str access macros to make them readable - mkrules.mk: keep all build artefacts inside $(BUILD) directory - dynruntime.mk: allow building assembly source in natmods - nlrpowerpc: fix generation of ppc64 code on ppc32 build - qstr: change qstr hash type from mp_uint_t to size_t - objstr: consolidate methods for str/bytes/bytearray/array - objstr: add hex/fromhex to bytes/memoryview/bytearray - objstr: remove str function object declarations from header file - mkrules: use abspath to find directory for mpy-cross dependency - parsenum: ensure that trailing zeros lead to identical results - formatfloat: use pow(10, e) instead of pos/neg_pow lookup tables - dynruntime: add mp_obj_is_true - clean up formatting of union definitions - builtinimport: allow overriding of mp_builtin___import__ - objstr: split mp_obj_str_from_vstr into bytes/str versions - objstr: always ensure mp_obj_str_from_vstr is unicode-safe - objstr: optimise mp_obj_new_str_from_vstr for known-safe strings - objstr: always validate utf-8 for mp_obj_new_str - persistentcode: clarify ValueError when native emitter disabled - objpolyiter: add a new polyiter type with finaliser support - mpconfig: add LFS1/LFS2 options to match FAT/posix - mpconfig: make feature levels available to mpconfigport.h - mpconfig: add "everything" features from unix coverage - objpolyiter: fix comment about finaliser method - mkrules.mk: add link to build troubleshooting on failure - obj: add macro to declare ROM mp_obj_type_t instances - objexcept: make MP_DEFINE_EXCEPTION use MP_DEFINE_CONST_OBJ_TYPE - obj: add "full" and "empty" non-variable-length mp_obj_type_t - obj: add accessors for type slots and use everywhere - obj: add slot-index mp_obj_type_t representation - obj: remove basic mp_obj_type_t sparse representation - objtype: optimise slot RAM usage for instance types - objnamedtuple: optimise slot RAM usage for namedtuple - obj: merge getiter and iternext mp_obj_type_t slots - obj: convert make_new into a mp_obj_type_t slot - obj: optimise code size and performance for make_new as a slot - persistentcode: introduce .mpy sub-version - objmodule: add support for __dict__ - runtime: add mp_raise_OSError_with_filename helper function - include filename in errors from loading/saving files via "open" - parse: allow const types other than int to optimise as true/false - objstr: don't treat bytes as unicode in str.count - mkenv.mk: make CPP definition explicit for consistency - objstr: add a helper to set mp_obj_str_t data - modsys: add support for sys.executable - py.mk: make user-C-module handling self-contained in py.mk - misc: remove use of bitfield from vstr_t - obj: verify floating point type is correct for repr C - persistentcode: only emit sub-version if generated code has native - obj: add comments explaining the slot index scheme - makeversionhdr: fall back to py/mpconfig.h instead of docs/conf.py - builtinimport: fix crash handling "weak link" module names - objarray: detect bytearray(str) without an encoding - emitnative: ensure load_subscr does not clobber existing REG_ARG_2 - nlrmips: add native NLR support for MIPS architecture - makeversionhdr.py: allow running outside of repo - objdict: implement dictionary union (PEP 584) - bc: fix checking for duplicate **kwargs - modmicropython: make module optional - mpconfig: include micropython module in core features - remove the word "yet" from exception messages - pass in address to compiled module instead of returning it - gc: avoid valgrind false positives - gc: ensure a gap of one byte after the ATB - gc: fix debug printing of GC layout - obj: remove unused MP_DEFINE_CONST_OBJ_FULL_TYPE macro - emitnative: initialise locals as Python object type for native code - map: clear value when re-using slot with ordered dictionaries - gc: increase the address length in gc_dump_alloc_table() - objarray: raise error on out-of-bound memoryview slice start - lexer: wrap in parenthesis all f-string arguments passed to format - add parenthesis to default impl of MP_OBJ_TO_PTR, MP_OBJ_FROM_PTR - objint_mpz: catch and reject @ and @= operating on big integers - mkrules: support mpy-tool-flags in cmake frozen code generation - mkrules.cmake: force build mpversion.h and frozen_content.c - modmath: fix two-argument math function domain check - emitnative: explicitly compare comparison ops in binary_op emitter - makeversionhdr.py: optionally get git tag and git hash from env vars - compile: fix scope of assignment expression target in comprehensions - gc: make gc_dump_info/gc_dump_alloc_table take a printer as argument - mpconfig: provide config option for internal printf printer - builtinimport: fix unix port build with external imports disabled - makeversionhdr.py: always add micro to version string even if it's 0 - obj: add MP_NOINLINE to mp_obj_malloc_helper - mpstate: add mp_thread_is_main_thread() helper macro - scheduler: implement VM abort flag and mp_sched_vm_abort() - obj: fix spelling of staticmethod - makeqstrdefs.py: fix handling GreenHills C/C++ preprocessor output extmod: - network_cyw43: rename WLAN keyword args to ssid/security/key - network_ninaw10: rename WLAN connect argument from essid to ssid - modlwip: clean up inclusion of modlwip in build process - extmod.cmake: only include modbtree in build if it's enabled - extmod.mk: separate out extmod file list from py.mk to extmod.mk - modbtree: use buffer protocol for keys/values - uasyncio: attempt to write immediately in Stream.write method - uasyncio: implement stream read(-1) to read all data up to EOF - vfs: prevent uninitialized variable warning for path_out - network_cyw43: support new cyw43-driver - modnetwork: include cyw43-driver header if it's enabled - network_cyw43: add "security" config option to get/set auth mode - btstack: use MP_REGISTER_ROOT_POINTER() - nimble: use MP_REGISTER_ROOT_POINTER() - modnetwork: use MP_REGISTER_ROOT_POINTER() - uos_dupterm: use MP_REGISTER_ROOT_POINTER() - modlwip: use MP_REGISTER_ROOT_POINTER() - vfs: use MP_REGISTER_ROOT_POINTER() - modbluetooth: use MP_REGISTER_ROOT_POINTER() - always use custom mbedtls error message code - modussl_mbedtls: implement cert_reqs and cadata arguments - btstack: fix descriptor discovery handle range and events - network_ninaw10: move ninaw10 root pointer registrations here - modbluetooth: add support for running sync irq on system thread - webrepl: allow the page to run from the device (over HTTP) - uasyncio: handle gather with no awaitables - ntptime: factor out ntptime module from esp8266 port - modussl_mbedtls: set a more sensible default debug log level - network_cyw43: add hostname config option - network_wiznet5k: register NIC when the lwIP stack is used - network_wiznet5k: drop obsolete argument count check - network_wiznet5k: deinit the NIC before (re-)initialisation - network_wiznet5k: schedule clearing of interrupt flags - network_wiznet5k: rearrange the function wiznet5k_poll() - network_wiznet5k: extract SPI transfer function dynamically - uasyncio: add clear method to ThreadSafeFlag - uasyncio: rename internal _flag to state, to save a qstr - modlwip: add support for leaving multicast groups - vfs_posix_file: remove unused MICROPY_VFS_POSIX_FILE - modframebuf: optimise argument handling - modframebuf: add fill argument to rect() - modframebuf: add ellipse drawing method - modframebuf: add polygon drawing methods - modframebuf: improve poly-fill boundary pixels - network_wiznet5k: use the configured DNS address if available - machine_i2c: call MICROPY_PY_EVENT_HOOK during i2c.scan() - modure: convert byte offsets to unicode indices when necessary - modbluetooth: fix descriptor registration with empty tuple - modbluetooth: replace def_handle with end_handle in char IRQ - vfs: add finaliser to ilistdir to close directory handle - vfs_posix_file: implement finaliser for files - modbluetooth: change data_len type from size_t to uint16_t - modbluetooth: do GATTC reassembly in protected uPy context - modbluetooth: run BLE IRQ callback in protected NLR context - extmod.mk: make extmod.mk handle GIT_SUBMODULES - make extmod.mk self-contained - utime_mphal: make ticks_add check for overflow of delta - btstack: update BTstack bindings to work with latest BTstack - mbedtls: add common configuration file, and use it in all ports - mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE - mbedtls: enable elliptic curve DH and DSA cryptography - mbedtls: remove MBEDTLS_ECP_DP_CURVE25519_ENABLED config - mbedtls: remove brainpool curves from config - machine_timer: move stm32's implementation of machine.Timer here - vfs_posix: include errno.h and unistd.h headers - extmod.cmake: allow overriding the default MBEDTLS_CONFIG_FILE - modlwip: use actual errno in exception for error in listen - extmod.mk: set default mbedtls config file in extmod Makefile - btstack: allow the BTstack config to be overridden by a board - add and reorganise compilation guards and includes - extmod.cmake: add MICROPY_PY_BTREE compiler definition - moduplatform: remove _M_IX86 test for xtensa - moduplatform: fix MSVC x86_64 check - modframebuf: fix crash in FrameBuffer scrolling beyond extents - uasyncio: fix syntax of generator functions - modnetwork: use a type protocol to implement NIC functions - modussl_mbedtls: fix support for ioctl(MP_STREAM_POLL) - network_cyw43: fix handling of networks with open security - axtls-include: add back needed header files for building axTLS - utime_mphal: fix comment re delta range check in time_ticks_add - modbtree: move system includes within MICROPY_PY_BTREE guard - modnetwork: add network.hostname() and network.country() - modnetwork: allow more extensive port-specific customisation - network_cyw43: use CYW43_CHANNEL_NONE for default arg in connect - vfs_posix: do not filter '..*' in ilistdir when filtering '..' - network_ninaw10: check socket types when creating new sockets - network_cyw43: fix setting hostname using config() method - network_cyw43: add support to get STA RSSI using status() method - network_ninaw10: add missing raw socket type to socket() - btstack: switch to use hci_dump_init instead of hci_dump_open - modbluetooth: merge gatts_notify/indicate implementation - btstack: fix indicate/notify queuing - btstack: include value handle in client read/write events - btstack: fix MTU handling - btstack: add support for CCCD to allow client subscriptions - nimble: fix flags for descriptor registration - modbluetooth: make all HCI transports trace in the same format - btstack/modbluetooth_btstack: add default services shared: - runtime/tinyusb_helpers: add TinyUSB helper functions - netutils/dhcpserver: match default DNS to server IP - readline: use MP_REGISTER_ROOT_POINTER() - runtime/pyexec: use MP_REGISTER_ROOT_POINTER() - runtime/softtimer: move softtimer.[ch] to shared/runtime - runtime/softtimer: remove obsolete #include statement - runtime/sys_stdio_mphal: make func static and remove some TODOs - runtime/gchelper_native: fix pointer cast on x86_64 - netutils: add "py/obj.h" header include - tinyusb: create common TinyUSB code for reuse by ports - tinyusb: further refactor static USB device implementation - tinyusb: fix CDC bNumInterfaces value - runtime: use mp_printf consistently, instead of printf - runtime/gchelper: drop cpu directive from ARM asm helpers - runtime/softtimer: use consistently the same clock source - runtime/softtimer: fix ticks range when computing ticks diff - tinyusb: allow max USB descriptor string to be configured - runtime/pyexec: don't allow Ctrl+C to interrupt frozen boot code - tinyusb: revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256 drivers: - hts221: add HTS221 humidity sensor driver - lsm9ds1: add LSM9DS1 IMU driver - lps22h: add LPS22HB/HH pressure sensor driver - lps22h: use machine.idle for power saving - ninaw10/nina_wifi_bsp: use MP_REGISTER_ROOT_POINTER() - fix a few typos in comments - cyw43: allow configuring the netif/mDNS hostname - sdcard: add delay in init_card_v1 to make timeout work - wiznet5k: remove old Wiznet driver - cc3000: remove CC3000 WiFi driver files - display: don't include tests by default - remove drivers that are now in micropython-lib - ninaw10: connect to WiFi asynchronously - bus: detect QSPI transfer errors and pass up to spiflash driver - bus: change QSPI read_cmd signature to return an error code - ninaw10: implement machine.Pin external pin controls - cyw43: use board-defined BLE UART secondary baudrate - cyw43: use a different baudrate for BT firmware download - ninaw10: fix machine_pin GPIO read - cyw43: include CYW43 config file - ninaw10: add missing external pins 34 and 39 - ninaw10: fix ESP32 input-only pins mpy-cross: - Makefile: respect existing CFLAGS and LDFLAGS - remove .gitignore file - include alloca.h for NetBSD - mpy_cross: add Python wrapper for mpy-cross - mpy_cross: fix default path to mpy-cross binary - mpy_cross: add a way to query the mpy version - mpy_cross: add list of architectures to `__all__` - mpy_cross: add docstrings to public methods - main: don't set a default native architecture - main: add MSVC-compatible architecture checks - force forward slashes in paths - main: fix return type of mp_import_stat lib: - cyw43-driver: add new submodule for CYW43xx WiFi driver - pico-sdk: update to version 1.4.0 - cyw43-driver: update cyw43-driver to fix ap_auth mode setting - tinyusb: update to the most recent master - cyw43-driver: update driver to latest version - micropython-lib: add micropython-lib as a submodule - lwip: update lwIP to v2.1.3, tag STABLE-2_1_3_RELEASE - micropython-lib: update to latest version with manifest changes - micropython-lib: update submodule to latest - stm32lib: update library to get L1 v1.10.3, and some other fixes - micropython-lib: update submodule to latest - btstack: update to v1.5.3 - micropython-lib: update submodule to latest - libm: use __asm__ instead of asm - btstack: update to v1.5.4 - cyw43-driver: update driver to latest version - re1.5: reduce code size when checking for named class char - re1.5: add support for named classes in class sets - micropython-lib: update submodule to latest - cyw43-driver: update driver to latest version - pico-sdk: update to version 1.5.0 - cyw43-driver: update driver to latest version v0.9.0 - micropython-lib: update submodule to latest - stm32lib: update library to get H7 v1.11.0 - cyw43-driver: update driver to latest version v1.0.0 - micropython-lib: update submodule to latest Support components ================== docs: - update to use new WLAN argument names for ssid/security/key - library/pyb.Timer: document `brk` argument and its constants - library: remove unnecessary "pyb." prefix on class names - set LaTeX engine to XeLaTeX for PDF generation - library/machine: add note on interrupts being critical to system - library/uasyncio: consistently use "uasyncio" instead of "asyncio" - library/bluetooth: add link to aioble - library/neopixel: add note that neopixel is included in rp2 builds - library/time: provide more info about which epoch is used - library/pyb.Pin: fix out-of-context paragraphs, and AF_PP typo - library/pyb.Pin: add Pin.ALT constant - library/pyb.Timer: document how to use BKIN pin with example - update links for Arm GCC toolchain - library/rp2: fix pull_thresh docs to use pull instead of push - esp32: fix string quoting consistency in SDCard mount example - update CPython differences and improve the look of table layouts - esp32: update UART quickref on input-only pins - library/machine.UART: add notes about UART init and deinit - library: fix nested rst styles not rendering - library/micropython: fix spelling of compiler - templates/topindex.html: update forum link - library/machine.I2C: add a note about I2C pull-up resistors - library/machine.UART: add docs for uart.flush() and uart.txdone() - renesas-ra: add pin drive keyword argument description - Makefile: enable parallel compilation for Sphinx - templates/layout.html: indicate latest vs release docs - samd: add documentation for the samd port - library/machine: add machine.memX to docs with brief example - samd/pinout: fix the pin numbering for the default assignments - develop: fix mp_compile snippet to match latest code - renesas-ra: correct the internal file system size of EK-RA6M2 - library/array: add docs for dunder methods - library/pyb.CAN: update the recv example to take a 5-tuple - library/uasyncio: describe restriction on ThreadSafeFlag - library/framebuf: clarify docs for blit regarding palette - library/struct: fix buffer argument description - library/struct: embed format tables - library/neopixel: update GitHub URL for neopixel.py link - differences: update Python 3.9 status - differences: add Python 3.10 page - rp2: make LED have exactly 50% duty cycle in PIO 1Hz example - library/rp2.StateMachine: expand put() documentation - library/socket: use correct sockaddr variable name - esp32/quickref: add docs for the LAN interface constructor - library/machine.Timer: add freq argument to machine.Timer - reference/constrained: add missing heap-dump symbols to mem_info() - zephyr/quickref: fix zsensor module usage examples - library/network: update docs for network.country, network.hostname - update copyright year range to include 2023 examples: - embedding: remove obsolete axtls build target - usercmodule: add example of a native C class - embedding: rework example to use ports/embed - rp2: add comment that examples using IO25 don't work on Pico W - bluetooth: fix check for _conn_handle being None - usercmodule/cexample: use mp_obj_malloc() - bluetooth/ble_temperature_central.py: remove service tuple tests: - extmod: add heap-lock test for stream writing - basics: add tests for __name__ and __globals__ attrs on closures - perf_bench: add some configurations for N=32, M=10 - add an explanation of run-perfbench.py - fix run-perfbench parsing "no matching params" case - micropython: add test for builtin execfile() function - extmod/ussl_basic: make test run on axtls and mbedtls - cpydiff: fix formatting of code snippet to use double quotes - run-tests.py: provide better default MPYCROSS value for Windows - extmod/ubinascii: add tests for bytes.hex etc - update path to unix micropython executable - unicode: add test for invalid utf-8 file contents - renesas-ra: update pin test to support all boards - extmod/uasyncio_heaplock.py: force SKIP on stackless - frozen: move frozentest.mpy from ports/ to tests/ - run-multitests: extend usage information - run-multitests: make paths more deterministic - allow 'special' tests to output "SKIP" on a single line - extmod: add test for sleep_ms value that overflows ticks - run-perfbench: support --heapsize argument and pass to executable - basics: add exp file for builtin_str_hex test - run-tests.py: use host arch for mpy-cross for target=unix - misc: add test for cexample module - misc/cexample_module: test class presence - misc/cexample_class: fix timing sensitivity - extmod/framebuf_scroll: add tests for FrameBuffer scrolling - unix/mod_os: add test for os module - extmod/ure_namedclass: add tests for named classes in class sets - float: skip new complex tests if complex unavailable - extmod: get DecompIO test running on low-memory targets - extmod: skip vfs tests if target doesn't have enough memory - micropython: split viper_misc test into two files - float: add domain checks for log and also -inf - float: make output of math function tests more readable - run-multitests.py: add ability to test instance over reboot - multi_bluetooth: add bluetooth multi-test for deepsleep - run-multitests.py: support outputting test metrics - multi_bluetooth: use multitest.output_metric in BLE perf tests - extmod/vfs_fat_ilistdir_del.py: use 512-byte erase block size - multi_bluetooth: use time.sleep_ms instead of time.sleep - multi_bluetooth/ble_mtu: split peripheral/central-initiated - multi_bluetooth/ble_subscribe: use end_handle in desc discovery - multi_bluetooth: add test for descriptors - multi_bluetooth/ble_characteristic.py: add write-no-response - multi_bluetooth: use multitest.broadcast instead of sleep tools: - metrics.py: add mimxrt and renesas-ra to list of available ports - ci.sh: drop ppa requirement for code formatting CI - pyboard.py: add verbose option to filesystem_command - mpremote: don't be verbose when using cat command - autobuild: add nrf port to autobuild scripts - ci.sh: initialise submodules for more ports - ci.sh: force mpy-cross build for samd and teensy - update path to unix micropython executable - mpremote: allow + terminator for fs commands - pyboard.py: add "touch" filesystem command - mpremote: add "edit" command - ci.sh: split the stm32 builds for wiznet5k and cc3k - mpremote: print a nicer error when a filesystem command fails - pyboard.py: remove implicit fs_put if source starts with ./ - pyboard.py: add fs_cp function for direct device-to-device copy - mpremote: print nicer errors for unsupported 'cp -r' arguments - manifestfile.py: add library for working with manifests - makemanifest.py: update to use mpy_cross module - manifestfile.py: allow include of directory path - manifestfile.py: allow require() to specify unix packages - manifestfile.py: allow manifests to set metadata - autobuild: use distinct directory for building stm32 variants - makemanifest.py: force the repo version of the mpy_cross package - pyboard.py: support Windows pathname separators - manifestfile.py: add `author` kwarg to metadata() - manifestfile.py: replace recursive glob with os.walk - mpremote: simplify dispatch of commands - mpremote: use argparse for command line parsing - mpremote: add `mpremote mip install` to install packages - pyboard.py: handle unsupported fs command - add note about uncrustify versions - add pre-commit support - mpremote: fix argument handling for follow and add help strings - mpremote: bump version to 0.4.0 - verifygitlog.py: ignore comment lines in commit messages - verifygitlog.py: add additional help for subject line issues - mpremote: handle FileNotFound exceptions in listdir - mpremote: make RemoteFile objects iterable - makemanifest.py: fix printing of mpy_cross.CrossCompileError - gen-cpydiff.py: use os.path.join and os.path.isdir - gendoc.py: remove unused script - ci.sh: add ARDUINO_NANO_RP2040_CONNECT to rp2 CI build - ci.sh: remove one build from zephyr CI to speed it up - ci.sh: don't print python2 version - mpremote: allow EDITOR environment variable to work on Windows - mpremote: only auto connect to serial device with USB VID/PID - autobuild: create .uf2 file for seeed_xiao_nrf52 - pyboard.py: fix Python 2 compatibility - pyboard.py: add parse kwarg to eval - pyboard.py: add fs_{listdir,readfile,writefile,stat} - pyboard.py: set DTR on Windows to avoid ESPxx hard reset - mpy-tool.py: initialize line_info_top - ci.sh: install pkg-config for macos builds - ci.sh: add unix, stm32 and rp2 ports to code size check - mpremote: use hatch to build mpremote package - pyboard.py: use '/' exclusively when dealing with paths - pyboard.py: fix joining of path in filesystem_command - pyboard.py: fix ESPxx boards hanging in bootloader after reset - manifestfile.py: add support for publishing packages to PyPI - mpremote: add ctrl-x as additonal mpremote disconnect shortcut CI: - ISSUE_TEMPLATE: make minor improvements to placeholder text - ISSUE_TEMPLATE: replace forum with Discussions - workflows: print test failures for webassembly workflow - workflows: bump actions/checkout to v3 - add dependabot to update GitHub Actions - workflows: bump codecov/codecov-action from 1 to 3 - workflows: bump actions/setup-python from 1 or 2 to 4 - workflows: run unix port workflow if mpy-cross changes - workflows: use ubuntu-20.04 when python2 is required - workflows: run mpy-format CI when tests and examples change - workflows: comment on code size change instead of failing CI - workflows: fix code size comment workflow for non-PR - workflows: cancel when branch is updated - workflows: update existing comments for code_size_comment - workflows/code_size: print code size change - workflows: add "shared/**" to list of paths that trigger CI - workflows: add workflow to build mpremote wheel - workflows: bump actions/setup-python from 1 to 4 - workflows: bump actions/checkout from 2 to 3 - workflows: bump actions/upload-artifact from 2 to 3 The ports ========= all ports: - adapt mimxrt, nrf and rp2 ports to work with latest TinyUSB - fix a few typos in comments - remove unused mp_type_{fileio/textio} macros in mpconfigport.h - always include debug information in the ELF - always append to GIT_SUBMODULES - use micropython-lib version of drivers in manifests - make generated pin.c handling more consistent across ports - make all network-capable boards use bundle-networking - make BOARD default from BOARD_DIR in Makefile's - rename remaining "Micro Python" to "MicroPython" - fix MCU tags in Arduino board.json files - implement simple write polling for stdout bare-arm port: no changes specific to this component/port cc3200 port: - mpconfigport: remove mp_const_user_interrupt - use MP_REGISTER_ROOT_POINTER() - fix various array-based compiler warnings - mods/pybuart: implement uart.flush() and uart.txdone() - remove unused NIC type customisation embed port: - add new "embed" port which builds a simple C package - fix arguments to mp_raw_code_load_mem esp8266 port: - modnetwork: rename WLAN keyword args to ssid/security/key - mpconfigport: switch to ROM feature level configuration - mpconfigport: disable MICROPY_PY_UTIMEQ - rename WLAN dhcp_hostname config to hostname - boards: enable reverse-special-methods on GENERIC board - use MP_REGISTER_ROOT_POINTER() - modnetwork: add support for WLAN.config(protocol=XX) option - README: update build instructions to match ci.sh - machine_uart: implement uart.flush() and uart.txdone() - modmachine: move dht_readinto() to the machine module - machine_pwm: enable real open drain output on pin driven by PWM - machine_pin: disable open drain when pin becomes input/output - modnetwork: add ability to set tx power for WLAN interface - README: remove notice about port being "experimental" - use extmod/modnetwork.c instead of port-specific version esp32 port: - network_wlan: rename WLAN keyword args to ssid/security/key - machine_uart: implement the functionality of timeout_char arg - boards: increase 512 bytes limit on ULP programs to 2040 - modesp32: add wake_on_ulp() so ULP can wake CPU from deepsleep - network_wlan: don't raise exception when scan returns no results - rename WLAN dhcp_hostname config to hostname - modmachine: fix machine.freq to allow maximum 160MHz on ESP32-C3 - use MP_REGISTER_ROOT_POINTER() - mpconfigport: enable BLE synchronous events and pairing/bonding - Makefile: force micropython-lib as a required submodule - network_wlan: use esp_wifi_set/get_channel to config wifi channel - network_wlan: add support to set/get the wifi protocol - modnetwork: add network.MODE_LR constant - machine_uart: change sendbreak time to be at least 15 bit times - machine_timer: support all init arguments in Timer constructor - boards: merge manifest_release modules into standard manifest - machine_sdcard: free SPI bus when deiniting SD card - machine_uart: implement uart.flush() and uart.txdone() - mphalport: fix calculation of large sleep by using 64-bit arith - Makefile: add link to build troubleshooting on failure - modsocket: use mp_obj_is_integer to test port type - machine_pwm: don't use LEDC_USE_REF_TICK on ESP32-C3 variants - machine_i2s: add I2S finaliser which calls deinit() - machine_hw_spi: use auto DMA channel on S2, S3, C3 chips - rename machine I2C and SPI types consistently across ports - machine_i2c: fix clocks and timeouts for ESP32-C3, ESP32-S3 - machine_pin: fix size of machine_pin_irq_handler array - machine_pwm: verify PWM is active when config methods are called - add 32MiB partition table templates - usb: add a timeout to usb_tx_strn() - modmachine: move dht_readinto() to the machine module - boards/GENERIC_S3_SPIRAM: enable BLE support - boards/GENERIC_S3_SPIRAM: enable BLE - machine_timer: fix ESP32C3 timer period doubling - machine_touchpad: fix TouchPad for ESP32S2, ESP32S3 - main: don't call usocket_events_deinit if unavailable - usb: cleanup connection detection - boards/GENERIC_S3_SPIRAM_OCT: add ESP32S3 board with Octal SPIRAM - network_lan: add support for LAN8710 PHY - network_lan: support configuration of ETH ref_clk pin - network_lan: add support for SPI-based ethernet chips - network_lan: fix setting MAC address of ethernet devices - network_lan: fix compilation on IDF lower than v4.4 - machine_sdcard: change dma_channel to SPI_DMA_CH_AUTO for ESP32S3 - boards: add board definition for Olimex ESP32 PoE boards - boards/GENERIC_UNICORE: add board definition for unicore chips - network_lan: add support for Ethernet PHY KSZ8081 - add a small delay before leaving wlan.active() - boards/OLIMEX_ESP32_POE: remove id from and update board.json - Makefile: allow specifying BOARD_DIR on make command line - use extmod/modnetwork.c instead of port-specific version - machine_pin: use const for size of machine_pin_irq_handler array - esp32_rmt: fix looping behaviour for RMT on ESP32-S3 mimxrt port: - Makefile: refactor Makefile and divide it into sections - Makefile: modify handling of SDRAM option - Makefile: modify handling of SDCARD option - Makefile: rework board flash type handling - Makefile: rework floating point config - Makefile: fix some minor formatting inconsistencies - boards: remove conditional assignment of flash type/size - use MP_REGISTER_ROOT_POINTER() - machine_uart: implement uart.flush() and uart.txdone() - machine_uart: drop a few commented lines about TX ring buffer - format the firmware image to match the new teensy loader - machine_spi: allow a setting of -1 for cs in the constructor - machine_uart: set the UART ioctl write poll flag properly - machine_uart: fix a bug in UART.write() - Makefile: split up SRC_C variables - machine_pin: add the Pin.toggle() method - fix CPU freeze when calling __WFE() in MICROPY_EVENT_POLL_HOOK - machine_timer: use soft-timer implementation for machine.Timer - machine_timer: use extmod version of machine.Timer - mphalport: add a timeout to mp_hal_stdout_tx_strn() - modmachine: move dht_readinto() to the machine module - add support for MIMXRT1176 MCUs, and MIMXRT1170_EVK board - README: add build and flashing instructions - usb: change macro name MICROPY_HW_USB_STR_MANUF - network: rename the argument clock_mode to ref_clk_mode - Makefile: set MPY_CROSS_FLAGS - mpconfigport: remove config options that are set by default - machine_rtc: set the microsecond value to 0 - sdcard: fix an error when writing large blocks - sdcard: remove obsolete code already excluded by preprocessor - set MICROPY_GC_STACK_ENTRY_TYPE to uint32_t for large RAM - Makefile: move the FROZEN_MANIFEST setting after board config - enable ROM text compression - pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation - pendsv: clean up PendSV code - Makefile: fix internal flash configuration and build - boards/MIMXRT1064_EVK: fix board config to use internal flash - mpconfigport: allow configuring different network interfaces - modmachine: implement machine.bootloader() - fix the build for boards without ROM API minimal port: - Makefile: avoid terminal reset, use BUILD variable - Makefile: set linker to $(CC) - increase heap size for Linux builds nrf port: - main: add startup and early-init board hook macros - modmachine: add machine.bootloader() and make it customisable - enable optional support for Arduino 1200bps touch - Makefile: drop unused MPY_CROSS and MPY_TOOL variables - boards/arduino_nano_33_ble: add Arduino Nano 33 BLE sense board - modmachine: add machine.idle() function - mpconfigport: remove obsolete module declarations - drivers/bluetooth: handle PHY_UPDATE messages, used in Bluetooth 5 - drivers/usb: probe for interrupt char in USB CDC task - drivers/usb: add a tud_cdc_rx_cb() callback to check interrupt char - mpconfigport: call tud_task() in MICROPY_EVENT_POLL_HOOK - drivers/usb: fix reading of a single USB CDC character - use MP_REGISTER_ROOT_POINTER() - boards/arduino_nano_33_ble_sense: update deploy instructions - main: call usb_cdc_init() before executing boot.py and main.py - modules/ubluepy: use mp_obj_str_get_data to extract str data - don't enable debug info by default if LTO is on - modules/machine/uart: implement uart.flush() and uart.txdone() - Makefile: split up SRC_C variables - rename machine I2C, PWM, SPI, UART types consistently across ports - rename MICROPY_PY_MACHINE_TIMER to MICROPY_PY_MACHINE_TIMER_NRF - boards/seeed_xiao_nrf52: add defn for Seeed XIAO NRF52840 Sense - mpconfigport: enable seeding of the PRNG by the hardware RNG - Makefile: add support for BOSSAC flasher - boards/arduino_nano_33_ble_sense: add support for REV-2 chipset - modules/machine/pwm: add paramter checks and error messages - modules/machine/pwm: use extmod/machine_pwm.c for PWM module - modules/machine/soft_pwm: add PWM for nrf51x boards using soft PWM - modules/machine/pwm: support using all 4 channels of a PWM module - modules/machine/uart: add timeout keyword options and "any" method - nrfx_config: use the UARTE definitions and drivers for the NRF52xx - modules/machine: use a dedicated function for machine.idle() - modules/machine: support the freq=n argument for machine.I2C - modules/machine/pwm: fix resource conflict, and change id to device - nrfx_config: use UARTE for nrf52xxx devices - modules/machine/uart: prevent UART lock-up after a receive error pic16bit port: - pic16bit_mphal: use MP_REGISTER_ROOT_POINTER() powerpc port: no changes specific to this component/port qemu-arm port: no changes specific to this component/port renesas-ra port: - modmachine: allow boards to provide custom bootloader code - machine_i2c: remove unnecessary start/stop dummy functions - mpconfigport: drop pyb_hid_report_desc root pointer - use MP_REGISTER_ROOT_POINTER() - softtimer: switch to use softtimer code from shared/runtime - machine_pin: support drive keyword and fix GPIO setting - rename machine SPI type consistently across ports - machine_timer: use extmod version of machine.Timer - boards: update linker script to detect code flash overflow - disable debugging option for RA4 to reduce code size - change file system size to 64KB for RA6M1 - add the UART methods uart.txdone() and uart.flush() rp2 port: - modmachine: allow boards to provide custom bootloader code - boards/ARDUINO_NANO_RP2040_CONNECT: enable Arduino 1200bps touch - modmachine: implement lightsleep() with optional sleep period - mpthreadport: ensure core1 doesn't hold gc lock in deinit - mbedtls: enable some more mbedtls options - lwip_inc: enable lwIP status callback - rp2_flash: add asserts for size of flash filesystem partition - mpnetworkport: convert network task scheduling to use PendSV IRQ - integrate CYW43xx WiFi driver - boards/PICO_W: add new Pico W board, an RP2040 with WiFi - boards/GARATRONIC_PYBSTICK26_RP2040: change pico-sdk board name - main: set default AP auth mode to WPA2_AES_PSK - mpconfigport: factor core event handling to EVENT_POLL_HOOK_FAST - Makefile: regenerate cmake if generated Makefile missing - CMakeLists: give error if required submodules are missing - CMakeLists: don't override cyw43-driver unless necessary - boards/ARDUINO_NANO_RP2040_CONNECT: add urequests module - run USB stack task exclusively from core 0 - make atomic sections suspend the other core (if active) - mpconfigport: make networking options consistent across boards - mphalport: fix missing storage_read_blocks symbol in debug build - CMakeLists: use armv6m mpy-cross arch for rp2 - use MP_REGISTER_ROOT_POINTER() - mpbthciport: remove mp_bthci_uart from set of root pointers - cyw43_configport: set CYW43_EVENT_POLL_HOOK value - cyw43_configport: set CYW43_WIFI_NVRAM_INCLUDE_FILE value - rp2_pio: fix StateMachine.restart when PIO program is shared - cyw43_configport: add event hook into cyw43_delay_ms - Makefile: always use cmake to discover submodules - mbedtls: enable certificate validity time validation - machine_spi: add mp_hal_get_spi_obj helper function - boards/W5500_EVB_PICO: add new board definition for W5500_EVB_PICO - mark gc_heap NOLOAD for faster boot - correctly determine path to arm-none-eabi-size - machine_wdt: check for the maximum timeout value of watchdog - machine_uart: implement uart.flush() and uart.txdone() - mbedtls: fix missing time.h include - rp2_flash: add start/len support to rp2.Flash() constructor - boards: set PICO_BOARD correctly for each board - machine_spi: use pico-sdk's default pins for SPI - machine_i2c: use pico-sdk's default pins for I2C - boards: remove all I2C,SPI pin defs that already match pico-sdk - Makefile: add link to build troubleshooting on failure - Makefile: add support for BOARD_VARIANTS - boards/WEACTSTUDIO: add WEACTSTUDIO with multiple variants - fatfs_port: fix the modification date of files - rename machine I2C type consistently across ports - mphalport: add a timeout to mp_hal_stdout_tx_strn() - cyw43_configport: make sure only core0 executes a __WFI() - modmachine: move dht_readinto() to the machine module - allow enabling USB device without enabling USB-CDC - boards/ARDUINO_NANO_RP2040: add more modules and enable MD5 hash - fix lightsleep to work with interrupts and cyw43 driver - machine_pwm: use more accurate formulas for freq and duty_u16 - machine_pwm: fix overflows with freq > 268 MHz - mphalport: change order of pin operations to prevent glitches - rp2_flash: call MICROPY_EVENT_POLL_HOOK_FAST after reading flash - machine_pin: refactor the machine.Pin class for external GPIO - machine_pin: add support for named pins and alternate functions - boards: add pin CSV files to board definitions - fix crash in a pin.irq handler - main: use mp_printf in nlr_jump_fail - machine_pin: fix configuring OPEN_DRAIN with initial value - boards/NULLBITS_BIT_C_PRO: add Bit-C PRO board - rp2_pio: track use of PIO resources and free them on soft reset - boards/ARDUINO_NANO_RP2040_CONNECT: use default aioble - mpconfigport: enable os.dupterm and hashlib.sha1 on all boards - cyw43_configport: specify the chipset firmware include file - Makefile: allow specifying BOARD_DIR on make command line - pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation - boards/ARDUINO_NANO_RP2040_CONNECT: include "time" in manifest - boards/ARDUINO_NANO_RP2040_CONNECT: add more external pins - boards/ARDUINO_NANO_RP2040_CONNECT: include "senml" in manifest - modrp2: support reading the BOOTSEL button on the Pico board - modrp2: disable other core, shorten delay to 8us in bootsel_button - allocate GC heap from unused RAM - allow disabling USB via MICROPY_HW_ENABLE_USBDEV config - main: keep UART REPL with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1 - machine_uart: fix setting of UART LCR parameters - machine_i2c: add timeout parameter for machine.I2C() - memmap_mp.ld: allow a board to reserve memory for the C heap samd port: - mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used - remove the existing provisional support for REPL on UART - boards: replace pins.c and pins.h by pins.csv - boards: move mcu-specific settings into a mpconfig_samdXX.h file - Makefile: alphabetically sort the source code files in Makefile - boards: add ADAFRUIT_FEATHER_M4_EXPRESS and _ITSYBITSY_M0_EXPRESS - clock_config: set up the clock configuration - modmachine: allow changing the CPU freq with machine.freq(f) - mphalport: add pin open-drain funcs, and improve delay and ticks - samd_isr: extend systick_ms to 64 bit - machine_pin: add OPEN_DRAIN mode for pins - machine_pin: allow specifying a pin or LED by its name as a string - modmachine: enable SoftSPI and SoftI2C - boards: create pin_af_table.c from pin_af_table_SAMDxx.csv files - pin_af: add the pin af table and its helper functions - machine_adc: add the machine.ADC class - machine_pwm: add the machine.PWM class - samd_isr: rework the interrupt tables - machine_pin: add pin.irq() to the machine.Pin class - modmachine: add disable_irq(), enable_irq() and idle() to machine - machine_uart: add the machine.UART class - machine_spi: add the machine.SPI class - machine_i2c: add the machine.I2C class - moduos: add uos.dupterm() - moduos: add uos.urandom() for SAMD51 - main: use the common execution mode of boot.py and main.py - mpconfigport: enable a few more MicroPython features - samd_isr: change the way a Sercom ISR is registered and called - machine_timer: add machine.Timer based on the shared soft-timer - machine_wdt: add the machine.WDT class - modsamd: add pininfo() function to the samd module - machine_led: optimise size of the machine.LED class - machine_dac: add the machine.DAC class - modmachine: add machine.time_pulse_us - mcu: factor out MCU policy for SAMD21 and SAMD51 - mphalport: add a mp_hal_ticks_ms_64() function - modutime: enable time.time() based on systick_ms() - machine_uart: support buffered TX for UART - boards: add missing/lost board config and pin definitions - mphalport: use CYCCNT for SAMD51's mp_hal_ticks_cpu() - machine_bitstream: add the machine.bitstream() function - mpconfigport: restructure to use ROM feature levels - clock_config: split clock_config.c to separate SAMD21/SAMD51 files - clock_config: add HW_DFLL_USB_SYNC and HW_MCU_OSC32KULP extensions - pin_af: simplify the pin-af-table handling - samd_flash: remove obsolete printf's and return values instead - Makefile: fix a dependency problem with "make -j" - mphalport: fix USB endpoint handling ignoring Ctrl-C - change the symbol names for the peripheral clocks - mcu: add floating point suport for SAMD21 devices - mcu: enable the math module on SAMD51 - boards: move the flash filesystem definitions to the linker files - boards: use the same linker file for all SAMD51x19 variants - main: initialize readline on start up - mcu: use lf2s for SAMD51 and lfs1 for SAMD21 - machine_pin: change the printing of Pin and LED objects - Makefile: split up SRC_C variables - rename machine I2C type consistently across ports - clock_config: extend the range of machine.freq() - clock_config: support changing machine.freq() for SAMD21 - modmachine: add machine.reset_cause() - boards/SPARKFUN_SAMD51_THING_PLUS: add board files for Thing Plus - modmachine: add machine.dht_readinto and enable on SAMD51 - mcu/samd51: enable onewire support for SAMD51 - mcu/samd51: enable FAT support for SAMD51 - modmachine: implement machine.lightsleep() - modmachine: get the bootloader magic address from the lib - clock_config: document the #defines use in init_clocks() - machine_uart: implement uart.txdone() and uart.flush() - mcu: make some settings in mpconfigmcu.h conditional - machine_rtc: add the machine.RTC class - clock_config: extend the SAMD51 us-counter to 60 bit - boards/SEEED_WIO_TERMINAL: declare more pins for SEEED WIO board - machine_pin: change the pin handling and naming/numbering - make ADC, DAC, PWM, SPI objects consistent in how they print out - modmachine: replace the LED class by the Signal class - boards: rework the pins.csv files - machine_pwm: serialize fast update of PWM settings - machine_uart: use a finaliser to tidy up UART on soft reset - machine_spi: implement spi.deinit() and simplify sercom_deinit_all - machine_spi: register SerCom objects as root pointers - modmachine: add machine.softreset() - machine_timer: use extmod version of machine.Timer - mcu/samd51: use an additional manifest.py for SAMD51 boards - README: update README to reflect recent changes to the port - boards/SEEED_WIO_TERMINAL: enable using the 32kHz crystal - mphalport: add a timeout to mp_hal_stdout_tx_strn() - move MCU-specific CFLAGS to mpconfigmcu.mk - Makefile: set MPY_CROSS_FLAGS - mpconfigport: support MICROPY_HW_SOFTSPI_MIN_DELAY - mpconfigport: use __WFE() in MICROPY_EVENT_POLL_HOOK - avoid under-/overflow in I2C and SPI baudrate calculations - machine_uart: fix IRQ flag setting and clearing - machine_uart: simplify machine_uart_any() and machine_uart_read() - machine_uart: check the UART TX pin assignment - machine_uart: fix uart.deinit() and save some RAM - add a vref=num option to the ADC and DAC constructor - support entering bootloader via USB CDC 1200bps touch - boards/SEEED_XIAO: rename to SEEED_XIAO_SAMD21 - add Pin.board and Pin.cpu classes to Pin - boards: clean up comments and some pins in pins.csv files - mcu: rework the comments in clock_config.c - mcu: use the FDPLL96M clock for the SAMD21 CPU - mcu: implement a hardware seed for the SAMD21 random module - mcu: set the SAMD21 us-counter to 2 MHz for better resolution - moduos: add uos.urandom() using the phase-jitter rng - pendsv: add MICROPY_BOARD_PENDSV_ENTRIES for board customisation - always provide the machine.RTC class stm32 port: - modmachine: allow boards to provide custom bootloader code - modmachine: factor out mboot enter code to a function - boards/stm32f091xc.ld: allocate space for a small filesystem - boards/NUCLEO_F091RC: enable LFS1 filesystem - Makefile: set CSUPEROPT to -Os for F0 and G0 MCUs to save space - usbd_cdc_interface: add support for Arduino 1200bps touch - usb: expose USB HID device instance via usbd_hid_get() - use a separate symbol name for the bootloader state pointer - Makefile: enable link-time-optimisation via LTO=1 make option - boards: enable LTO by default on boards with smaller flash size - Makefile: fix setting of define that enables WIZNET5K driver - mboot: remove redundant code in mboot_state_change function - boardctrl: allow boards to override fatal-error handler - sdram: include boardctrl.h for fatal-error handler - use MP_REGISTER_ROOT_POINTER() - Makefile: workaround LTO linker order bug in binutils <2.35 - softtimer: switch to use softtimer code from shared/runtime - boards/LEGO_HUB_NO6: fix typo in README - boards/LEGO_HUB_NO6: use named pins - boards/LEGO_HUB_NO6/appupdate: detect filesystem size at runtime - boards/LEGO_HUB_NO6/spiflash: pick command type at runtime - boards/LEGO_HUB_NO6/cc2564: make timer configurable - boards/LEGO_HUB_NO7: add LEGO Hub No. 7 board definition - boards/NUCLEO_WB55: add error handling to firmware update scripts - don't enable debug info by default if LTO is on - switch Wiznet to use lib/wiznet5k and extmod/network_wiznet5k - add definitions required for lwIP version of Wiznet NIC - mphalport: add mp_hal_get_spi_obj() helper function - sdram: enable MPU for unaligned access on H7 MCUs - boards: increase mboot region to 32k for WB55 boards - move board variant config to mpconfigboard.mk - boardctrl: use HAL_Delay instead of mp_hal_delay_ms - remove support for CC3000 WiFi driver - machine_uart: implement uart.flush() and uart.txdone() - boards/LEGO_HUB_NO6: update manifest to new format - boards: only freeze LCD160CR driver in PYB board firmware - adc: make ADCAll.read_channel reject invalid channels - pyb_i2c: fix pyb.I2C to work with dma=True on F4 MCUs - timer: fix use of timer channel callback() method on L4 MCUs - boards: add alternate function list for STM32F446RE - boards/PYB: fix handling of BOARD_VARIANT selection - make-stmconst.py: support TypeDef's with a single char prefix - add support for STM32L1 MCUs - boards/NUCLEO_L152RE: add NUCLEO-L152RE board support - rename machine I2C and SPI types consistently across ports - boards/ARDUINO_PORTENTA_H7: revert to single-precision float - mbedtls: enable mbedtls certificate time validation - Makefile: allow overriding the default MBEDTLS_CONFIG_FILE - boards/ARDUINO_PORTENTA_H7: add custom mbedtls config - modmachine: move dht_readinto() to the machine module - spi: downgrade SPIHandle definitions to static - boards/ARDUINO_PORTENTA_H7: add more modules, I2C1 and SE pin - usbd_desc: support USB strings on CDC interface descriptors - Makefile: set MPY_CROSS_FLAGS based on MCU type - pyb_i2c: fix failing pyb.I2C(dma=True) after receiving 1 byte - i2c: fix I2C frequency calc so it doesn't exceed requested rate - adc: fix reading internal ADC channels on L4 MCUs - adc: fix ADCAll.read_core_temp() on L4 MCUs - i2c: add hardware I2C implementation for STM32L1 - i2c: add hardware I2C implementation for STM32L4 - mboot: make all mboot sectors erase/write protected - boards: add missing LPUART macros for H7 HAL - boards/NUCLEO_F429ZI: enable I2C1 and I2C2 with default pins - powerctrl: improve standby mode entry code for H7 MCUs - boards/NUCLEO_F756ZG: add board definition for NUCLEO-F756ZG - powerctrl: fix build on STM32G0xx and STM32H7Bx MCUs - boards: consolidate linker snippets to reduce duplication - Makefile: leave DFU mode after download when using dfu-util - boards/NUCLEO_H743ZI2: refer to NUCLEO_H743ZI for frozen manifest - boards/STM32F769DISC: fix building with USE_QSPI_XIP=1 - boards/ARDUINO_PORTENTA_H7: fix macro value check for QSPI - boards/ARDUINO_PORTENTA_H7: use default aioble - Makefile: clean up nested if-else to chained if-else-if - update to use the open-source lib version of cyw43-driver - boards: update linker scripts now that big_const is gone - add a default implementation of pyb.country - cyw43_configport: fix build for boards without an RF switch - boards/PYBD_SF2: set CYW43 Bluetooth fimrware download baudrate - cyw43_configport: allow boards to override default resource files - boards/ARDUINO_PORTENTA_H7: update board config files - Makefile: include HAL HSEM driver on H747 MCUs - boards/ARDUINO_NICLA_VISION: add support for Arduino Nicla Vision - boards/ARDUINO_GIGA: add support for Arduino Giga H7 board - cyw43_configport: add cyw43_sdio_enable_high_speed_4bit function - powerctrl: add sleep RCC semaphore management for WB55 MCUs - powerctrl: disable WB55 BLE before entering deepsleep - powerctrlboot: provide custom SystemInit for WB55 - powerctrl: don't compile WB helpers on WL MCUs - boards: include "senml" in manifest for ARDUINO boards - remove commented-out printf's and debugging code - main: use mp_printf instead of printf for MPY start-up messages - i2c: return error code and raise exception if I2C init fails - spi: return error code and raise exception if SPI init fails - modmachine: make machine.info print using mp_printf - extint: make ExtInt.regs print using mp_printf - pin: make pin_find debug output use mp_printf - pybthread: make pyb_thread_dump take a printer as its argument - boards/NUCLEO_H743ZI2: fix MCU tag in board.json file - mphalport: update HAL version to 1.11.0 to match stm32lib - add support for STM32H723 MCUs - boards: add ld and af.csv for H723 - boards/NUCLEO_H723ZG: add new H723 board - add support for USB on G0 MCUs - mboot: add support for G0 MCUs - boards/NUCLEO_G0B1RE: add config for USB and mboot - boards/ARDUINO_NICLA_VISION: fix incorrect bootloader PID - flash: fix get_bank function for STM32H750 - cyw43_configport: provide cyw43_hal_pin_config_irq_falling func teensy port: - mpconfigport: drop unused root pointers - teensy_hal: use MP_REGISTER_ROOT_POINTER() unix port: - variants: move setting of MICROPY_PY_USELECT to port config file - variants: enable remaining options on dev,coverage from ROM extra - variants/coverage: change config to use ROM level everything - variants/dev: allow all config options to be overridden - moduos: include errno.h - main: restore tty settings on nlr_jump_fail() - alloc: use MP_REGISTER_ROOT_POINTER() for mmap_region_head - mpconfigport: make MICROPY_EVENT_POLL_HOOK call usleep directly - mbedtls: add custom config for mbedtls - mpconfigport: switch ussl from axtls to mbedtls - Makefile: only include axtls in GIT_SUBMODULES list when enabled - Makefile: only checkout libffi submodule when used - mpconfigport: allow overriding MICROPY_EVENT_POLL_HOOK - enable MICROPY_GC_SPLIT_HEAP on coverage build - unix_mphal: allow overriding hal time functions - variants: remove variant suffix from executable filename - modjni: add missing const qualifier - remove .gitignore file - modusocket: support proto and flags arguments to getaddrinfo - include alloca.h for NetBSD - mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used - variants: remove freedos and fast variants - refactor mpconfigport.h and mpconfigvariant.h - refactor mpconfigvariant.mk - variants/coverage: add test for manifest freeze_mpy() - enable sys.executable - Makefile: don't use _MOD variable names - modffi: move header includes inside MICROPY_PY_FFI guard - variants: change mip package to mip-cmdline - coverage: add extra GC coverage test for ATB gap byte - moduos: implement 2-arg version of os.getenv() - Makefile: disable building the shared library of libffi - main: free pathbuf when there's an error opening a file webassembly port: - Makefile: remove obsolete disable of array-bounds warning - rename this port from 'javascript' to 'webassembly' - mpconfigport: use MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES - add support for VFS and enable VFS_POSIX - use Date's now() instead of getTime() - change "stack" argument to "heapsize" - support piping in a program on stdin - dispatch micropython-print via document not mp_js_stdout - README: update README to describe new stdout behaviour - Makefile: change compiler optimisation from O3 to Os - library: make use of CustomEvent detail property - library: extract and send data to print as UInt8Array windows port: - provide a definition for MP_ALWAYSINLINE - msvc: support compressed ROM text for error messages - Makefile: update test dependency on $(PROG) - make project file read-only for IDE - .gitignore: simplify by removing build artefacts - msvc: remove variant suffix from executable filename - msvc: make mpy-cross independent of micropython variant - msvc: fix qstr generation dependency - msvc: fix module freezing zephyr port: - update include paths to use the zephyr namespace - upgrade to Zephyr v3.1.0 - use MP_REGISTER_ROOT_POINTER() - machine_uart: use mp_obj_str_get_str to get device name - boards: add config for bbc_microbit_v2 - mpconfigport: enable MICROPY_ENABLE_FINALISER when VFS is used - rename machine I2C and SPI types consistently across ports
294baf5
2023-04-26 13:42
下载
v1.19.1
Bug fix for esp32 SoftI2C This is a bug fix release. The changes are: - extmod/machine_i2c: only use WRITE1 option if transfer supports it This fixes the machine.SoftI2C.readfrom_mem() method on esp32, so it writes the address to read from.
9b48634
2022-06-17 10:57
下载
v1.19
New mpy 6 file format with improved bytecode, addition of renesas-ra port In this release of MicroPython the .mpy file format has been significantly reworked and bumped to version 6. The new format now contains data and bytecode organised to be mostly static and ready to run in-place. To achieve this, qstr references from bytecode (and native machine code) now go through a lookup table, to convert from local qstr number in the module to global qstr number in the runtime that the module executes within. This means bytecode (and most native code) does not need rewriting when it is imported. Along with this change, the jump opcodes have been optimised to emit 1-byte jump offsets when possible, which gives a good reduction in bytecode size, saving RAM and reducing the size of .mpy files. The change to the bytecode means that code constants (like long strings, bytes objects and floats) are now shared and de-duplicated across the whole module, rather than each code object having a separate constant table. The parser can also now turn a tuple of constants into a constant object, so the tuple doesn't need to be built at runtime each time it is used. Furthermore, any constant object can now be used in "X = const(obj)" statements. With these bytecode changes, .mpy files see around a 10% reduction in size and frozen .mpy code sees about a 5% size reduction. Heap memory use after import is also down by around 5% (more savings are seen if the code uses lots of constants). Due to the qstr indirection performance of the VM is slightly reduced on some benchmarks by a few percent, but the benefits of smaller code and reduced RAM usage are deemed to outweigh this. See commit f2040bfc7ee033e48acef9f289790f3b4e6b74e5 for more details. In the runtime, support has been added for multiple *args and **args in a function call, following PEP 448. Built-in modules can now have (optional) mutable attributes, and this is used to implement sys.ps1/sys.ps2 which allow the user to customise the REPL prompt. This can be useful, for example, to configure a different REPL for different boards so they can be easily distinguished. The sys module has also had the MicroPython git version and build date appended to sys.version, sys.implementation._machine has been added, and sys.implementation.mpy renamed to sys.implementation._mpy. The sys module can now be used to fully identify the MicroPython version and target it is running on (and the platform module provides additional information when it's available). The MP_REGISTER_MODULE macro is now used to register all built-in C modules and the third argument to this macro has been removed. Any user-C-modules will need to be updated. Also support for MICROPY_PORT_BUILTIN_MODULES is removed because this is no longer needed, and should be replaced by usage of MP_REGISTER_MODULE (see commit 0a92469c10542d57ef0ea6b6cf2ed0cae9491dbe for example). The MP_REGISTER_MODULE macro is now used to register all built-in C modules and the third argument to this macro has been removed. Also support for MICROPY_PORT_BUILTIN_MODULES is removed because this is no longer needed. mpy-cross now supports the -march=armv6m option, which can be used with the rp2 port. The -mno-unicode has been removed. The littlefs2 library has been updated to v2.5.0 which includes some performance improvements and minor fixes. At the REPL, a tab will now insert an indent when it follows whitespace, and auto-indent is automatically disabled if a space or tab follows an auto-indent. This means that Python code can be pasted into the standard REPL without messing up the indentation. mpremote is now at version 0.3.0, with a progress indicator shown when copying large files, and recursive copy fixed on Windows. It also has the following commands added: --help, --version, version, resume, soft-reset, umount. The esp32 port has a new machine.ADCBlock class and updated ADC class. Fixes have been made to ADC2 channel mapping, low PWM frequencies, UART initialisation of unspecified parameters, and RMT channel on S2/S3/C3 variants. The Pin.PULL_HOLD constant has been replaced by a "hold" keyword argument to the Pic constructor, and it's now possible to configure pin drive strength. I2C write-then-read transfers have been optimised to be faster. WLAN.config() now supports setting/getting the txpower. New boards include LOLIN C3 MINI ESP32-C3, LilyGO LoRa32, and UM ESP32-S3 based boards. The mimxrt port has updated the nxp_driver to v2.10 and fixed USB CDC RX handling to not block. Pin drive constants have been renamed to DRIVE_x to match other ports, and the machine.I2S class has been added. New boards include Olimex RT1010 and MIMXRT1015_EVK. The nrf port now includes uasyncio in the default board manifest, and additional features have been enabled on nrf52840 and nrf9160 boards to match the features on stm32, rp2 and esp32. This includes enabling the json, re, zlib and framebuf modules. There is a new renesas-ra port which targets Renesas RA4M1, RA4W1, RA6M1 and RA6M2 MCUs, with board definitions for evaluation kits for these MCUs, along with RA4M1 clicker. This port currently supports Pin, ADC, SoftI2C, I2C, SoftSPI, SPI, UART, Timer and RTC classes in the machine module, along with the VFS and an internal flash filesystem. The rp2 port now has optional USB MSC support, and optional dupterm support. The machine.UART class has init and deinit methods added, and the ucryptolib module is now available. The lwIP network stack has been integrated, along with mbedtls for the ssl module, and these can be used with the new Wiznet driver to provide Ethernet support. The Wiznet W5100S-EVB-Pico board has been added which makes use of this driver. The day-of-week value reported by time.localtime() has been fixed, memory corruption when a thread is created on core1 has been fixed, and the UART now uses a mutex when reading/writing to prevent character duplication in code that uses both cores. The stm32 port has added support for G0, G4 and WL MCUs. The new boards for these MCUs are NUCLEO_G0B1RE, NUCLEO_G474RE and NUCLEO_WL55. The ARDUINO_PORTENTA_H7 board has also been added, with full WiFi and BLE support. The rfcore on WB55 MCUs has been improved by removing an extra layer of buffering, and the restriction on the use of address resolution has been removed, meaning that the rfcore WS firmware should be updated to v1.12.0 or later; see commit 26b1d31eda292d9cd5cfc68f14ce8055256fade8. The board-level configuration of mboot has been significantly improved to allow more control over system clocks, more hooks into the start up process, and a hook for state change. And the CRC32 of DFU files is now verified before writing them. The pyb.CAN class has been improved to support FD frames and buses with mixed classic/extended-ID nodes, allowing extended IDs to be specified on a per-message basis. CAN.recv also now returns a value indicating if the received message had an extended ID or not. And CAN.initfilterbanks has been removed, replaced with the num_filter_banks keyword argument to CAN.init. These are all breaking changes to the pyb.CAN class API and code will need to be updated accordingly; see commit 5cdf9645711cc12b45e602ef5795c33895116fc4 for details. The unix port now shows compiler information in the REPL banner to make it consistent with how bare-metal ports work, and the "-X realtime" command-line option has been added for macOS to get improved timing. All variants have switched to use the VFS subsystem, and use the VfsPosix class for mounting the host's filesystem. The os module has been consolidated with all other ports and the minimal and standard variants gain the unlink, chdir, getcwd and listdir functions. The windows port has also switched to the VFS subsystem and VfsPosix. It adds support for micropython.schedule and uasyncio on the dev variant. And BCryptGenRandom has been used to implement os.urandom. The zephyr port upgraded Zephyr to v3.0.0. The change in code size since the previous release for various ports is (absolute and percentage change in the text section): bare-arm: +792 +1.394% minimal x86: +2091 +1.286% unix x64: +10231 +1.995% unix nanbox: +9777 +2.162% stm32: +184 +0.047% PYBV10 cc3200: +904 +0.493% esp8266: -1240 -0.177% GENERIC esp32: +6464 +0.425% GENERIC nrf: +11288 +6.472% pca10040 rp2: +14432 +2.929% PICO samd: +1352 +0.970% ADAFRUIT_ITSYBITSY_M4_EXPRESS The changes that dominate these numbers are: - bare-arm, minimal, cc3200, samd: reworked bytecode and mpy format, optimisation of jump opcodes to use 1-byte offsets, de-duplication of constants at the module level, and PEP 448 support - unix: switching to use VFS, and new mpy format and related changes - esp8266: removal of esp.info and machine.WDT.deinit - esp32: addition of machine.ADCBlock, and new mpy format changes - nrf: enabling uasyncio, enabling MICROPY_PY_IO - rp2: enabling ucryptolib with mbedtls Note that the stm32 port's size remained roughly unchanged. This is because it has a decent amount of frozen Python code and the reduction in frozen code size due to the reworked bytecode has offset the increase in runtime/VM size due to this change. Ports like bare-arm, minimal, cc3200 and samd do not have any frozen code so only see the increase in runtime/VM size. Production-level projects that have a significant amount of frozen code have seen around a 4% overall reduction in their firmware size. Thanks to everyone who contributed to this release: Algy Tynan, Andrew Leech, Andrew Scheller, Artyom Skrobov, Asensio Lorenzo Sempere, Bradley Wogsland, Cem Eliguzel, Chris Wilson, Christian Decker, Christian Zietz, Christophe Priouzeau, Clayton Mills, Damien George, Daniel Jour, Daniël van de Giessen, Dave Hylands, David Lechner, Emil Kondayan, Herwin Grobben, iabdalkader, IhorNehrutsa, Jan, Jared Hancock, jason, Jeff Epler, Jeremy Herbert, Jim Mussared, Jon Bjarni Bjarnason, Jonathan Hogg, Jos Verlinde, Kattni Rembor, Lars Kellogg-Stedman, Luiz Brandao, marcidy, Martin Fischer, Maureen Helm, Meriç SARIIŞIK, Michael Himing, Michael O'Cleirigh, MikeTeachman, Peter D. Gray, Peter Hinch, Peter Züger, Phil Howard, Philipp Ebensberger, Rob Knegjens, robert-hh, Sean Coates, Seon Rozenblum, Stephane Smith, stijn, Takeo Takahashi, ubi de feo, Waterlens, wemos, YoungJoon Chun, Yukai Li. What follows is a detailed list of changes, generated from the git commit history, and organised into sections. Main components =============== all: - fix MICROPY_OBJ_REPR_D compilation with msvc - update Python formatting to latest Black version 22.1.0 - use mp_obj_malloc everywhere it's applicable - reformat remaining C code that doesn't have a space after a comma - remove third argument to MP_REGISTER_MODULE - rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K py core: - objstr: support '{:08}'.format("Jan") like Python 3.10 - modmath: add math.tau, math.nan and math.inf constants - qstr: separate hash and len from string data - qstr: use `const` consistently to avoid a cast - gc: update debug code to compile with changes to qstr pool types - rework bytecode and .mpy file format to be mostly static data - bc.h: fix C++ compilation of public API - objmodule: support delegating failed attr lookups - modsys: add optional attribute delegation - modsys: add optional sys.tracebacklimit attribute - modsys: add optional mutable attributes sys.ps1/ps2 and use them - parse: simplify handling of const int parse nodes - parse: put const bytes objects in parse tree as const object - parse: handle check for target small-int size in parser - showbc: remove global variables and make DECODE_PTR work correctly - smallint: introduce MP_SMALL_INT_BITS macro - objgenerator: fix unused variables when native gen extracts prelude - change jump opcodes to emit 1-byte jump offset when possible - emitbc: add check for bytecode jump offset overflow - change jump-if-x-or-pop opcodes to have unsigned offset argument - builtinimport: alias sys to usys if import weak links aren't enabled - bc.h: fix C++20 compilation with "volatile" - compile: only show raw code that is bytecode - asmxtensa: fix use of l32i/s32i when offset won't fit in encoding - emitnative: don't store prelude at end of machine code if not needed - vm: prevent array bound warning when using -MP_OBJ_ITER_BUF_NSLOTS - runtime: allow multiple **args in a function call - runtime: allow multiple *args in a function call - runtime: do not overallocate when len is known - runtime: drop new_alloc < 4 check - runtime: use size_t/ssize_t instead of uint/int - emitbc: assert that a small int fits its encoding when emitting one - fix compiling and decoding of *args at large arg positions - runtime: remove unnecessary check for kw_value == MP_OBJ_NULL - makeqstrdefs: cleanup and extend source file classification - emitinlinethumb: use 16 bit encodings for PUSH LR and POP PC - scheduler: add support for scheduling static C-based callbacks - emitnative: revert "don't store prelude at end of machine code if..." - persistentcode: define enum values for obj types instead of letters - parse: factor obj extract code to mp_parse_node_extract_const_object - parse: print const object value in mp_parse_node_print - parse: add MICROPY_COMP_CONST_TUPLE option to build const tuples - persistentcode: support loading and saving tuples in .mpy files - objtype: convert result of user __contains__ method to bool - modsys: append MicroPython git version and build date to sys.version - modsys: rename sys.implementation.mpy to sys.implementation._mpy - modsys: introduce sys.implementation._machine constant - emitcommon: don't implicitly close class vars that are assigned to - obj: introduce mp_obj_malloc macro to allocate, and set object type - objfloat: explain why mp_obj_malloc isn't used - malloc: introduce m_tracked_calloc, m_tracked_free functions - objmodule: move stray #include to top of file - persistentcode: remove obsolete comment about qstr window size - persistentcode: remove unicode feature flag from .mpy file - asmx64: support full range of regs in asm_x64_lea_disp_to_r64 - bc: provide separate code-state setup funcs for bytecode and native - emitnative: put a pointer to the native prelude in child_table array - compile: allow new qstrs to be allocated at all compiler passes - compile: de-duplicate constant objects in module's constant table - parse: allow all constant objects to be used in "X = const(o)" - makemoduledefs.py: allow multiple ways to register a module - make builtin modules use MP_REGISTER_MODULE - remove support for MICROPY_PORT_BUILTIN_MODULES - asmthumb: fix PC relative load by sign extending the constant - emitnative: simplify generation of code that loads prelude pointer - emitnative: provide dedicated local for exception unwind handler ptr - asmthumb: fix offset variable name in ldr, ldrh and strh functions - asmthumb: add asm_thumb_ldrh_reg_reg_i12_optimised() helper func - asmarm: add asm_arm_ldrh_reg_reg_offset() helper func - asm: add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset - emitnative: access qstr values using indirection table qstr_table - asmthumb: make ARMv7-M instruction use dynamically selectable - persistentcode: select ARMV6M as maximum when __thumb2__ not defined - dynruntime.mk: add basic support for armv6m architecture - asmthumb: provide implementations of clz/ctz for msvc - builtin: clean up and simplify import_stat and builtin_open config - emitinlinethumb: make ARMv7-M instruction use dynamically selectable - emitinlinethumb: make float instruction use dynamically selectable - change makemoduledefs process so it uses output of qstr extraction - persistentcode: remove remaining native qstr linking support - bc: remove unused mp_opcode_format function - compile: give the compiler a hint about num nodes being non-zero - makemoduledefs.py: remove shebang line and adjust style of comment - parse: work around xtensa esp-2020r3 compiler bug - dynruntime: add macros to create a new dict and store to dicts - dynruntime: add macros to access more types and mp_const_empty_bytes - makemoduledefs.py: emit useful error for legacy MP_REGISTER_MODULE extmod: - network_ninaw10: implement MP_STREAM_POLL in ioctl - modusocket: make setsockopt return if NIC is not connected - modusocket: add makefile() method and common socket options - modusocket: create new sockets in blocking mode - modusocket: support additional args to getaddrinfo - machine_i2c: increase default SoftI2C timeout to 50ms - modubinascii: add newline keyword to b2a_base64 function - moduplatform: move platform PP definitions into a header - moduzlib: fix parsing zlib header dict size - moduos: create general uos module to be used by all ports - modure: set subject begin_line so ^ doesn't match interior - uasyncio: allow task state to be a callable - uasyncio: fix gather cancelling and handling of exceptions - extmod.cmake: add micropy_lib_mbedtls component - modusocket: implement optional socket.listen backlog argument - modusocket: provide config macro for socket.listen backlog deflt - uasyncio: make Python Task match C version with use of asserts - uasyncio: fix bug with task ending just after gather is cancel'd - uasyncio: rename and merge TaskQueue push/pop methods - move font_petme128_8x8.h from ports/stm32 to extmod - make extmod modules use MP_REGISTER_MODULE - make port-included extmod modules use MP_REGISTER_MODULES - revert accidental usocket->socket rename - webrepl: fix setting password in foreground mode and factor code - modusocket: fix polling of a new socket - modusocket: bind unconnected socket to default NIC in setsockopt - modusocket: fix errcode returned from socket read/write - modusocket: add socket type print function - modusocket: add support for socket events callback - modusocket: fix socket_make_new argument parsing - modusocket: add timeout and callback to socket object - modusocket: add sendall function - network_ninaw10: add support for socket events callback - machine_i2c: add optional support for write-then-read transfers - uasyncio: fix edge case for cancellation of wait_for - nimble: add support for reading whole HCI UART packets - network_wiznet5k: add Wiznet Ethernet network interface - modussl_mbedtls: poll EVENT_POLL_HOOK in ssl handshake loop - modurandom: fix missing void in empty argument list - extmod.cmake: require components to be explicitly enabled - modusocket: add socket state to track new/listening/conn/closed - modusocket: fix polling of closed sockets - extmod.cmake: fix hard-coded mbedtls config file path shared: - readline: make tab insert an indent when it follows whitespace - readline: disable auto-indent if space/tab follows added indent drivers: - ninaw10: add function to check socket state/data availability - ninaw10: fix timeout handling to match modusocket - ninaw10: return standard error numbers - ninaw10: add NIC-level ioctl function - sdcard: allow setting the final SPI baudrate - codec: add driver for the WM8960 codec - ninaw10: fix isconnected to return False when inactive - dht/dht.py: change default import module as machine - ninaw10: update driver to support firmware 1.5.0 - bus: rename MP_SPI_ADDR_IS_32B to MICROPY_HW_SPI_ADDR_IS_32BIT - lsm6dsox: add support for SPI mode - sdcard: fix CSD version 1.0 device size calculation - sdcard: make ioctl(4), ioctl(5) return num blocks, block size - sdcard: fix address calculation on v2 SDSC cards mpy-cross: - add armv6m architecture option lib: - re1.5: distinguish between subject start-of-line and start-of-srch - stm32lib: update library for G0 v1.5.1 - fsp: add renesas fsp git repository as submodule - littlefs: update littlefs2 to v2.5.0 - littlefs: guard lfs2_file_rawopen with LFS2_NO_MALLOC - littlefs: remove assignment of variables to themselves - nxp_driver: update nxp_driver to v2.10 - wiznet5k: add submodule for Wiznet Ethernet drivers Support components ================== docs: - library: specify additional ADC methods and new ADCBlock class - esp32: document expanded ADC API in quickref - differences: update differences now that math.tau/inf/nan exist - differences: update python_36 now that b2a_base64 accepts newline - remove reference to obsolete neopixel_write function - develop/porting.rst: fix build and import problems in the example - reference/isr_rules.rst: fix inconsistent variable name in example - esp32/quickref: update ADC documentation - reference/isr_rules.rst: describe uasyncio-IRQ interface - library/collections.rst: use class for deque and OrderedDict - use the correct * keyword-only notation - library/socket.rst: document socket as a class - library/pyb.Timer.rst: add pyb.Timer class constants - library/pyb.rst: add pyb.hid_mouse and pyb.hid_keyboard constants - library/pyb.DAC.rst: add DAC class constants - library/machine.SPI.rst: add class constant SoftSPI.MSB and .LSB - library/machine.WDT.rst: use correct case for WDT.feed - library/esp.rst: document the osdebug function - library/pyb.SPI.rst: document default for prescaler argument - library/machine.Pin.rst: document defaults for Pin.init - library/uasyncio.rst: fix description of ThreadSafeFlag.wait - library/machine.UART.rst: add details for `invert` parameter - differences/python_35: mark PEP 486 as not applicable - library/esp32.rst: mark esp32.Partition as not taking kw args - esp32/quickref: document GPIO drive strength - library/machine.Pin: update to use preferred DRIVE_x constants - esp32/quickref: refine deep-sleep power-saving notes - library/machine.I2S: clarify what rate refers to - library/pyb.CAN: update CAN docs to match revised API - add quickref and docs for mimxrt, including network.LAN docs - reference/mpremote: add details about mount usage over soft reboot - differences: update Python 3.5 diff, with optional listen backlog - reference: update constrained docs now that tuples can be const - library/network.WLAN: add "txpower" to list of known WLAN configs - renesas-ra: add renesas-ra docs files - update files for renesas-ra port - renesas-ra: remove unused image files - reference/mpyfiles: remove docs about mpy flags and qstr win size - mimxrt: add i.MX RT1015 to general.rst, and a few clarifications - mimxrt: move the pinout tables to a separate document - reference/manifest: add link to details about opt-level for freeze - reference/mpyfiles: update .mpy description to match latest format - update Raspberry Pi URLs from .org to .com examples: - embedding: fix build with updated sys and os modules - natmod/features3: add example to test more natmod features tests: - run-multitests.py: ignore lld_pdu_get_tx_flush_nb msgs from IDF - run-multitests.py: set HOST_IP so tests work between PC and board - multi_net: add testing key/cert to SSL server/client test - multi_net: close accepted sockets when tests are done - multi_net/udp_data.py: allow reusing port before bind - multi_net/udp_data.py: make UDP test more reliable - run-perfbench.py: allow a test to SKIP, and to have a .exp file - perf_bench: add perf tests for qstr interning and importing .mpy - perf_bench: add perf test for yield-from execution - run-perfbench.py: use SKIP consistently, and increase print width - extmod/vfs_fat_finaliser.py: make finalisation more robust - run-tests.py: skip repl tests when running windows underneath - perf_bench: skip bm_chaos test if random.randrange is unavailable - unix: add coverage test for freezing various objects - basics: add test for creating small-ints in nan-box builds - run-tests.py: include test files ending in _set as set tests - micropython: switch from set.pop to raise-0 to test exc strings - extmod/vfs_posix.py: only test statvfs if it exists - cmdline/cmd_showbc: fix spelling of sequence - extmod: add test for machine.I2S data rate - extmod: update I2S rate test to work on mimxrt - basics/fun_callstardblstar: add coverage test - basics/fun_callstardblstar: add test for large arg allocation - pyb: update CAN tests to match revised CAN API - inlineasm: add test for PUSH LR and POP PC - perf_bench: update import tests for changes to .mpy consts - micropython: add tests that const tuples don't use the heap - extmod/uasyncio_gather: make double-raise gather test reliable - run-tests.py: add timeout for running PC-based MicroPython test - cmdline: add test for REPL auto-indent - renesas-ra: add tests for renesas-ra port - run-tests.py: update for renesas-ra port - renesas-ra: remove unsupported feature test of Pin - extmod: increase timing on uasyncio tests to make more reliable - fix tests to use sys.implementation._mpy - perf_bench: update .mpy file header to remove old unicode flag - run-perfbench.py: return error code if any test fails on target - thread: use less resources for stress_aes if settrace enabled - run-tests.py: exclude settrace tests when using native emitter - multi_net: skip SSL test if relevant modules aren't available - micropython: fully unlink nested list in extreme exc test - extmod: use bytearray instead of bytes for uctypes test - micropython: add more test cases for native generators - run-tests.py: allow running tests via mpy-cross on remote targets - run-perfbench.py: allow running tests via mpy and native emitter - basics: unlock heap if skipping nanbox small-int test - run-tests.py: handle case where mpy-cross fails to compile script - run-tests.py: enable `-X realtime` option for macOS tests - extmod: change expected errno code from 36 to 30 in VfsLfs2 test - multi_net: fix TCP accept test when using system error numbers - run-multitests.py: use LAN for IP address if WLAN doesn't exist - micropython: make import_mpy_native_gc run on ARMv6-M and above - micropython: make import_mpy_native test run on all architectures - run-tests.py: add rp2 test target - move native while test from pybnative to micropython - net_inet: remove broken api.telegram.org from tests - run-multitests.py: read IP address from boot nic if available - basics: add .exp file for sys.tracebacklimit test - stress: adjust bytecode_limit test so it can SKIP if no memory tools: - mpremote: use machine instead of umachine in commands - ci: test math constants with MICROPY_OBJ_REPR_D - uf2conv.py: update to latest version - autobuild: provide .uf2 images for esp32 builds when available - mpremote: fix "fs cp -r" on Windows - mpremote: make ConsolePosix work without .raw attribute - mpremote: during soft reboot wait long enough for 115200 data - mpremote: accept both --help and help to show usage - mpremote: correctly manage mounted flag during soft-reset - mpremote: fix special handling of ctrl-D when host FS is mounted - verifygitlog.py: ignore line length in body if it's a URL - ci.sh: update IDF v4.4 build to use v4.4 tag - ci.sh: run urandom test scripts as part of native module tests - mpremote: add "resume" and "soft-reset" commands - mpremote: add "umount" command - upip.py: remove unused op_basename() function - mpy-tool.py: fix frozen comment generation to escape chars - ci.sh: run performance benchmark as part of all unix test runs - mpremote: bump version to 0.2.0 - gen-cpydiff: skip Black fmt comments - mpremote: support any prompt string when detecting soft reset - mpremote: allow running mpremote with `python -m` - mpremote: improve reliability of mount after soft reboot - mpremote: show progress indicator when copying large files - mpremote: add option to mount cmd to allow "unsafe" symlinks - mpy-tool.py: support loading tuples from .mpy files - mpy-tool.py: support freezing tuples and other consts - mpy-tool.py: optimise freezing of ints that can fit a small int - mpy-tool.py: optimise freezing of empty str and bytes objects - mpy-tool.py: make global qstr list a dedicated class - mpy-tool.py: optimise freezing of str when str data is a qstr - mpy-tool.py: intern more strings when freezing - codeformat.py: remove ports/unix/*.py from exclusion list - codeformat.py: include more ports .c/.h files in formatting - ci.sh: don't run uasyncio_gather test on macOS - ci.sh: update for ports/renesas-ra - uncrustify: make sure a space exists after a comma - autobuild: update for ports/renesas-ra - mpy_ld.py: remove obsolete QSTR_WINDOW_SIZE constant - ci.sh: run full test suite on stackless and settrace builds - ci.sh: for esp8266 CI install esptool 3.3.1 - mpy-tool.py: remove obsolete unicode flag in .mpy header - ci.sh: add build of W5100S_EVB_PICO board to rp2 CI - mpy-tool.py: rework .mpy merging feature - ci.sh: add test for mpy-tool's merging feature - mpy-tool.py: improve generated frozen identifiers - mpremote: add command to print the version - mpremote: bump version to 0.3.0 - ci.sh: build NUCLEO_H743ZI with -O2 optimisation level - mpy_ld.py: support R_XTENSA_PDIFF32 relocation - ci.sh: build native .mpy examples for armv7emsp, xtensawin in CI - mpy_ld.py: support GOT entries that reference inside mp_fun_table CI: - workflows: show context for qemu-arm test failures - workflows: add new workflow to test .mpy file format and tools - workflows: add new workflow to test embedding example - workflows: add workflow for renesas-ra port The ports ========= all ports: - consolidate inclusion of umachine module in built-ins - recompile bytecode tests now that .mpy format changed - allow boards to define additional network interfaces - recompile bytecode tests now that .mpy format changed - reformat more C and Python source code - rename thread_t to mp_thread_t - use default VFS config for import_stat and builtin_open bare-arm port: no changes specific to this component/port cc3200 port: - make port-specific modules use MP_REGISTER_MODULE esp8266 port: - moduos: convert module to use extmod version - mpconfigport.h: remove config values that are the defaults - modesp: remove esp.info() function - make port-specific modules use MP_REGISTER_MODULE - machine_wdt: remove deinit method for watchdog - etshal.h: remove unneeded function declaration esp32 port: - machine_adcblock: add new machine.ADCBlock class and update ADC - pin MicroPython to core 1 again - esp32_rmt: call rmt_driver_install directly if running on core 1 - main: allocate at most 1/2 of available IDF heap for MP heap - README.md: fix URL for esp-idf installation - modnetwork: fix test for WIFI_AUTH_MAX for IDF v4.3.0 - main: use heap_caps_get_info on IDF <4.1 to compute total heap - boards: provide custom deploy_c3.md for ESP32-C3 boards - partitions: increase size of app-part from 0x180000 to 0x1F0000 - machine_pwm: fix PWM not allowing frequencies < 611 Hz - machine_pwm: clean up macro names and their use - esp32_rmt: select correct last RMT channel on S2, S3, C3 variants - main: automatically size SPIRAM heap when allocated using malloc - adc: fix wrong mapping between ADC2 channel and GPIO number - remove unneeded modesp.h - create .uf2 binaries for S2 and S3 chips - partitions-16MiB.csv: increase 14MiB filesystem to maximum size - machine_adcblock: fix ADC bit width for ESP32-S3 - machine_adc: fix configuration of default ADC atten value - boards: add three UM ESP32-S3 based boards - mpconfigport.h: use the "extra" feature level - mpconfigport.h: enable remaining features to get to "extra" level - esp32_partition: add support for specifying block_size - modules: create ffat partition object with block_size=512 - README.md: update list of supported IDF versions - boards: add specific deploy instructions for S3 variant - uart: correctly init low-level UART driver for REPL - machine_uart: allow limited configuration of REPL UART - sleep one tick in MICROPY_EVENT_POLL_HOOK - machine_pwm: always set the duty cycle when setting the frequency - machine_uart: make UART.init preserve unspecified parameters - machine_pin: add support for pin drive strength - moduos: convert module to use extmod version - machine_pin: add new hold keyword argument and remove PULL_HOLD - modesp32: add new gpio_deep_sleep_hold function - boards/UM_TINYPICO: remove use of PULL_HOLD - boards: add LOLIN C3 MINI ESP32-C3 based board - machine_hw_spi: use automatic DMA channel selection for SPI on C3 - boards: add support for LilyGO LoRa32 boards - machine_pin: expose pin 20 for ESP32 - allow overriding cmake frozen manifest from the command line - boards: add test manifest to test freezing during build - add MICROPY_HW_ENABLE_UART_REPL and enable on generic S2/S3 - boards: compile GENERIC_SPIRAM and UM_TINYPICO with -Os - machine_pin: don't expose pins 33-37 when octal SPIRAM is enabled - modesp32: properly define RTC_VALID_EXT_PINS on S2/S3 variants - network_wlan: support setting/getting txpower in WLAN.config() - modnetwork: fix build when MICROPY_PY_NETWORK_WLAN is disabled - make port-specific modules use MP_REGISTER_MODULE - boards/UM_FEATHERS3: use correct sdkconfig.board - boards/LILYGO_TTGO_LORA32: remove ID from TTGO Lora32 board json - machine_pin: fix ESP32C3 IDFv4.4.1 build - track allocated iRAM and free it on soft reset - machine_i2c: implement write-then-read I2C transfers - machine_pin: only expose IO20 on esp32 for IDF 4.3.2 and above javascript port: - make port-specific modules use MP_REGISTER_MODULE mimxrt port: - support gaps in the SPI an I2C device numbers - allow for board-specific flash driver files - compensate for a bug in the fsl_lpspi.c file - remove two files from the Seeed Arch Mix directory - replace Pin-config constants by a function call - allow to select cs0 or cs1 for SPI - add USB ID elements - add support for the Olimex RT1010 board - simplify Makefile in selection of flash type - machine_pin: change pin drive constants to DRIVE_x naming - machine_spi: add omitted GPIO config - boards: add board files for MIMXRT1015 and MIMXRT1015_EVK - eth: fix an Ethernet transmit error - boards/TEENSY41: use the same SPI1 pins for Teensy 4.0 and 4.1 - boards: support using an optional board-specific manifest.py - eth: avoid a race condition for Ethernet - hal/pwm_backport: make PWM symmetric, and round division calcs - moduos: convert module to use extmod version - mbedtls: add NULL pointer check in m_free_mbedtls - machine_i2s: add I2S protocol support - boards: add board.json file for OLIMEX RT1010Py - modules: append /flash/lib to the default sys.path - machine_rtc: start RTC at boot and set datetime if not set - machine_spi: improve handling of busy SPI peripheral - mphalport: fix USB CDC RX handling to not block when unprocessed - mbedtls: use core-provided tracked alloc instead of custom funcs - make port-specific modules use MP_REGISTER_MODULE - boards/OLIMEX_RT1010: document the initial deploy procedure - boards: extend the deploy_teensy.md instructions - mphalport: fix strict aliasing error with unique id - update port to work with new nxp_driver v2.10 - machine_uart: fix an inconsistency for UART.init() arg handling minimal port: no changes specific to this component/port nrf port: - drivers/usb: fix background events/scheduling while at USB REPL - drivers/usb: fix MP_STREAM_POLL_RD support on USB CDC - modules: include uasyncio in default board manifest - make port-specific modules use MP_REGISTER_MODULE - mpconfigport: set MICROPY_CONFIG_ROM_LEVEL defines for each MCU - mpconfigport: enable extra features as defined by ROM levels - mpconfigport: fix MICROPY_VFS IO build support - modules/uos/microbitfs: fix MICROPY_MBFS build to use mp_obj_malloc pic16bit port: - make port-specific modules use MP_REGISTER_MODULE - use 1 byte for qstr hash len and include header to fix build powerpc port: no changes specific to this component/port qemu-arm port: - add tests for freezing viper and asm_thumb code - moduos: convert module to use extmod version - test-frzmpy: add test for freezing constant tuples - mpconfigport: define MICROPY_PY_SYS_PLATFORM renesas-ra port: - add new port to Renesas RA - boards: change device name information to show properly - rename pyb_uart_ to machine_uart_ - rename pyb_rtc_ to machine_rtc_ - make port-specific modules use MP_REGISTER_MODULE - modmachine: add missing MP_REGISTER_MODULE for umachine - machine_pin: remove code for unsupported Pin features rp2 port: - machine_i2c: provide more specific error codes from I2C transfer - mpconfigport.h: use internal error numbers - mphalport: add optional dupterm support - machine_uart: add machine.UART init/deinit methods - machine_i2c: use soft I2C only for len=0, and increase timeout - modutime: fix time.localtime day-of-week value - machine_uart: fix UART RTS behaviour so RTS is deasserted - Makefile: add FROZEN_MANIFEST Makefile option, to override default - mpthreadport: fix memory corruption when thread is created in core1 - add USB MSC support - allow Overriding cmake frozen manifest from the command line - enable ucryptolib, using mbedtls for backend functions - mphalport: fix USB CDC RX handling to not block when unprocessed - Makefile: add mbedtls to GIT_SUBMODULES list and use it in CI func - machine_uart: use read/write mutex to prevent char duplication - mpconfigport: enable execfile, NotImplemented and REPL EMACS keys - make port-specific modules use MP_REGISTER_MODULE - mpconfigport.h: enable static scheduler nodes - mpconfigport.h: allow boards to override internal errno config - boards/ARDUINO_NANO_RP2040_CONNECT: disable internal errno - boards/ARDUINO_NANO_RP2040_CONNECT: enable webrepl - mbedtls: add support for ssl module with MICROPY_SSL_MBEDTLS - machine_pin: add mp_hal_pin_interrupt C interface - Makefile: use cmake for "make submodules" task when needed - integrate lwIP network stack - add support for using Wiznet hardware as an Ethernet NIC - boards/W5100S_EVB_PICO: add Wiznet W5100S-EVB-Pico board - Makefile: build in debug mode with "make DEBUG=1" - boards/ARDUINO_NANO_RP2040_CONNECT: update USB PID - mpnetworkport: fix lwip alarm callback timing to use microseconds - CMakeLists: simplify qstr sources when enabling extmod components samd port: - moduos: convert module to use extmod version - make port-specific modules use MP_REGISTER_MODULE stm32 port: - mbedtls: enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE - mboot: remove custom HAL_RCC_GetHCLKFreq and use HAL provided one - pin: change remaining uses of "af" to "alt" - dac: deinit all DACs on soft reset - fdcan: fix FIFO1 usage and handling of error interrupts - fdcan: fix naming with regards to G4 series - usbd_conf: set lpm_enable and battery_charging_enable on all MCUs - powerctrlboot: set HAL uwTickPrio variable when needed - powerctrl: write bootloader-state as 64-bit word to work on H7 - mboot: use PLL3 for USB clock source on H7 MCUs - mboot: include hal_rcc_ex.c in source file list - mboot: support H7 MCUs in fwupdate.py - mboot: compute and check CRC32 of dfu file in fwupdate.py - add support for G4 MCUs, and add NUCLEO_G474RE board defn - mboot: allow HSI to be used as the main clock source - mboot: add MBOOT_BOARD_ENTRY_INIT for a board to add entry code - mboot: add support for F469/479 MCUs in fwupdate.py - rtc: use LL_RTC functions to simplify some MCU-specific code - Makefile: make stm32lib configurable - add initial support for STM32WL MCUs - boards/NUCLEO_WL55: add new board definition - system_stm32: make SystemClock_Config() a weak symbol - adc: fix L4 ADC channel numbers - adc: remove obsolete FIRST/LAST GPIO channel macros - boards/NUCLEO_L432KC: disable MICROPY_OPT_COMPUTED_GOTO - boards/NUCLEO_WB55: add Arduino pin alias definitions - mboot: allow a board to fully configure system clocks - mboot: allow a board more control over entry initialisation - moduos: convert module to use extmod version - boards: convert F4xx and F7xx to new flash FS config - mbedtls: add NULL pointer check in m_free_mbedtls - sdcard: use mp_hal_pin_input instead of HAL function - sdcard: add sdcard_select_sd/mmc functions - main: support SD cards without a partition table - dma: add option to disable auto-DMA-turn-off - mboot: add pragma for GCC to ignore array bounds warning - mboot: always check the magic number to enter filesystem loading - mboot: add support for 64-bit mboot address space for reads - mboot: add support for reading from SD card - boards/PYBD_SF2: turn on SD card in mboot init if SD enabled - mboot/fwupdate.py: simplify calculation of CRC32 - mboot: verify signature of fsload packed DFU files before writing - mboot: verify CRC32 of fsload DFU files before writing - support building for STM32F745 - machine_i2s: set FullDuplexMode to disabled on F4 - machine_i2s: allow I2S.deinit to be called multiple times - machine_i2s: fix 16-bit stereo i2s_frame_map - sdio: use runtime calculation for clock divider of sdio on H7 - modmachine: add deepsleep support to reset_cause() for WB55 - pyb_can: enable CAN FD frame support and BRS - pyb_can: add support for CAN FD extended frame ID - pyb_can: add support for bus with mixed Classic/FD nodes - pyb_can: return the filter ID and type of received messages - pyb_can: define the maximum bit timing parameters - pyb_can: replace CAN.initfilterbanks with CAN.init keyword arg - Makefile: allow overriding COPT in Makefile - mpconfigport.h: let MICROPY_PY_IO_FILEIO take its default value - machine_bitstream: include all clobbered regs in Cortex-M0 impl - mboot: consolidate all UI and add general state change hooks - mboot: add macros for use in led_state_all() - sdram: add function to enable SDRAM power-down mode - Makefile: add H747 to Makefile's MCU flags - system_stm32: add H7 switched-mode-power-supply support - system_stm32: set voltage scaling level 0 for H7 Rev-V devices - system_stm32: allow boards to configure PLL VCI, VCO and FRACN - system_stm32: improve H7 PLL and OSC configuration - boards/PYBD_SFx: allow FROZEN_MANIFEST to be overridden - mpbthciport: switch scheduling callback to use node scheduler - boards/SPARKFUN_MICROMOD_STM32: fix incorrect UART and I2C config - mphalport: fix I/O glitches when switching GPIO mode to alt-func - boards/ADAFRUIT_F405_EXPRESS: use external SPI flash for storage - boards/LEGO_HUB_NO6: exclude BTstack code from formatting - qspi: support common flash sizes in MPU configuration - qspi: wait for a free FIFO location before writing to DR - qspi: workaround for SR set immediately after setting AR - ulpi: add USB3320 ULPI low-power functions - ulpi: include missing py/mperrno.h header - boards/ARDUINO_PORTENTA_H7: add support for Arduino Portenta H7 - storage: add support for internal storage on Cortex-M0 MCUs - add support for G0 MCUs - boards/NUCLEO_G0B1RE: add NUCLEO_G0B1RE board definition - mbedtls: use core-provided tracked alloc instead of custom funcs - make port-specific modules use MP_REGISTER_MODULE - rfcore: revert "intercept addr-resolution HCI cmd to work arou..." - mboot: move remaining led_state_all call into mboot_state_change - mboot: add update_app_elements to return mboot fsload elements - mboot: make 0x70ad0000 values named constants with macros - mboot: pass initial_r0 to early-init and get-reset-mode funcs - boards/LEGO_HUB_NO6: make all SPI flash transfers use 32-bit addr - boards/LEGO_HUB_NO6: add support for mboot to access SPI flash - boards/LEGO_HUB_NO6: use multi-colour LED for mboot status - boards/LEGO_HUB_NO6: implement robust filesystem-load updates - boards/LEGO_HUB_NO6: add helper scripts to update app firmware - rfcore: remove extra layer of buffering on BLE IPCC - flash: remove FLASH_OPTR_DBANK condition in L4, H7 get_bank func - machine_i2c: enable timingr constructor keyword on H7 MCUs - powerctrl: disable sys tick interrupt in stop mode on some STM32s - usbd_conf: remove disable of SYSCFG clock - mboot: add board-configurable SysTick hook - mboot: remove MP_WEAK on led funcs and make some of them static - boards/LEGO_HUB_NO6: add comment to readme about powering off - mboot: only include UI code if at least one board LED is defined teensy port: - make port-specific modules use MP_REGISTER_MODULE - mpconfigport.h: remove obsolete macros unix port: - Makefile: remove explicit addition of -std=c++ flag - show compiler info in REPL banner - .gitignore: remove *.py from ignore list - moduos: convert module to use extmod version - mpconfigport.h: collect together config options from extra level - variants: use rom feature config for standard, dev, coverage - variants: enable a few optimisations and features on dev, coverage - make port-specific modules use MP_REGISTER_MODULE - implement `-X realtime` command-line option on macOS - factor out code that generates random bytes to a new func - variants: enable seeding random module on import in dev, coverage windows port: - README.md: fix broken mingw link - add micropython.schedule support - mingw: include extmod/shared/lib sources properly - uselect: enable micropython select in dev variant - uasyncio: add support for uasyncio to windows dev variant - appveyor: fix printing of test failures - Makefile: specify CXXFLAGS in the Makefile - unify project file headers - switch to VFS subsystem and use VfsPosix - consolidate all sleep-related functions into windows_mphal.c - avoid busy loop when using scheduler - use BCryptGenRandom to implement os.urandom - factor out code that generates random bytes to a new func zephyr port: - update include path to disk_access.h - upgrade to Zephyr v3.0.0 - prj.conf: enable CONFIG_BUILD_OUTPUT_HEX to generate .hex output - moduos: convert module to use extmod version - make port-specific modules use MP_REGISTER_MODULE - modusocket: fix function object wrapper for listen method
d7919ea
2022-06-16 13:11
下载
v1.18
Boosted performance, board.json metadata, more mimxrt, rp2, samd features 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: - bare-arm, minimal: use of new MICROPY_CONFIG_ROM_LEVEL_MINIMUM option and subsequent disabling of remaining optional features - unix, cc3200, nrf: general code size reductions of the core - stm32: performance improvements, addition of platform module - esp8266: enabling f-strings - esp32: use of -O2 instead of -Os - rp2: machine.I2S and other new hardware features - samd: filesystem support and other new hardware features 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: - remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE - update Python formatting to latest Black version 21.12b0 - remove support for FROZEN_DIR and FROZEN_MPY_DIR py core: - parse: simplify parse nodes representing a list - emitnative: ensure load_subscr does not clobber existing REG_RET - mpconfig.h: define initial templates for "feature levels" - vm: add a fast path for LOAD_ATTR on instance types - map: add an optional cache of (map+index) to speed up map lookups - builtinimport: forward all debug printing to MICROPY_DEBUG_PRINTER - add wrapper macros so hot VM functions can go in fast code location - runtime: fix crash when exc __new__ doesn't return an exc instance - mpconfig.h: define the "extra" feature level - mpconfig.h: revert MICROPY_REPL_INFO to disabled at all levels - gc: add hook to run code during time consuming GC operations - showbc: print unary-op string when dumping bytecode - modsys: replace non-ASCII quote char with ASCII char - runtime: allow types to use both .attr and .locals_dict - lexer: support nested [] and {} characters within f-string params - objfun.h: remove obsolete comments about entries in extra_args - builtinimport: refactor module importing - showbc: fix printing of raw bytecode header on nanbox builds - modio: remove io.resource_stream function - only search frozen modules when '.frozen' is found in sys.path - mkrules.cmake: set frozen preprocessor defs early - runtime: allow initialising sys.path/argv with defaults - mpstate.h: only include sys.path/argv objects in state when enabled - mpz: fix bugs with bitwise of -0 by ensuring all 0's are positive - qstr: reset mpstate.qstr_last_chunk before raising an error - modbuiltins: add additional macro for extending builtins - mpconfig.h: define MICROPY_PY_USSL_FINALISER only if not defined extmod: - machine_i2c: make SoftI2C configurable via macro option - machine_spi: make SoftSPI configurable via macro option - modonewire: make _onewire module configurable via macro option - machine_pwm: factor out machine.PWM bindings to common code - move modnetwork and modusocket from stm32 to extmod - modnetwork: add STA_IF and AP_IF constants - modnetwork: add extended socket state - modusocket: add read/write stream methods to socket object - modnetwork: define network interfaces in port config files - network_cyw43: make consistent use of STA and AP constants - modnetwork: remove STM32 references - modnetwork: remove modnetwork socket u_state member - mpbthci.h: add mp_bluetooth_hci_uart_any prototype - nimble: add nimble CMake fragment file - add platform module - moduplatform: improve implementation for PC ports - vfs_posix_file: support MP_STREAM_POLL in vfs_posix_file_ioctl - modbluetooth: add connection interval to gap_connect - nimble: update to NimBLE v1.4 - nimble: remove workaround for OS_ENOMEM - uasyncio: fix gather returning exceptions from a cancelled task - uplatform: remove unused definitions - uplatform: use generic custom platform string - network_ninaw10: fix scan list order to match other NICs - modbluetooth: support gap_connect(None) to cancel a connection - modure: redirect regex debug printing to mp_printf - network_ninaw10: fix config of AP mode - network_ninaw10: disable active connections before connecting - network_ninaw10: make NIC state persistent - network_ninaw10: return -1 on timeout from recv/send - network_ninaw10: make recv/recvfrom interchangeable - moduplatform: detect xtensa arch - modusocket: allow setting timeout on unbound sockets - modusocket: initialise accepted socket state - network_ninaw10: use socket timeout preset in modusocket - modbluetooth: fix conditional compilation of ringbuf_put_uuid - modbluetooth: put declaration of connect_cancel in correct place shared: - libc/string0: don't include string.h, and provide __memcpy_chk - runtime/pyexec: cleanup EXEC_FLAG flag constants drivers: - ninaw10: add ublox Nina-W10 WiFi/BT module driver - lsm6dsox: add LSM6DSOX driver and examples - neopixel: avoid heap alloc in fill() - ninaw10: fix BSSID byte order, and add null byte to ESSID - ninaw10/nina_wifi_drv: fix DNS resolution mpy-cross: no changes specific to this component/port lib: - mynewt-nimble: switch to the MicroPython fork of NimBLE - asf4: point submodule to latest commit on circuitpython branch - update pico-sdk to 1.3.0 and tinyusb to 0.12.0 - stm32lib: update library for L4 v1.17.0, new G4, WL, and MMC fixes - stm32lib: update library for fix to F7 USB HS Support components ================== docs: - library/os.rst: clarify littlefs requirements for block erase - library/bluetooth.rst: update incorrect link to gatts_write - make.bat: change Windows output dir from '_build' to 'build' - library/machine.I2S.rst: specify that I2S.shift args are kw-only - esp32: explain ESP32 PWM modes, timers, and channels - rp2: add reference for PIO assembly instructions, and PIO tutorial - library/random.rst: document the random module - reference/mpremote.rst: add docs for mpremote - reference/manifest.rst: add docs for manifest.py files - library/stm.rst: document the stm module - esp32/tutorial: add an example of peripheral control via regs - rp2/general.rst: fix typo with missing spaces - library/framebuf.rst: adjust dimensions in example - library/rp2.rst: update function asm_pio_encode to add sideset_opt - reference/filesystem.rst: add detail on how to use littlefs fuse - rp2/quickref.rst: add section on PIO - library/sys.rst: add docs for sys.settrace - esp8266/tutorial: fix comments of FrameBuffer examples - library/uasyncio.rst: detail exception behaviour in cancel/timeout - library/machine.Timer.rst: document 'id' as positional-only arg - library/machine.SPI.rst: add example SPI usage - library/machine.Timer.rst: document `period` and `callback` args - library/machine.Pin.rst: add Pin.ANALOG mode constant - remove trailing spaces and convert tabs to spaces - library/sys.rst: add note about '.frozen' as an entry in sys.path - differences: document details of new PEPs/features in Python 3.5+ - update copyright year range to include 2022 - esp32: update RMT quickref example to match latest code examples: no changes specific to this component/port tests: - perf_bench: use math.log instead of math.log2 - basics: add tests for type-checking subclassed exc instances - micropython/const.py: add comment about required config for test - cpydiff: clarify f-string diffs regarding concatenation - basics/int_big_cmp.py: add more tests for big-int comparison - extmod: skip uselect_poll_udp when poll() is not available tools: - autobuild: add auto build for GENERIC_C3_USB - ci.sh: use IDF v4.4 as part of esp32 CI and build GENERIC_S3 - autobuild: add the MIMXRT1010_EVK board to autobuild - ci.sh: use a specific ESP IDF v4.4 commit - autobuild: add script to generate website board metadata - dfu.py: make tool work with python3 when parsing DFU files - autobuild: automatically build all mimxrt, rp2 and samd boards - autobuild: automatically build all stm32 boards - mpremote: implement seek and flush in ioctl method - autobuild: automatically build all esp32 boards - upip.py: support == to specify exact package version - makemanifest.py: make str conversion compatible with Python 2 - makemanifest.py: merge make-frozen.py - mpremote: add mkdir and rmdir to RemoteFS - mpremote: add help command - mpremote: add link to mpremote docs URL in help message - upip.py: skip '.frozen' entry in sys.path for install path - autobuild: build esp8266 OTA image with GENERIC_1M board - ci.sh: upgrade Zephyr docker image to v0.21.0 - ci.sh: build zephyr nucleo_wb55rg to test zephyr bluetooth build CI: - workflows: use Python 3.8 for macos workflow - workflows: add new workflow to build ports download metadata The ports ========= all ports: - add board.json for all boards - add images, features and urls to board.json - add '.frozen' as the first entry in sys.path - move '.frozen' to second entry in sys.path bare-arm port: - mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM - mpconfigport.h: disable remaining optional features cc3200 port: no changes specific to this component/port esp8266 port: - boards/GENERIC: enable f-strings - extract qstr from object when comparing keys in config() - etshal.h: remove unneeded function declarations - allow building a board to any dest directory esp32 port: - boards: add new FeatherS2-Neo board definition - machine_timer: use tx_update member for IDF 4.4 and above - add support for ESP32-S3 SoCs - boards: add new GENERIC_S3 board definition - machine_hw_spi: fix hardware SPI DMA channels for S2/S3 - boards: add board definition for ESP32-S2-WROVER module - boards: add LOLIN_S2_MINI ESP32-S2 board - machine_pwm: add support for all PWM timers and channels - README: updated readme with req IDF vers for ESP32-S2, C3 and S3 - usb: add USB host connection detection for CDC serial output - machine_pin: block out IO16 and IO17 when using SPIRAM on ESP32 - mpthreadport: fix TCB cleanup function so thread_mutex is ready - main: add option for a board to hook code into startup sequence - split out WLAN code from modnetwork.c to network_wlan.c - enable optimisations and move code to iRAM to boost performance - usb: improve speed of USB CDC output - add specific deploy_s2.md instructions for esp32-s2 - boards/LOLIN_S2_MINI: add image to board.json - boards: update board and deploy metadata for UM_xxx boards - usb: further improve speed of USB CDC output - boards/LOLIN_S2_PICO: add LOLIN_S2_PICO board definition files - boards/ESP32_S2_WROVER: link to specific deploy_s2 instructions - support building with latest IDF v5 - in machine_i2s, send null samples in underflow situations - in machine_i2s, make object reference arrays root pointers - add SDCard support for S3, and a GENERIC_S3_SPIRAM board - boards/GENERIC_S3: enable BLE on ESP32 S3 - machine_pwm: implement duty_u16() and duty_ns() PWM methods - extract qstr from object when comparing keys in config() - machine_pin: make GPIO 26 usable for S2,S3 if SPIRAM not config'd - machine_hw_spi: fix SPI default pins reordering on ESP32-S2/S3 - machine_hw_spi: set proper default SPI(id=1) pins on S2,S3 and C3 - machine_hw_spi: set proper default SPI(id=2) pins on S2 and S3 - boards: remove SPI pin defaults from GENERIC S2/S3 boards - modnetwork: synchronize WiFi AUTH_xxx constants with IDF values - machine_pwm: keep duty constant when changing frequency - machine_bitstream: replace bit-bang code with RMT-based driver - machine_i2s: add support for ESP-IDF 4.4 - machine_bitstream: fix signal duplication on output pins - esp32: enable platform module with IDF version - boards/GENERIC_D2WD: build with -Os optimisation - esp32_rmt: install RMT driver on core 1 - machine_bitstream: reinstate bitstream bit-bang implementation javascript port: no changes specific to this component/port mimxrt port: - sdcard: implement SDCard driver - machine_bitstream: add bitstream function to machine module - rework flash configuration - sdram: add SDRAM support - eth: add LAN support and integrate the network module - modmachine: implement machine.WDT() and machine.reset_cause() - boards: fix the D14/D15 pin assignment of MIMXRT1050/60/64_EVK - hal: remove duplicate definitions from flexspi_hyper_flash.h - dma_channel: fix the DMA channel management - fix cycle counter for time.ticks_cpu() and machine.bitstream() - add dht_readinto() to the mimxrt module, and freeze dht.py - extend the help() message and README.md - mpconfigport.h: enable f-strings - modmachine: implement soft_reset() and unique_id() functions - boards/make-pins.py: allow empty lines and comments in pins.csv - optimize the runtime speed - enable the platform module - boards: add the Seeed ARCH MIX board - boards: update the board.json files and add deploy_xx.md files - fix mp_hal_quiet_timing_enter()/exit() so timer still runs - support PWM using the FLEXPWM and QTMR modules - define UART 0 on MIMXRT boards - support selection of PHY type and address - re-enable eth checksum creation by HW - fix a tiny unnoticed bug in sdcard.c - add a driver for the DP83848 PHY device - refactor the reading of the machine id - enable ticks_cpu at boot time for NDEBUG builds only - use -Og instead of -O0 for DEBUG builds - tidy up the board flash related files - hal: allow readSampleClkSrc to be configured by a board - enable MICROPY_PY_USSL_FINALISER minimal port: - mpconfigport.h: use MICROPY_CONFIG_ROM_LEVEL_MINIMUM - Makefile: don't force a 32-bit build - mpconfigport.h: disable features that are not needed nrf port: - Makefile: improve Black Magic Probe commands - main: use VFS helper function to mount fs and chdir 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: - mpconfigport.h: enable heapq module - add support for bluetooth module using NimBLE - add framework for networking - mpconfigport.h: use the "extra" feature level - enable optimisations (comp goto, map cache, fast attr) - machine_i2s: add I2S protocol support - add support for Nina-W10 WiFi/BT module - boards: add support for Arduino Nano RP2040 - machine_bitstream: implement the machine.bitstream driver - boards: add neopixel.py to manifest.py - rp2_pio: support exec with sideset - boards/PIMORONI_PICOLIPO_16MB: fix 16MB flash size - boards: add PYBSTICK26 RP2040 board definition - machine_uart: handle and clear UART RX timeout IRQ - boards/ARDUINO_NANO_RP2040_CONNECT: set default I2C pins - machine_pwm: fix PWM frequency setting - machine_pwm: keep duty value when changing the frequency - add support for DHT11 and DHT22 sensors - CMakeLists.txt: allow a board to override PICO_BOARD - boards/GARATRONIC_PYBSTICK26_RP2040: use correct pico-sdk board cfg samd port: - integrate latest asf4, add help, more time funcs and uPy features - samd_soc: allow a board to configure the low-level MCU config - add internal flash block device, filesystem and uos support - add Pin and LED classes, and machine.unique_id - boards/ADAFRUIT_FEATHER_M0_EXPRESS: update for flash and pins - boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS: update for flash and pins - boards/MINISAM_M4: update for flash and pins - boards/ADAFRUIT_TRINKET_M0: update for flash and pins - boards/SAMD21_XPLAINED_PRO: update for flash and pins - boards/SEEED_WIO_TERMINAL: add new board definition - boards/SEEED_XIAO: add new board definition - README.md: update README to reflect new features and boards stm32 port: - pin: enable GPIO clock of pin if it's constructed without init - main: don't unconditionally enable GPIO A,B,C,D clocks - boards/VCC_GND_H743VI: add board definition for VCC_GND_H743VI - boards/OLIMEX_E407: add Ethernet RMII support - boards/LEGO_HUB_NO6: remove user paths from cc2564 init file - boards: remove trailing spaces, and add newline at end of file - add basic support for STM32H750 - add support for H7A3(Q)/H7B3(Q), and STM32H73B3I_DK board defn - suggest putting code in main.py not boot.py - boards/make-pins.py: allow a CPU pin to be hidden - boards/make-pins.py: allow empty lines and comments in pins.csv - dma: add functions for external users of DMA to enable clock - enable LOAD_ATTR fast path, and map lookup caching on >M0 - boards: add OLIMEX H407 board definition - enable platform module - extended flash filesystem space to 512K on H743 boards - boards/NUCLEO_H743ZI: enable VfsLfs2 on NUCLEO_H743ZI(2) boards - boards: add PF11-BOOT0 to stm32f091_af.csv - machine_i2c: use hardware I2C for STM32H7 - sdram: enforce gcc opt, and use volatile and DSB in sdram_test - usbd_cdc_interface: allow a board to hook into USBD CDC RX events - mpbthciport: allow a board to hook BT HCI poll functions - pendsv: allow a board to add entries for pendsv_schedule_dispatch - boards: add images to board.json for Adafruit and VCC_GND boards - uart: fix race conditions and clearing status in IRQ handler - mpconfigport.h: use the "extra" feature level - in machine_i2s, send null samples in underflow situations - in machine_i2s, make object reference arrays root pointers - led: support an extra 2 LEDs in board configuration - boards/MIKROE_CLICKER2_STM32: add more detail to board.json - boards: add new board MikroElektronika Quail, and F427 support - main: run optional frozen module at boot - sdio: don't explicitly disable DMA2 on deinit of SDIO - dma: make DMA2_Stream3 exclusive to SDIO when CYW43 enabled - boards: build NUCLEO_WB55 and STM32F769DISC without mboot enabled - boards: add PYBSTICK26 F411 board definition - boards/NADHAT_PYBF405: rename board to GARATRONIC_NADHAT_F405 - usb: use a table of allowed values to simplify usb_mode get/set - boards/NUCLEO_WB55: update rfcore_firmwre for new WS - flashbdev: support generic flash storage config via link symbols - boards: convert F413,F439,H743,L4xx,WB55 to new flash FS config - add support for F479 MCUs - include HAL MMC code in F4 builds - boards/make-pins.py: use cpu pins to define static alt-fun macros - boards/NUCLEO_WB55: fix LED ordering - boards/LEGO_HUB_NO6: set filesystem label as HUB_NO6 - boards: remove stray '+' characters at start of lines in ld files - boards: remove unused MICROPY_HW_ENABLE_TIMER config - boards: enable MICROPY_HW_ENABLE_SERVO on various boards - update L4 code to build with latest stm32lib and L4 HAL 1.17.0 - main: call sdcard_init when only MICROPY_HW_ENABLE_MMCARD enabled - sdcard: support 8-bit wide SDIO bus - sdcard: add config option to force MM card capacity - factoryreset: init vfs flags before calling pyb_flash_init_vfs - qspi: fix typo in address comment - boards/make-pins.py: generate empty ADC table if needed - boards/OLIMEX_H407: fix typo in OLIMEX H407 board.json - network_wiznet5k: fix build error with wiznet5k and lwip enabled - enable MICROPY_PY_USSL_FINALISER teensy port: - switch to use manifest.py instead of FROZEN_DIR unix port: - enable LOAD_ATTR fast path, and map lookup caching - modusocket: support MP_STREAM_POLL in unix socket_ioctl - modos: add support for uos.urandom(n) - coverage: change remaining printf to mp_printf - Makefile: use -Og instead of -O0 for debug builds windows port: - README: remove unsupported Python instructions for Cygwin - mpconfigport.h: enable help and help("modules") - add support for build variants to windows port - run tests via Makefile - appveyor: build both standard and dev variants - appveyor: build mpy-cross only once for mingw-w64 - msvc: run qstr preprocessing phase in parallel zephyr port: - mphalport.h: remove unused and unimplemented C-level pin API - increase minimum CMake version to 3.20.0 - update include path to reboot.h - get UART console device from devicetree instead of Kconfig - use CONFIG_USB_DEVICE_STACK for conditional USB device support - upgrade to Zephyr v2.7.0 - modbluetooth_zephyr: provide dummy connect_cancel function
da4b38e
2022-01-17 06:50
下载
下载
请输入验证码,防止盗链导致资源被占用
取消
下载
1
https://gitee.com/mirrors/micropython.git
git@gitee.com:mirrors/micropython.git
mirrors
micropython
micropython
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册