summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
...
* tools/pydfu.py: Support DFU files with elements of zero size.Damien George2021-02-23
| | | | | | | Instead of raising a ZeroDivisionError, this tool now just skips any elements in the DFU file that have zero size. Signed-off-by: Damien George <damien@micropython.org>
* rp2,stm32: Enable MICROPY_PY_UBINASCII_CRC32 to get ubinascii.crc32().Damien George2021-02-23
| | | | | | | These ports already have uzlib enabled so this additional ubinascii.crc32 function only costs about 90 bytes of flash. Signed-off-by: Damien George <damien@micropython.org>
* esp32: Define MICROPY_QSTRDEFS_PORT to include special qstrs.Damien George2021-02-21
| | | | | | Fixes issue #6942. Signed-off-by: Damien George <damien@micropython.org>
* py/mkrules.cmake: Add MICROPY_QSTRDEFS_PORT to qstr build process.Damien George2021-02-21
| | | | | | | This allows a port to specify a custom qstrdefsport.h file, the same as the QSTR_DEFS variable in a Makefile. Signed-off-by: Damien George <damien@micropython.org>
* py/mkrules.cmake: Rename QSTR_DEFS variables to QSTRDEFS.Damien George2021-02-21
| | | | | | | And also MICROPY_PY_QSTRDEFS to MICROPY_QSTRDEFS_PY. These variables are all related. Signed-off-by: Damien George <damien@micropython.org>
* tools/verifygitlog.py: Show required format regexp in error message.iTitou2021-02-21
| | | | Signed-off-by: iTitou <moiandme@gmail.com>
* stm32/boards/NUCLEO_WB55: Enable LPUART1 on PA2/PA3.Damien George2021-02-21
| | | | Signed-off-by: Damien George <damien@micropython.org>
* stm32/uart: Add support for LPUART1 on L0, L4, H7 and WB MCUs.Chris Mason2021-02-21
| | | | | | | | | | | | | | | | | Add LPUART1 as a standard UART. No low power features are supported, yet. LPUART1 is enabled as the next available UART after the standard U(S)ARTs: STM32WB: LPUART1 = UART(2) STM32L0: LPUART1 = UART(6) STM32L4: LPUART1 = UART(6) STM32H7: LPUART1 = UART(9) On all ports: LPUART1 = machine.UART('LP1') LPUART1 is enabled by defining MICROPY_HW_LPUART1_TX and MICROPY_HW_LPUART1_RX in mpconfigboard.h. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
* tests/multi_bluetooth: Add basic performance tests.Jim Mussared2021-02-19
| | | | | | | 1. Exchange GATT notifications. 2. Transmit a stream of data over L2CAP. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* extmod/modbluetooth: Separate enabling of "client" from "central".Jim Mussared2021-02-19
| | | | | | | | | | | | | | | | | | Previously, the MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE macro controlled enabling both the central mode and the GATT client functionality (because usually the two go together). This commits adds a new MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT macro that separately enables the GATT client functionality. This defaults to MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE. This also fixes a bug in the NimBLE bindings where a notification or indication would not be received by a peripheral (acting as client) as gap_event_cb wasn't handling it. Now both central_gap_event_cb and peripheral_gap_event_cb share the same common handler for these events. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* esp32: Make machine.soft_reset() work in main.py and reset_cause().Thorsten von Eicken2021-02-19
| | | | | | | | | This commit fixes two issues on the esp32: - it enables machine.soft_reset() to be called in main.py; - it enables machine.reset_cause() to correctly identify a soft reset. The former is useful in that it enables soft resets in applications that are started at boot time. The support is patterned after the stm32 port.
* esp32: Add basic support for Non-Volatile-Storage in esp32 module.Thorsten von Eicken2021-02-19
| | | | | | | | | | This commit implements basic NVS support for the esp32. It follows the pattern of the esp32.Partition class and exposes an NVS object per NVS namespace. The initial support provided is only for signed 32-bit integers and binary blobs. It's easy (albeit a bit tedious) to add support for more types. See discussions in: #4436, #4707, #6780
* esp32: Add support to build with ESP-IDF v4.3 pre-release.Damien George2021-02-19
| | | | | | The esp32 port now builds against IDF v4.3-beta1, as well as v4.4-dev. Signed-off-by: Damien George <damien@micropython.org>
* esp32/boards: Enable size optimisation for builds.Damien George2021-02-19
| | | | | | | | | This enables -Os for compilation, but still keeps full assertion messages. With IDF v4.2, -Os changes the GENERIC firmware size from 1512176 down to 1384640, and the GENERIC_SPIRAM firmware is now 1452320 which fits in the allocated partition. Signed-off-by: Damien George <damien@micropython.org>
* stm32/mboot: After sig verify, only write firmware-head if latter valid.Damien George2021-02-18
| | | | | | | So that mboot can be used to program encrypted/signed firmware to regions of flash that are not the main application, eg that are the filesystem. Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Use MICROPY_HW_BLE_UART_BAUDRATE for first UART init.Damien George2021-02-17
| | | | | | Otherwise the UART may be left in a state at baudrate=0. Signed-off-by: Damien George <damien@micropython.org>
* stm32/mpbtstackport: Allow chipset and secondary baudrate to be set.Damien George2021-02-17
| | | | Signed-off-by: Damien George <damien@micropython.org>
* stm32/mpbthciport: Use mp_printf instead of printf for error message.Damien George2021-02-17
| | | | Signed-off-by: Damien George <damien@micropython.org>
* stm32/mpbthciport: Fix initial baudrate to use provided value.Andrew Leech2021-02-17
| | | | Fixes bug introduced in the recent bffb71f523e4bcc21b913af291deeb67091bed88
* stm32/boards: Disable onewire module on boards with small flash.Damien George2021-02-17
| | | | Signed-off-by: Damien George <damien@micropython.org>
* stm32: Make pyb, uos, utime, machine and onewire modules configurable.Damien George2021-02-17
| | | | | | | The default for these is to enable them, but they can now be disabled individually by a board configuration. Signed-off-by: Damien George <damien@micropython.org>
* stm32/usb: Allow a board to configure USBD_VID and all PIDs.Damien George2021-02-17
| | | | | | | If a board defines USBD_VID then that will be used instead of the default. And then the board must also define all USBD_PID_xxx values that it needs. Signed-off-by: Damien George <damien@micropython.org>
* extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking.Thorsten von Eicken2021-02-17
| | | | | Also fix related problems with socket on esp32, improve docs for wrap_socket, and add more tests.
* stm32/mboot: Add unpack-dfu command to mboot_pack_dfu.py tool.David Michieli2021-02-17
| | | | | This command unpacks a previously packed DFU file, writing out a DFU which should be the same as the original (before packing).
* extmod/modbluetooth: Allow NimBLE to use Zephyr static address.Jim Mussared2021-02-17
| | | | | | Zephyr controllers can be queried for a static address (computed from the device ID). BlueKitchen already supports this, but make them both use the same macro to enable the feature.
* extmod/nimble/hal/hal_uart: Fix HCI_TRACE format specifiers.Jim Mussared2021-02-17
| | | | Makes this work consistently on unix and stm32 ports.
* zephyr/modusocket: Fix parameter in calls to net_context_get_XXX().PTH2021-02-17
| | | | | | | | | | | | | | | | | The following simple usocket example throws an error EINVAL on connect import usocket s = usocket.socket() s.connect(usocket.getaddrinfo('www.micropython.org', 80)[0][-1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] EINVAL Fixing the context parameter in calls of net_context_get_family() and net_context_get_type(), the connect works fine. Tested on a nucleo_h743zi board.
* zephyr/boards: Add support for the nucleo_h743zi board.PTH2021-02-17
|
* tools/ci.sh: Update zephyr docker image to v0.11.13.Maureen Helm2021-02-16
| | | | | | | Updates the zephyr docker image to the latest, v0.11.13. This updates CI to use zephyr SDK v0.12.2 and GCC v10.2.0 for the zephyr port. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* zephyr: Build MicroPython as a cmake target.Maureen Helm2021-02-16
| | | | | | | | | | | | | | Refactors the zephyr build infrastructure to build MicroPython as a cmake target, using the recently introduced core cmake rules. This change makes it possible to build the zephyr port like most other zephyr applications using west or cmake directly. It simplifies building with extra cmake arguments, such as specifying an alternate conf file or adding an Arduino shield. It also enables building the zephyr port anywhere in the host file system, which will allow regressing across multiple boards with the zephyr twister script. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* zephyr: Remove unused build files.Maureen Helm2021-02-16
| | | | | | Removes zephyr port build files that aren't being used anymore. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* zephyr: Disable frozen source modules.Maureen Helm2021-02-16
| | | | | | | Disables frozen source modules in the zephyr port. They are deprecated in the makefile rules and not implemented in the new cmake rules. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* py: Expand lists in core cmake custom commands.Maureen Helm2021-02-16
| | | | | | | | | The core cmake rules use custom commands to invoke qstr processing scripts. For the zephyr port, it's possible that list arguments to these commands may contain generator expressions, therefore we need to expand them properly. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* zephyr: Update to zephyr v2.5.0.Maureen Helm2021-02-16
| | | | | | | Updates the zephyr port build instructions and CI to use the latest zephyr release tag. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
* tools/makemanifest.py: Allow passing option args to include().Jim Mussared2021-02-16
| | | | | | | | | | | | | | | | | This allows customising which features can be enabled in a frozen library. e.g. `include("path.py", extra_features=True)` in path.py: options.defaults(standard_features=True) if options.standard_features: # freeze standard modules. if options.extra_features: # freeze extra modules. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* tests/extmod: Add test for ThreadSafeFlag.Jim Mussared2021-02-16
| | | | Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* docs/library/uasyncio.rst: Add docs for ThreadSafeFlag.Jim Mussared2021-02-16
| | | | Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* extmod/uasyncio: Add ThreadSafeFlag.Jim Mussared2021-02-16
| | | | | | | This is a MicroPython-extension that allows for code running in IRQ (hard or soft) or scheduler context to sequence asyncio code. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* unix/moduselect: Don't allow both posix and non-posix configurations.Jim Mussared2021-02-16
| | | | Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* extmod/moduselect: Fix unsigned/signed comparison for timeout!=-1.Jim Mussared2021-02-16
| | | | Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* extmod/nimble: Ensure handle is set on read error.Jim Mussared2021-02-16
| | | | | | | On error, the handle is only available on err->att_handle rather than in attr->handle used in the non-error case. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* esp32: Set MICROPY_USE_INTERNAL_ERRNO=0 to use toolchain's errno.h.Thorsten von Eicken2021-02-15
| | | | | | The underlying OS (the ESP-IDF) uses it's own internal errno codes and so it's simpler and cleaner to use those rather than trying to convert everything to the values defined in py/mperrno.h.
* esp32/modsocket: Remove unix socket error code translation.Thorsten von Eicken2021-02-15
| | | | The ESP-IDF has its own errno codes which should propagate out to the user.
* esp32: Remove obsolete IDF v3 code wrapped in MICROPY_ESP_IDF_4.Damien George2021-02-15
| | | | Signed-off-by: Damien George <damien@micropython.org>
* esp32: Add support to build with ESP-IDF v4.2.Damien George2021-02-15
| | | | Signed-off-by: Damien George <damien@micropython.org>
* esp32: Add support to build with ESP-IDF v4.1.1.Damien George2021-02-15
| | | | | | ESP-IDF v4.0.2 is still supported. Signed-off-by: Damien George <damien@micropython.org>
* esp32/README: Update based on new IDF v4 cmake build process.Damien George2021-02-15
| | | | Signed-off-by: Damien George <damien@micropython.org>
* tools/ci.sh: Change esp32 CI to work with idf.py and IDF v4.0.2.Damien George2021-02-15
| | | | Signed-off-by: Damien George <damien@micropython.org>
* esp32/boards: Enable BLE on all boards.Damien George2021-02-15
| | | | | | BLE was enabled by default on all boards in the existing make build. Signed-off-by: Damien George <damien@micropython.org>
* esp32/boards: Remove old IDF v3 sdkconfig values.Damien George2021-02-15
| | | | | | IDF v3 is no longer supported with the move to cmake. Signed-off-by: Damien George <damien@micropython.org>