summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-22unix/main: Remove PATH_MAX from realpath.David Yang
POSIX.1-2008 ensures realpath() give a dynamically allocated buffer if NULL is passed (which is also true for ports/windows/realpath.c), avoiding an explicit call to malloc() and use of PATH_MAX, which may be undefined on some systems. Signed-off-by: David Yang <mmyangfl@gmail.com>
2025-04-21unix/variants: Enable os.uname() in coverage build for tests.Yoctopuce dev
In order to provide test coverage for the previous commit, `os.uname()` support is added to the unix coverage build. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
2025-04-21py/objstr: Fix handling of OP_MODULO with namedtuple.Yoctopuce dev
This fix handles attrtuple as well, eg. os.uname(). A test case has been added in basics/attrtuple2.py. Fixes issue #16969. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
2025-04-21py/objrange: Match CPython range slicing.Jeff Epler
The "index fixing" behavior of get_fast_slice_indexes are not desired here; the underlying behavior of mp_obj_slice_indexes actually is. Fixes issue #17016. Signed-off-by: Jeff Epler <jepler@gmail.com>
2025-04-21tests/basics/builtin_range.py: Add more tests for range slicing.Jeff Epler
Signed-off-by: Jeff Epler <jepler@gmail.com>
2025-04-21all: Bump version to 1.26.0-preview.v1.26.0-previewDamien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-16all: Bump version to 1.25.0.v1.25.0Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-14lib/micropython-lib: Update submodule to latest.Damien George
This brings in: - requests: do not leak header modifications when calling request - mip: allow relative URLs in package.json - mip: make mip.install() skip /rom*/lib directories - umqtt.simple: restore legacy ssl/ssl_params arguments - nrf24l01: increase startup delay - nrf24l01: properly handle timeout - nrf24l01: optimize status reading - lora-sx126x: fix invert_iq_rx / invert_iq_tx behaviour - unix-ffi/json: accept both str and bytes as arg for json.loads() - unix-ffi/machine: use libc if librt is not present - requests: use the host in the redirect url, not the one in headers - aiohttp: fix header case sensitivity - aiohttp: allow headers to be passed to a WebSocketClient - usb-device-cdc: optimise writing small data so it doesn't require alloc - inspect: fix isgenerator logic - inspect: implement iscoroutinefunction and iscoroutine Signed-off-by: Damien George <damien@micropython.org>
2025-04-14py/emitinlinerv32: Move include of asmrv32.h to within feature guard.Damien George
Otherwise, when compiling on 16-bit systems (where `mp_uint_t` is 16 bits wide) the compiler warns about "left shift count >= width of type", from the static inline functions that have RV32_ENCODE_TYPE_xxx macros which do a lot of bit shifting. Signed-off-by: Damien George <damien@micropython.org>
2025-04-10mimxrt/Makefile: Fix dependencies for generation of flexram_config.s.Damien George
Prior to this fix the following would fail: $ make build-TEENSY40/flexram_config.s because it didn't create the build directory before generating the file. Also, make `hal/resethandler_MIMXRT10xx.S` have an explicit dependency on `flexram_config.s` rather than the latter just being forced to be built before everything else. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09stm32/boards/PYBD_SF6: Support boards with larger SPI flash.Damien George
There are some newer PYBD_SF6 being produced which have a larger flash, namely two of 8MiB (instead of the older ones with two of 2MiB). This commit adds support for these boards. The idea is to have the same PYBD_SF6 firmware run on both old and new boards. That means autodetecting the flash at start-up and configuring all the relevant SPI/QSPI parameters, including for ROMFS and mboot. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09stm32/modmachine: Add SPI flash size to machine.info dump.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09stm32/mboot: Allow USB strings to be dynamic.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09stm32/qspi: Allow SPI flash size to be decided at runtime.Damien George
Allows `MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2` and `MICROPY_HW_QSPI_MPU_REGION_SIZE` to be arbitrary expressions, eg function calls. The `storage.h` header needs to be included in case access to `spi_bdev_t` is needed by the macros. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09stm32/vfs_rom_ioctl: Allow ROMFS configuration to be dynamic.Damien George
Options for a board to configure ROMFS are: - Leave ROMFS disabled, do nothing. - Enable by defining `MICROPY_HW_ROMFS_ENABLE_PARTx` to 1 and then in the linker script define `_micropy_hw_romfs_partX_start` and `_micropy_hw_romfs_partX_size`. - Enable by defining `MICROPY_HW_ROMFS_ENABLE_PARTx` to 1 and also define `MICROPY_HW_ROMFS_PARTx_START` and `MICROPY_HW_ROMFS_PARTx_SIZE` which can be arbitrary expressions (not necessarily static) Signed-off-by: Damien George <damien@micropython.org>
2025-04-09drivers/bus/qspi: Make num_dummy configurable for quad reads.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09drivers/memory/spiflash: Allow a board/port to detect SPI flash.Damien George
This commit allows the user of this driver to intercept the SPI flash initialisation routine and possibly take some action based on the JEDEC id, for example change the `mp_spiflash_t::chip_params` element. To do this, enable `MICROPY_HW_SPIFLASH_DETECT_DEVICE` and define a function called `mp_spiflash_detect()`. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09drivers/memory/spiflash: Allow a board/port to configure chip params.Damien George
This commit allows the user of this driver to dynamically configure the SPI flash chip parameters. For this, enable `MICROPY_HW_SPIFLASH_CHIP_PARAMS` and then set the `mp_spiflash_t::chip_params` element to point to a valid `mp_spiflash_chip_params_t` struct. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09docs/reference/mpremote: Update docs for mpremote rm -r.Jos Verlinde
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09tools/mpremote/tests: Add tests for mpremote rm -r.Jos Verlinde
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09tools/mpremote: Add recursive remove functionality to filesystem cmds.Jos Verlinde
mpremote now supports `mpremote rm -r`. Addresses #9802 and #16845. Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09tests: Update UART and SPI tests to work on Alif boards.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09tests/ports/alif_hardware: Add flash testing script.Damien George
This test is not intended to be run automatically and does not have a corresponding .exp file. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09github/workflows: Add Alif port to CI.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09alif/boards/OPENMV_AE3: Add OpenMV AE3 board definition.Damien George
Supports Murata 1YN for WiFi and BLE. Signed-off-by: iabdalkader <i.abdalkader@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/boards/ALIF_ENSEMBLE: Add Alif Ensemble board config.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpu: Add MPU region for OSPI1 XIP memory range.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/ospi_flash: Restore XIP settings after erase and write.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/ospi_flash_settings: Use 8-bit DFS for XIP.Damien George
To match the instruction length, so the DFS is restored to the XIP value after an erase or write (due to the final wait WIP). Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/ospi_flash: Don't invalidate cache after erasing/writing.Damien George
It's not needed, the MPU configures the XIP as non-cacheable. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif: Support more fine-grained pin alternate function selection.Damien George
Now raises an exception if the pin doesn't support the alternate function unit number and line type, eg UART0_TX (previously it only checked the peripheral). Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/machine_uart: Add machine.UART peripheral support.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpuart: Enhance UART to support bits/parity/stop and more IRQs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mcu: Pre-process Alif ToC config file.iabdalkader
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09alif/mcu: Remove json config files.iabdalkader
They will be generated as part of the build. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09alif: Integrate cyw43 Bluetooth with NimBLE.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif: Integrate cyw43 WLAN driver.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif: Integrate lwIP and mbedTLS.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpuart: Generalise UART driver to suppot all UART instances.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mphalport: Add mp_hal_pin_config_irq_falling helper.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/modules: Make HE core set /rom as current dir.Damien George
This allows HE to execute code from the ROMFS in MRAM. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/vfs_rom_ioctl: Add vfs_rom_ioctl with support for OSPI and MRAM.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpu: Add function to set read-only bit on MRAM MPU region.Damien George
To allow writing to MRAM region. Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/alif_flash: Make flash respond to the buffer protocol.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/alif_flash: Distinguish between total flash size and FS size.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpuart: Use mp_hal_pin_config for TX/RX configuration.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif/mpmetalport: Only notify after metal subsystem is init'd.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09alif: Link with libnosys.iabdalkader
This allows the correct start up functions to be called by the stdlib. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09alif/mpmetalport: Use MHU to notify remote cores.iabdalkader
Unlike HWSEM, the MHU IRQ can wake up cores from low-power modes, making it better suited for notifying remote cores. Note that no special function is required to wake up a remote core—the act of sending a message alone will notify it. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09alif/se_services: Add a secondary MHU channel.iabdalkader
This channel can be used to communicate (pass messages) between the M55 cores in the RTSS. Currently it's only used to notify the cores. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>