Pre-Release v0.1.0a1
Pre-release
Pre-release
pymcu-arm 0.1.0a1 — Pre-Release
First public pre-release of pymcu-arm, the ARM (Cortex-M) backend for the
PyMCU compiler.
This release was formerly distributed as pymcu-rp2040. The package has been
renamed to reflect its scope: the backend targets the ARM Cortex-M architecture,
with the RP2040 as the first supported chip.
What's included
| Component | Description |
|---|---|
pymcuc-arm |
AOT-compiled .NET 10 binary — lowers PyMCU IR to LLVM IR |
Rp2040BackendPlugin |
Backend entry-point registered under pymcu.backends → rp2040 |
Rp2040ToolchainPlugin |
Toolchain driver registered under pymcu.toolchains → rp2040 |
Rp2040LlvmToolchain |
Resolves opt, llc, llvm-mc, ld.lld, llvm-objcopy via pymcu-arm-toolchain or system LLVM |
Supported targets
| Chip | Triple | CPU | Status |
|---|---|---|---|
| RP2040 (Raspberry Pi Pico) | thumbv6m-none-eabi |
cortex-m0plus |
✅ |
Compilation pipeline
PyMCU source (.py)
→ pymcuc (frontend + IR)
→ pymcuc-arm (LLVM IR)
→ opt (LLVM optimiser, -O2)
→ llc (LLVM → ARM Thumb2 assembly)
→ llvm-mc (assembly → ELF object)
→ ld.lld (linker → ELF)
→ llvm-objcopy (ELF → flat binary / UF2)
Installation
pip install pymcu-arm==0.1.0a1pymcu-arm-toolchain (LLVM 22.1.7) is declared as a platform-gated dependency
and is pulled in automatically on supported platforms (linux-x64, linux-arm64,
macos-arm64, windows-x64). On first use the toolchain stub auto-downloads the
LLVM binaries (~300 MB) into ~/.pymcu/tools/.
# Verify the toolchain resolved correctly
python -m pymcu_arm_toolchain statusLanguage features (RP2040)
- Blink / GPIO —
machine.Pinoutput, toggle, value read - UART —
machine.UARTtransmit and echo - MicroPython compatibility layer —
pymcu-micropythonstub mapped tomachine.* - CircuitPython compatibility layer —
pymcu-circuitpythonstub mapped todigitalio.*/busio.UART - Function pruning — unreachable functions stripped from codegen output
- Concurrent build safety —
Lazy<T>compiler guard prevents OOM under parallel test runs
Test status
6 integration tests pass against the RP2040Sharp simulator (blink + UART echo, both MicroPython and CircuitPython compat layers).
Known limitations
- Alpha quality — API and IR format may change between pre-releases.
- Only the RP2040 target is currently exercised; other Cortex-M0+ chips may
work but are untested. - The
pymcuc-armbinary is built per-platform at release time; wheels are
published to GitHub Releases (too large for PyPI).
What changed from pymcu-rp2040
- Package renamed
pymcu-rp2040→pymcu-arm - Python module remains at
pymcu.backend.rp2040/pymcu.toolchain.rp2040
(chip-level paths are stable). - Binary renamed
pymcuc-rp2040→pymcuc-arm - Toolchain dependency renamed
pymcu-rp2040-toolchain→pymcu-arm-toolchain
(LLVM 22.1.7, now wired as a runtime dependency) - CI migrated from a private Docker runner to GitHub-hosted runners
- Publish workflow uses OIDC trusted publishing (no stored PyPI token)