Files
micropython/ports/alif
iabdalkader 16f9d7fdc3
Some checks failed
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
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
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (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
alif/machine_spi: Improve transfer function to poll events.
Poll events during SPI transfer (USB fails during long transfers
otherwise).  And add a timeout for the blocking transfer.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2025-07-03 21:43:10 +10:00
..
2025-04-09 00:22:32 +10:00
2025-04-09 00:22:32 +10:00
2025-04-09 00:22:32 +10:00
2025-04-09 00:22:32 +10:00

MicroPython port to Alif Ensemble MCUs

This is a port of MicroPython to the Alif Ensemble series of microcontrollers.

Initial development of this Alif port was sponsored by OpenMV LLC.

Features currently supported:

  • UART REPL.
  • TinyUSB with CDC and MSC device support.
  • Octal SPI flash with XIP mode.
  • machine.Pin support with named pins.
  • machine.UART, machine.SPI, machine.I2C, machine.RTC peripherals.
  • WiFi and Bluetooth using cyw43.
  • Dual core support of the HE and HP cores using Open-AMP.
  • Low power modes.

The following more advanced features will follow later:

  • Ethernet support.
  • SDRAM support.
  • Other machine modules.

Build instructions

Before building the firmware for a given board the MicroPython cross-compiler must be built; it will be used to pre-compile some of the built-in scripts to bytecode. The cross-compiler is built and run on the host machine, using:

$ make -C mpy-cross

This command should be executed from the root directory of this repository. All other commands below should be executed from the ports/alif/ directory.

An ARM compiler is required for the build, along with the associated binary utilities. The recommended toolchain version to use with this port is Arm GNU toolchain version 13.3.Rel1. The compiler can be changed using the CROSS_COMPILE variable when invoking make.

Next, the board to build must be selected. The default board is ALIF_ENSEMBLE but any of the names of the subdirectories in the boards/ directory is valid. The board name must be passed as the argument to BOARD= when invoking make.

All boards require certain submodules to be obtained before they can be built. The correct set of submodules can be initialised using (with ALIF_ENSEMBLE as an example of the selected board):

make BOARD=ALIF_ENSEMBLE submodules

Then to build the board's firmware run:

make BOARD=ALIF_ENSEMBLE

The above command should produce binary images in the build-ALIF_ENSEMBLE/ subdirectory (or the equivalent directory for the board specified).

Update the SE Firmware

The SE firmware must be updated before flashing the main firmware to match the version used by MicroPython. This step only needs to be performed once. Connect the board to your PC via the SE UART USB port (on the Ensemble kit, this is labeled PRG USB), then run:

make update-system-package

Note: The board must be power-cycled after this step.

Deploy MicroPython

To flash the firmware, run:

make BOARD=ALIF_ENSEMBLE deploy