Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pymcu-arm

ARM (Cortex-M) support for the PyMCU compiler: LLVM-IR codegen backend + LLVM toolchain driver.

Unlike the AVR/PIC/RISC-V backends, this backend does not emit assembly directly. It lowers PyMCU's architecture-agnostic IR (.mir) to LLVM IR text (.ll) and hands it to LLVM — so register allocation, instruction selection, the AAPCS calling convention, and all optimization passes are done by LLVM.

Currently supported targets:

Target Triple CPU
RP2040 (Raspberry Pi Pico / Pico W) thumbv6m-none-eabi cortex-m0plus
RP2350 (Raspberry Pi Pico 2 / Pico 2 W) thumbv8m.main-none-eabi cortex-m33

The codegen is chip-agnostic: only -mtriple/-mcpu change per target.

Pipeline

pymcuc --emit-ir        →  firmware.mir    (target-agnostic IR, 32-bit pointers)
pymcuc-arm (this pkg)   →  firmware.ll     (LLVM IR text)
LLVM toolchain          →  opt → llc → ld.lld → llvm-objcopy
                            + generic boot2 (crc32) + crt0  →  firmware.bin
UF2 packer              →  firmware.bin    →  firmware.uf2  (BOOTSEL image)

The flat flash image (firmware.bin, boot2 at offset 0) is what the RP2040Sharp emulator's PicoSimulation.LoadFlash(...) consumes in the integration tests. firmware.uf2 is the same image in UF2 form (family 0xe48bff56 on RP2040, 0xe48bff59 on RP2350) — it is what pymcu flash uploads with picotool or by drag-and-drop onto the RPI-RP2 volume.

Installation

pip install pymcu-arm

LLVM tools are resolved (in order) from the pymcu-arm-toolchain wheel cache, common system install paths (/opt/homebrew/opt/llvm/bin, /usr/lib/llvm/bin), or PATH. A system LLVM (brew install llvm lld / apt install llvm lld) also works with no extra package.

Layout

src/python/pymcu/backend/rp2040/    backend plugin — wraps pymcuc-arm
src/python/pymcu/toolchain/rp2040/  LLVM toolchain driver (opt → firmware.bin)
src/csharp/lib/                     Rp2040BackendProvider + Targets/RP2040/Rp2040LlvmCodeGen
src/csharp/cli/                     pymcuc-arm runner CLI
src/python/pymcu/programmer/rp2040/ UF2/picotool flash programmer plugin
src/runtime/                        boot2 (crc32), crt0 / crt0_m33, picobin block, rp2040.ld / rp2350.ld

Status

Alpha. Single-core (core0). GPIO, UART0, SPI, I2C, ADC, PWM, DMA, PIO. Exceptions (portable T-flag model), f32 (RP2040 via the bootrom fast-float library, RP2350 via the M33 FPU in softfp mode), operand-form inline asm. No GC yet.

Metadata

Release files for pymcu-arm 0.1.0a6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pymcu-arm 0.1.0a6
File
pymcu_arm-0.1.0a6-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
pymcu_arm-0.1.0a6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details
pymcu_arm-0.1.0a6-py3-none-macosx_26_0_arm64.whl Python 3 none macOS 26.0+ ARM64 Details
pymcu_arm-0.1.0a6-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details

Total release size: 11.7 MB

Release files / pymcu_arm-0.1.0a6-py3-none-win_arm64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-win_arm64.whl
Size 1.8 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
3e9f2a3193bf45c142c5f6293c7f4da768c99959c8d8279d3108d885d37d67be
BLAKE2b-256 checksum
How to use checksums
2e94a5e8638985ead769ed9e581c645b51fa5869948a186e0aecc2e6a7ca749a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymcu_arm-0.1.0a6-py3-none-win_amd64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-win_amd64.whl
Size 1.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2eff7e977a579f0ac23aa48b1352bec7ffcdc0dd3111a41c85c49cdca40e4bb2
BLAKE2b-256 checksum
How to use checksums
c546b11c5d6c16feda007ce2bc529a98dc169dbb3bc7dcf6c0c8318d69e85278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_x86_64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_x86_64.whl
Size 2.1 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
fc7f3c0d909b1456e17f4787dd61c189bdb4938e30f9021fc9c6d4ef06d6dbae
BLAKE2b-256 checksum
How to use checksums
7c19c0b64718c5e70c9bf137ec42e784da65171ae2c7d70eaf48726fcd69a5f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_aarch64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
27c35bdbcec2956a6a87662251184ce824fc72fc3f1cb64d7db217f189d32dcd
BLAKE2b-256 checksum
How to use checksums
302547bfaad81eda02556d7d6a3091bc1fa0b463d673d1ed8963c9f220fa3524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymcu_arm-0.1.0a6-py3-none-macosx_26_0_arm64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-macosx_26_0_arm64.whl
Size 1.9 MB
Tags Python 3 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
2c040244423682e7bcaf7a5ced6af532f9186daf8f84965ab45270469b80bee8
BLAKE2b-256 checksum
How to use checksums
77ab4ba1d861b7a6d849dbc2919fb65d0d187d6df2cffc900de9626e008f9f0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymcu_arm-0.1.0a6-py3-none-macosx_13_0_x86_64.whl

Download URL pymcu_arm-0.1.0a6-py3-none-macosx_13_0_x86_64.whl
Size 2.1 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
a3f630d27287234be048490b7d5719fdf580d37603f40b55e6bdde3f34898335
BLAKE2b-256 checksum
How to use checksums
2b26e01d2ff0ed9e90bec7cd32030fcd7e713ca532bd9b130d8bed56191d2145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pymcu-arm 0.1.0a6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page