Skip to main content

PIC support for pymcu-compiler: codegen backend (PIC12/PIC14/PIC18) + gputils toolchain driver

Project description

pymcu-pic

PIC support for PyMCU: codegen backend (PIC12 baseline, PIC14/16F mid-range, PIC18F) plus the gputils toolchain driver (gpasm/gplink), in a single package.

Layout

src/csharp/lib/    PyMCU.Backend.PIC — PIC12/PIC14/PIC18 codegens + PicBackendProvider
src/csharp/cli/    pymcuc-pic — AOT-compiled backend runner (.mir -> .asm)
src/python/pymcu/backend/pic/    pymcu.backends entry-point plugin (wraps pymcuc-pic)
src/python/pymcu/toolchain/pic/  pymcu.toolchains entry-point plugin (gputils)
tests/unit/        xUnit codegen tests (need the PyMCU monorepo checked out as a sibling)
tests/integration/ NUnit tests that run real firmware on the PicSharp emulator
examples/blink/    Reference example: LED on RB0, PIC16F877A @ 20 MHz

Prerequisites

  • .NET 10 SDK
  • The PyMCU monorepo checked out as a sibling directory (../PyMCU) — the C# projects reference pymcu-sdk by relative path.
  • PicSharp checked out as a sibling (../PicSharp) for the integration tests.
  • gputils (brew install gputils / apt install gputils) for assembling (auto-downloaded and compiled on first use otherwise).

Build

dotnet build src/csharp/lib/PyMCU.Backend.PIC.csproj
dotnet publish src/csharp/cli/PyMCU.Backend.PIC.Cli.csproj -c Release -o build/bin --nologo

Install into a PyMCU dev venv (registers the pymcu.backends/pymcu.toolchains entry points so pymcu build discovers the PIC backend):

uv pip install --no-deps -e .

Tests

# Codegen unit tests (xUnit)
dotnet test tests/unit/PyMCU.PIC.UnitTests.csproj

# Emulator integration tests (NUnit + PicSharp.TestKit)
dotnet test tests/integration/PyMCU.IntegrationTests.csproj

The integration tests compile examples/* with the pymcu driver from the sibling monorepo venv (.venv symlink at the repo root) and run the resulting HEX on a simulated PIC16F877A at 20 MHz.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymcu_pic-0.1.0a3.post0-py3-none-win_arm64.whl (2.2 MB view details)

Uploaded Python 3Windows ARM64

pymcu_pic-0.1.0a3.post0-py3-none-win_amd64.whl (2.3 MB view details)

Uploaded Python 3Windows x86-64

pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_x86_64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

pymcu_pic-0.1.0a3.post0-py3-none-macosx_26_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

pymcu_pic-0.1.0a3.post0-py3-none-macosx_13_0_x86_64.whl (2.5 MB view details)

Uploaded Python 3macOS 13.0+ x86-64

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-win_arm64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 5dbb3304e3a0d549fae04d401f40b2d4e955d90ed763c6f3b96d5a30aee6d1fe
MD5 d19683d11c4a432c12fbaa7c8b199664
BLAKE2b-256 8383344689fb528801d684d2e56b8fc1b5323ef83df1c02d6908557901b97d92

See more details on using hashes here.

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-win_amd64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e1556bc99dada6bce40a3a0a247f273ed35eb3d1a711504fcc5df2bc45e434f2
MD5 5506c9147840915c69e90422a27e2067
BLAKE2b-256 3a898651ed97e54b8704284d97e213c242dd0a507a9563a9bf0837718db76fd4

See more details on using hashes here.

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e747eebb888cfe30d0811acd9a98c6d409cc64165f524fbdc604a84c803941b
MD5 fe81ec854d4e7080303e4f3fb39f6cc0
BLAKE2b-256 39858344ad40802a5c3ac2981a82050d810fc965f24503ea1ca3e71634384d96

See more details on using hashes here.

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c607207d87e9751642f60552cb959ff5a3a4205c49908bd8496162717d3e40d5
MD5 6afb3ca07ef93354d55d6f7521a5da88
BLAKE2b-256 506874dbd0c6a92d997fde7ce11e4fa0e575d49bc8e851b1137e08cdd0719b84

See more details on using hashes here.

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-macosx_26_0_arm64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-macosx_26_0_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, macOS 26.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 02d100d2efad9f94ca169e245b002de44700f27066c19f4cd58f6b6b2c9b1b8a
MD5 6bea362087a706897eab28b2a352b9e3
BLAKE2b-256 555d19542c399b6a6c89ed7e2ad70bd70aa19b9285ecd376bdb7c1eb620aaa82

See more details on using hashes here.

File details

Details for the file pymcu_pic-0.1.0a3.post0-py3-none-macosx_13_0_x86_64.whl.

File metadata

  • Download URL: pymcu_pic-0.1.0a3.post0-py3-none-macosx_13_0_x86_64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, macOS 13.0+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for pymcu_pic-0.1.0a3.post0-py3-none-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f500bcea7e008e094af8dbc55f3c9299109cad92a09ef216706e1d6794c97c13
MD5 8f7a8369717dcc711913eb2643ba7426
BLAKE2b-256 d78dabc25bf39a0bf4e2268776bef2f363c2a473e0d40f290873726a4e45575a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page