Commit Graph

16926 Commits

Author SHA1 Message Date
Jos Verlinde
ef8282c717 docs/reference/mpremote: Update docs for mpremote rm -r.
Some checks failed
unix port / settrace (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09 10:51:48 +10:00
Jos Verlinde
72d4c40941 tools/mpremote/tests: Add tests for mpremote rm -r.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09 10:51:45 +10:00
Jos Verlinde
1aa9b3d94b tools/mpremote: Add recursive remove functionality to filesystem cmds.
mpremote now supports `mpremote rm -r`.

Addresses #9802 and #16845.

Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09 10:44:45 +10:00
Damien George
037f2dad72 tests: Update UART and SPI tests to work on Alif boards.
Some checks failed
unix port / settrace (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2019, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-2022, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, windows-latest, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:33 +10:00
Damien George
2ad5925302 tests/ports/alif_hardware: Add flash testing script.
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-09 00:22:33 +10:00
iabdalkader
547207ddc8 github/workflows: Add Alif port to CI.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:33 +10:00
Damien George
704d2f2d57 alif/boards/OPENMV_AE3: Add OpenMV AE3 board definition.
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-09 00:22:33 +10:00
iabdalkader
7c216d17b6 alif/boards/ALIF_ENSEMBLE: Add Alif Ensemble board config.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:33 +10:00
Damien George
b79b64a726 alif/mpu: Add MPU region for OSPI1 XIP memory range.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:33 +10:00
Damien George
c395f5ebb0 alif/ospi_flash: Restore XIP settings after erase and write.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:33 +10:00
Damien George
df5e4ced76 alif/ospi_flash_settings: Use 8-bit DFS for XIP.
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-09 00:22:33 +10:00
Damien George
3564ce5bd8 alif/ospi_flash: Don't invalidate cache after erasing/writing.
It's not needed, the MPU configures the XIP as non-cacheable.

Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:33 +10:00
Damien George
737acef5cb alif: Support more fine-grained pin alternate function selection.
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-09 00:22:33 +10:00
Damien George
29a873ec07 alif/machine_uart: Add machine.UART peripheral support.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
293e8db9d7 alif/mpuart: Enhance UART to support bits/parity/stop and more IRQs.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
iabdalkader
19a4689c6b alif/mcu: Pre-process Alif ToC config file.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
da46b4d708 alif/mcu: Remove json config files.
They will be generated as part of the build.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
Damien George
30dfbe5dc0 alif: Integrate cyw43 Bluetooth with NimBLE.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
d6e33423da alif: Integrate cyw43 WLAN driver.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
526c7eabce alif: Integrate lwIP and mbedTLS.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
411146b0ed alif/mpuart: Generalise UART driver to suppot all UART instances.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
4f2a8bd99f alif/mphalport: Add mp_hal_pin_config_irq_falling helper.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
d1b12cb676 alif/modules: Make HE core set /rom as current dir.
This allows HE to execute code from the ROMFS in MRAM.

Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
8297c95c22 alif/vfs_rom_ioctl: Add vfs_rom_ioctl with support for OSPI and MRAM.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
f83f6e7eed alif/mpu: Add function to set read-only bit on MRAM MPU region.
To allow writing to MRAM region.

Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
d895a62b07 alif/alif_flash: Make flash respond to the buffer protocol.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
af574a86c2 alif/alif_flash: Distinguish between total flash size and FS size.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
ca3d50a096 alif/mpuart: Use mp_hal_pin_config for TX/RX configuration.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
Damien George
7e32c23218 alif/mpmetalport: Only notify after metal subsystem is init'd.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
iabdalkader
68b1dae011 alif: Link with libnosys.
This allows the correct start up functions to be called by the stdlib.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
182b5f3a12 alif/mpmetalport: Use MHU to notify remote cores.
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-09 00:22:32 +10:00
iabdalkader
b9e5f1ffba alif/se_services: Add a secondary MHU channel.
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>
2025-04-09 00:22:32 +10:00
iabdalkader
facd0b7190 alif/ospi_flash: Use mp_hal_pin_config to configure OSPI pins.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
ec92bcfeff alif/machine_rtc: Add basic machine.RTC support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
280e6e2a40 alif/machine_spi: Add machine.SPI peripheral support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00
iabdalkader
9073270c2e alif/machine_i2c: Add machine.I2C peripheral support.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
82bae652eb alif: Add support for pin alternate function selection.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
039df0c884 alif/modmachine: Implement proper low-power modes.
Lightsleep current is around 23mA.  Deepsleep current is sub 50uA.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
ff6ed730c5 alif/se_services: Use EUI extension for unique id.
The right service call to get UID is SERVICES_system_get_eui_extension
which returns an 8 bytes UID.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
92f056d58f alif/ospi_flash: Add 16-bit words swap flash setting.
The byte order (endianness) seems to be swapped when read in 8D-8D-8D in
XIP mode, for most flashes, with the exception of MX which seems to swap
half-words.

This commit adds a flash setting to allow parts to enable half-word swap
when data is written, to fix this issue.  By default, only endianness is
fixed.

Tested with both MX and ISSI parts on AE3, flash test and simple file
write/read.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
602bc86b6d alif/ospi_flash: Use OSPI in XIP mode only.
The OSPI controller supports concurrent direct/XIP accesses, there's no
need to disable XIP on direct access.  In addition to improving the
performance, this change lays the groundwork for supporting access by
the HP and HE cores simultaneously.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
df06bf91a5 alif/ospi_ext: Optimize XIP speed.
This change increases XIP read speed to ~30Mbytes/s at 50MHz DDR:
- Enable continuous mode.
- Remove hard-coded settings.
- Set XIP continuous mode timeout.

The prefetch remains disabled.  Although enabling the prefetch gives the
best performance for the CPU in XIP mode, it must be disabled when the NPU
accesses the OSPI flash.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
0709936653 alif/ospi_flash: Enable pull-up IO2/WP.
Leaving this pin low in combination with the default EM settings enables
flash protection for the EM flash.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
872f3d70d3 alif/ospi_flash: Add negative clock pin.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
8807f8d01b alif/ospi_flash: Configure dummy cycles.
The default dummy cycles may not match the actual flash frequency supported
by a certain board.  For example, the MX chip uses 20 dummy cycles by
default which supports up to 200MHz DDR, but the maximum frequency
supported by the AE3 board is 50MHz DDR.  So the dummy cycles for this
board can be as low as 6.  It's important to set the correct dummy cycles,
as it results in doubling the XIP read speed, in the case of the AE3 board.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
aec030004f alif/ospi_flash: Support flash device auto-detection in runtime.
This commit enables detecting the flash device in runtime, and uses the
settings of the detected device instead of board-defined flash settings.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
1585080ff0 alif/ospi_flash: Fix XIP for 8-bit instructions (ISSI).
Disable XIP instruction DDR for 8-bit instructions.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
5152a1f04d alif/mpmetalport: Add Open-AMP MPU region.
Define an MPU region for Open-AMP and remove hard-coded attribute.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
iabdalkader
3d17f63478 alif/mpu: Define constants for MPU regions.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-04-09 00:22:32 +10:00
Damien George
41e16886b1 alif/ospi_flash: Enter XIP mode when flash is idle.
Signed-off-by: Damien George <damien@micropython.org>
2025-04-09 00:22:32 +10:00