commit 160ef68d4e58b1d8cbbcec6472ce12e07a9208da Author: yangfl <yangfl@users.noreply.github.com> Date: Tue Aug 8 04:19:23 2023 +0800 debian: update to 1.20.0 commit 74324408c316617d4eedfe3d6f6822c147a0ccf2 Merge: 88a5600f 6f032f7c Author: yangfl <yangfl@users.noreply.github.com> Date: Tue Aug 8 04:18:20 2023 +0800 Merge tag 'upstream/1.20.0+ds' commit 6f032f7c45f92284dc96e2cfc09a85184963fb04 Author: yangfl <yangfl@users.noreply.github.com> Date: Tue Aug 8 04:17:34 2023 +0800 Import Upstream version 1.20.0+ds commit 294baf52b346e400e2255c6c1e82af5b978b18f7 Author: Damien George <damien@micropython.org> Date: Wed Apr 26 15:42:28 2023 +1000 all: Bump version to 1.20.0. Signed-off-by: Damien George <damien@micropython.org> commit 57ca8b71ee1b7b9f4507934df60bc52b7ca5f8b7 Author: Damien George <damien@micropython.org> Date: Wed Apr 26 13:33:32 2023 +1000 LICENSE,docs: Update copyright year range to include 2023. Signed-off-by: Damien George <damien@micropython.org> commit c27d686d80812398c4a4227dc7b3aa304cff1014 Author: Damien George <damien@micropython.org> Date: Wed Apr 26 12:59:26 2023 +1000 lib/micropython-lib: Update submodule to latest. This brings in support to publish packages to PyPI, adds missing metadata and fixes aioble descriptor flags. Signed-off-by: Damien George <damien@micropython.org> commit a14e79bcfbff83129b2e889332f5f1b8ce5c6c3e Author: Damien George <damien@micropython.org> Date: Wed Apr 26 12:57:35 2023 +1000 stm32/cyw43_configport: Provide cyw43_hal_pin_config_irq_falling func. Signed-off-by: Damien George <damien@micropython.org> commit 41a2415e081afd6d2bff82fa6dbacb7bcfc9e63b Author: Damien George <damien@micropython.org> Date: Wed Apr 26 12:57:04 2023 +1000 lib/cyw43-driver: Update driver to latest version v1.0.0. Signed-off-by: Damien George <damien@micropython.org> commit fe4ac49d7f3beb0512545ac8e4545c76da2334ec Author: Damien George <damien@micropython.org> Date: Tue Apr 4 10:36:02 2023 +1000 rp2/memmap_mp.ld: Allow a board to reserve memory for the C heap. Since c80e7c14e6305e50e3b39f97172d4d8fe1214d3b changed the GC heap to use all unused RAM, there is no longer any RAM available for the traditional C heap (which is not used by default in MicroPython but may be used by C extensions). This commit adds a provision for a board to reserve RAM for the C heap, by defining MICROPY_C_HEAP_SIZE. Signed-off-by: Damien George <damien@micropython.org> commit 7ea06a3e2638e0fb82240c0b88c9cd1ecaf942f5 Author: IcedRooibos <47491349+IcedRooibos@users.noreply.github.com> Date: Thu Apr 13 21:28:48 2023 +0800 esp32/esp32_rmt: Fix looping behaviour for RMT on ESP32-S3. The previous code worked on ESP32 but not ESP32-S3. All the IDF (v4.4.3) examples call rmt_set_tx_loop_mode before rmt_write_items, so make that change here. Signed-off-by: Damien George <damien@micropython.org> commit 67fb0beddb4e05b3126635143eefb41a599d9460 Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Apr 13 11:36:42 2023 +1000 extmod/btstack/modbluetooth_btstack: Add default services. Even if the user doesn't call ble.gatts_register_services, always provide the default services. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit a42a8022d8d2c9fc1fe05ff5ac60b650e481a62d Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Apr 13 11:33:43 2023 +1000 extmod/modbluetooth: Make all HCI transports trace in the same format. - Use HCI_TRACE macro consistently. - Use the same colour formatting. - Add a tool to convert to .pcap for Wireshark. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit ab31e23f7a0bc8379f117f0e31403751cbfcf837 Author: Jim Mussared <jim.mussared@gmail.com> Date: Wed Apr 12 13:39:17 2023 +1000 tests/multi_bluetooth: Use multitest.broadcast instead of sleep. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit 201f5df91ef921dbf1d78b2fc4c194e1776d1b12 Author: Jim Mussared <jim.mussared@gmail.com> Date: Wed Apr 12 00:21:12 2023 +1000 examples/bluetooth/ble_temperature_central.py: Remove service tuple. This is unused in the client, only needed in the server. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit 419017e1e4260742412eb4ce4cc634b9150b2f7d Author: Jim Mussared <jim.mussared@gmail.com> Date: Wed Apr 12 00:18:07 2023 +1000 tests/multi_bluetooth/ble_characteristic.py: Add write-no-response. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit 80fc1c8fbf140d1a8bfb42941bae152c365b94d8 Author: Jim Mussared <jim.mussared@gmail.com> Date: Tue Apr 11 22:07:46 2023 +1000 tests/multi_bluetooth: Add test for descriptors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit e6de6656f4146ace63304795e24dc7aae7f4dd1c Author: Jim Mussared <jim.mussared@gmail.com> Date: Wed Apr 12 00:16:47 2023 +1000 extmod/nimble: Fix flags for descriptor registration. The att_flags for descriptors does not use the same bitfield as for characteristics. This was leading to NimBLE descriptors getting the wrong flags set. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit bb4ee06d98f89301be0cea62362070cd76ab4c1c Author: Jim Mussared <jim.mussared@gmail.com> Date: Fri Mar 10 00:56:31 2023 +1100 extmod/btstack: Add support for CCCD to allow client subscriptions. This allows gatts_write(..., send_update=True) to work, which will send notifications/indications to subscribed clients. btstack already created the CCCD but writes to it were ignored. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit f9b60a240a8b10a823923a95bff10453761c6f82 Author: Jim Mussared <jim.mussared@gmail.com> Date: Fri Mar 10 00:55:26 2023 +1100 tests/multi_bluetooth/ble_subscribe: Use end_handle in desc discovery. Obtaining the end_handle was added in cacc96d9. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit a2df439dd302625ff49d4bb81b4ff7acadbb678c Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Mar 9 23:50:20 2023 +1100 extmod/btstack: Fix MTU handling. There was no event handler for central-initiated MTU exchange. Fix truncation of notify/indicate to match NimBLE. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit a652695153bf9cbf5ad21bd15fdecdb7710b4a29 Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Mar 9 22:52:32 2023 +1100 tests/multi_bluetooth/ble_mtu: Split peripheral/central-initiated. btstack only supports central-initiated, so this allows us to have a test that works on both (ble_mtu.py), and then another one for just the NimBLE supported behavior (ble_mtu_peripheral.py). Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit dcb863ebfbce3251188ce0cedf584a120d8aeb9e Author: Jim Mussared <jim.mussared@gmail.com> Date: Wed Mar 8 16:44:43 2023 +1100 tests/multi_bluetooth: Use time.sleep_ms instead of time.sleep. On unix, time.sleep is implemented as select(timeout=<time>) which means that it does not run the poll hook during sleeping. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit a6aa7397d8e5b309e5675612143d3c5a5e931333 Author: Jim Mussared <jim.mussared@gmail.com> Date: Fri Mar 3 00:48:33 2023 +1100 extmod/btstack: Include value handle in client read/write events. This replaces the previous pending operation queue (that used to also be shared with pending server notify/indicate ops) with a single pending operation per connection. This allows the value handle to be correctly passed to the Python-level events. Also re-structure GATT client event handling to simplify the packet handler functions. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit 256f47e2f8348d08b53e3c69461cf07903b00367 Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Mar 2 17:32:13 2023 +1100 extmod/btstack: Fix indicate/notify queuing. This adds a mechanism to track a pending notify/indicate operation that is deferred due to the send buffer being full. This uses a tracked alloc that is passed as the content arg to the callback. This replaces the previous mechanism that did this via the global pending op queue, shared with client read/write ops. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit bc9ec1cf718361c1f361bb4ff6de3c660d84696d Author: Jim Mussared <jim.mussared@gmail.com> Date: Thu Mar 2 15:40:59 2023 +1100 extmod/modbluetooth: Merge gatts_notify/indicate implementation. Makes gatts_notify and gatts_indicate work in the same way: by default they send the DB value, but you can manually override the payload. In other words, makes gatts_indicate work the same as gatts_notify. Note: This removes support for queuing notifications and indications on btstack when the ACL buffer is full. This functionality will be reimplemented in a future commit. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit 9e6885ad820a9f42bf93df56eb3f3be0c8639622 Author: Damien George <damien@micropython.org> Date: Sat Apr 22 00:39:31 2023 +1000 extmod/btstack: Switch to use hci_dump_init instead of hci_dump_open. The latter is no longer available in the version of BTstack now in use by this repository. Signed-off-by: Damien George <damien@micropython.org> commit ec1eeccab45af6893f19cd07292808bbe7c62cf5 Author: Damien George <damien@micropython.org> Date: Fri Apr 21 18:17:34 2023 +1000 shared/tinyusb: Revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256. This reverts commit 0613d3e3561a82fffa36594647ef916b19bc912b. The value of CFG_TUD_CDC_EP_BUFSIZE should match the endpoint size, otherwise data may stay in the lower layers of the USB stack (and not passed up to the higher layers) until a total of CFG_TUD_CDC_EP_BUFSIZE bytes have been received, which may not happen for a long time. Fixes issue #11253. Signed-off-by: Damien George <damien@micropython.org> commit bf3eb9dc3911b8e4e7da3054ffece61ae5e2ef64 Author: David (Pololu) <dev-david@pololu.com> Date: Wed Apr 12 18:58:44 2023 -0700 rp2/machine_i2c: Add timeout parameter for machine.I2C(). This commit adds support for the `timeout` keyword argument to machine.I2C on the rp2 port, following how it's done on other ports. The main motivation here is avoid the interpreter crashing due to infinite loops when SDA is stuck low, which is quite common if the board gets reset while reading from an I2C device. A default timeout of 50ms is chosen because it's consistent with: - Commit a707fe50b085ec83722106609f6fd219faf9f030 which used a timeout of 50,000us for zero-length writes on the rp2 port. - The machine.SoftI2C class which uses 50,000us as the default timeout. - The stm32 port's hardware I2C, which uses 50,000us for I2C_POLL_DEFAULT_TIMEOUT_US. This commit also fixes the default timeout on the esp32 port to be consistent with the above, and updates the documentation for machine.I2C to document this keyword argument. commit b525f1c9ec8ffa9009754578932f3fad5f63026b Author: Jonas Scharpf <jonas@brainelectronics.de> Date: Wed Apr 5 07:48:53 2023 +0200 tools/mpremote: Add ctrl-x as additonal mpremote disconnect shortcut. The mpremote REPL can now be closed with either ctrl+] or ctrl+x, which gives users a choice, useful if the ']' key is difficult to access. Fixes issue #11197. Signed-off-by: Jonas Scharpf <jonas@brainelectronics.de> commit 0acc73344a38cb04eb014bbf68aba31135ceff47 Author: iabdalkader <i.abdalkader@gmail.com> Date: Wed Apr 12 16:58:56 2023 +0200 mimxrt: Fix the build for boards without ROM API. commit bde222ce849d3d247f588bc6db119b3d2f45faf8 Author: iabdalkader <i.abdalkader@gmail.com> Date: Sun Apr 9 19:20:09 2023 +0200 mimxrt/modmachine: Implement machine.bootloader(). If a board defines a custom bootloader entry function it will be called first, if not and the ROM API supports RUN bootloader API, then `machine.bootloader()` will jump to the ROM serial downloader in USB mode. commit 8b72721b29b9454191b83353ca6895f32361abc5 Author: iabdalkader <i.abdalkader@gmail.com> Date: Tue Mar 7 19:34:10 2023 +0100 mimxrt/mpconfigport: Allow configuring different network interfaces. This commit allows boards to disable Ethernet and keep the networking stack enabled, to use an alternate networking interface, such as WiFi. Note that the `network` and `socket` modules are now enabled by default for a board. commit 944b4c205896588bc8653e360d048da6c80fa7a5 Author: iabdalkader <i.abdalkader@gmail.com> Date: Tue Feb 28 22:14:31 2023 +0100 mimxrt/boards/MIMXRT1064_EVK: Fix board config to use internal flash. This commit is necessary to make MicroPython work on this eval kit out of the box, as the eval kit ships with the HyperFlash physically disconnected from the bus (refer to the schematics or the user guide) and the QSPI connected instead, but the fuses/board/pins are configured to boot from internal flash (on FlexSPI2). Note that enabling the HyperFlash is not trivial, as it requires soldering and desoldering of many small footprint resistors and changing fuses. commit ed5e3598f16a24022e78755e1a86b2d6ed12e5ca Author: iabdalkader <i.abdalkader@gmail.com> Date: Tue Feb 28 22:11:45 2023 +0100 mimxrt/Makefile: Fix internal flash configuration and build. commit a22136a7322616e768962804075380103d34a09b Author: Alex Riesen <alexander.riesen@cetitec.com> Date: Tue Feb 21 16:44:08 2023 +0100 py/makeqstrdefs.py: Fix handling GreenHills C/C++ preprocessor output. The GreenHills preprocessor produces #line directives without a file name, which the regular expression used to distiguish between "# <number> file..." (GCC and similar) and "#line <number> file..." (Microsoft C and similar) does not match, aborting processing. Besides, the regular expression was unnecessarily wide, matching lines containing a "#", followed by any number of 'l','i','n', and 'e' characters. Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com> commit cfd3b70934791abc07f9476a956781de92ddf715 Author: Jim Mussared <jim.mussared@gmail.com> Date: Fri Mar 31 14:08:13 2023 +1100 tools/manifestfile.py: Add support for publishing packages to PyPI. This adds a new MODE_PYPROJECT, which gives basic support to allow packaging a small subset of micropython-lib packages to PyPI. This change allows a package in micropython-lib to: - Add a "pypi" name to its metadata indicating that it's based on a PyPI package. - Add "stdlib" to its metadata indicating that it's a micropython version of a stdlib package. - Add a "pypi_publish" name to its metadata to indicate that it can be published to PyPI (this can be different to the package name, e.g. "foo" might want to be published as "micropython-foo"). When a package requires() another one, if it's in MODE_PYPROJECT then if the package is from pypi then it will record that as a pypi dependency instead (or no dependency at all if it's from stdlib). Also allows require() to explicitly specify the pypi name. Signed-off-by: Jim Mussared <jim.mussared@gmail.com> commit c046b23ea29e0183c899a8dbe1da3bed3440a255 Author: David Grayson <davidegrayson@gmail.com> Date: Tue Apr 4 12:05:45 2023 -0700 shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code. Helps prevent the filesystem from getting formatted by mistake, among other things. For example, on a Pico board, entering Ctrl+D and Ctrl+C fast many times will eventually wipe the filesystem (without warning or notice). Further rationale: Ctrl+C is used a lot by automation scripts (eg mpremote) and UI's (eg Mu, Thonny) to get the board into a known state. If the board is not responding for a short time then it's not possible to know if it's just a slow start up (eg in _boot.py), or an infinite loop in the main application. The former should not be interrupted, but the latter should. The only way to distinguish these two cases would be to wait "long enough", and if there's nothing on the serial after "long enough" then assume it's running the application and Ctrl+C should break out of it. But defining "long enough" is impossible for all the different boards and their possible behaviour. The solution in this commit is to make it so that frozen start-up code cannot be interrupted by Ctrl+C. That code then effectively acts like normal C start-up code, which also cannot be interrupted. Note: on the stm32 port this was never seen as an issue because all start-up code is in C. But now other ports start to put more things in _boot.py and so this problem crops up. Signed-off-by: David Grayson <davidegrayson@gmail.com> commit db4b416ea824e66414530b84928671f701ac5b84 Author: iabdalkader <i.abdalkader@gmail.com> Date: Tue Apr 4 11:04:17 2023 +0200 mimxrt/pendsv: Clean up PendSV code. The dispatch active flag is only set once and never reset, so it will always call the dispatch handler (once enabled), and it's not really needed because it doesn't make things more efficient. Also remove unused included headers. commit eb6e5143c422e13f9b07790a88473e4813024e92 Author: robert-hh <robert@hammelrath.com> Date: Wed Mar 22 20:31:50 2023 +0100 nrf/modules/machine/uart: Prevent UART lock-up after a receive error. Like frame error, overrun, etc. Fix is provided by @ricksorensen. commit a529e0e8cf1bcc5d1e6fc9ab5e4bfeb11c302a53 Author: robert-hh <robert@hammelrath.com> Date: Tue Mar 21 08:08:30 2023 +0100 nrf/nrfx_config: Use UARTE for nrf52xxx devices. It was incomplete. commit 408556504cc80c785fff494b1773c23f37a62f36 Author: robert-hh <robert@hammelrath.com> Date: Sat Mar 11 17:06:16 2023 +0100 nrf/modules/machine/pwm: Fix resource conflict, and change id to device. Changes in this commit: - Move the pwm_seq array to the p_config data structure. That prevents potential resource collisions between PWM devices. - Rename the keyword argument 'id' to 'device'. That's consistent with the SAMD port as the other port allowing to specify it. commit b4a0390cbe1a2d6e61549133f24257a632e7d233 Author: iabdalkader <i.abdalkader@gmail.com> Date: Tue Apr 4 22:53:55 2023 +0200 extmod/network_ninaw10: Add missing raw socket type to socket(). This regression was introduced by 3d46fe67bf0bfc848741a76e945b16b2e45e74cb. commit f34af3e42e6e823f5fbff1f8e729fe14460ea4ca Author: Oliver Joos <oliver.joos@feller.ch> Date: Sat Mar 11 15:59:31 2023 +0100 extmod/network_cyw43: Add support to get STA RSSI using status() method. This enables the use of WLAN(0).status('rssi') to get current RSSI of the AP that the STA is connected to. Signed-off-by: Damien George <damien@micropython.org> commit 11b5ee0d7c6b386c71f630dd58eed906de49fa65 Author: Oliver Joos <oliver.joos@feller.ch> Date: Sat Mar 11 15:50:16 2023 +0100 extmod/network_cyw43: Fix setting hostname using config() method. This bug is probably a typo. args[0] is the cyw43 object itself. While the value of a kwargs is in e->value. commit 3d46fe67bf0bfc848741a76e945b16b2e45e74cb Author: iabdalkader <i.abdalkader@gmail.com> Date: Wed Mar 29 20:42:44 2023 +0200 extmod/network_ninaw10: Check socket types when creating new sockets. The NINA socket types have the same values as modnetwork, but that may change in the future. So check the socket types passed to socket() and convert them (if needed) to their respective Nina socket types. Also remove the unnecessary socket type check code from bind(), as pointed out by @robert-hh. commit 9025671e7216d9fd73526a681568f78a330a6414 Author: iabdalkader <i.abdalkader@gmail.com> Date: Sun Mar 26 19:50:39 2023 +0200 drivers/ninaw10: Fix ESP32 input-only pins. ESP32 pins 34, 35, 36 and 39 are input only, and should not be configured as output. commit 5652f1f661479f23468c90c531927f5f0a727979 Author: Jan Hrudka <jahr@atlas.cz> Date: Fri Mar 31 21:12:40 2023 +0200 stm32/flash: Fix get_bank function for STM32H750. STM32H750 has only 1 flash bank so function get_bank should always return FLASH_BANK_1. commit 9f74ffb6eb8a65206bc7a31240e07054b19d7afc Author: Jos Verlinde <jos_verlinde@hotmail.com> Date: Sun Mar 19 21:42:56 2023 +0000 tools/pyboard.py: Fix ESPxx boards hanging in bootloader after reset. This is a follow up to d263438a6e365d3199494498a9b734cda29dde52, which solved one problem (reset on disconnect) but introduced a second one (hang in bootloader). To solve both probles, False/False is needed for DTR/RTS for ESPxx, but that would then block stm32 and others. Any unconditional combination of DTR/RTS ends up blocking normal operation on some type of board or another. A simple overview (for windows only): DTR CTS ESP8266/ESP32 STM32/SAMD51/RP2040 unspecified unspecified Reset on disconnect OK True False Hang in bootloader OK False False OK No Repl True True Reset on disconnect No Repl False True Reset on disconnect No Repl serial.manufacturer: wch.cn/Silicon Labs Microsoft serial.description: USB-SERIAL CH340 / USB Serial Device CP210x USB to UART Bridge The updated logic will only set the DTR/RTS signals for boards that do not use standard Microsoft drivers (based on the manufacturer). It would also be possible to check against a list of known driver manufactures (like wch.cn or Silicon Labs) but this would require a list of known drivers for all ports. Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com> commit 783ddfc264c8c36253a4279ef501f02f8cac1200 Author: Damien George <damien@micropython.org> Date: Tue Apr 4 11:57:25 2023 +1000 shared/tinyusb: Allow max USB descriptor string to be configured. Signed-off-by: Damien George <damien@micropython.org> commit 0a3600a9ade773e54cbd70e93a671ec089c3b0fe Author: Sebastian Romero <s.romero@arduino.cc> Date: Thu Mar 23 14:58:30 2023 +0100 stm32/boards/ARDUINO_NICLA_VISION: Fix incorrect bootloader PID.
Among the 11 debian patches available in version 1.19.1+ds-1 of the package, we noticed the following issues: