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
PyMCUmonorepo checked out as a sibling directory (../PyMCU) — the C# projects referencepymcu-sdkby 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-win_arm64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62fa0a55691c9d4309e2e105c49540dd188ad26af02c63778eaabcbd7633d6cf
|
|
| MD5 |
1eef344b08523edab7a5bb411619496c
|
|
| BLAKE2b-256 |
06872daa7ad634e6a77dec883e1972c6fb41e79260ef209598ecad60c4249ce4
|
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-win_amd64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a98770baf0e823de70f25f34801ddfe5e0a08f30de8d9c4124a1e82bd189fb
|
|
| MD5 |
10f39beb9a4ec05873241a85f3b36f84
|
|
| BLAKE2b-256 |
3eac15f2fb4d660ddb7c67f735d52f9c1aaab7ac9c405c28fd0a8892e23528a0
|
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03454aa3f3c36966e830247c7e6bef8c1a526c35f3a5f028caf529517b41f94b
|
|
| MD5 |
1e0ec2067f01a5fae001abf2317962f0
|
|
| BLAKE2b-256 |
05d43fc06045b69dafca6f74025d1f355eeffe6404916872c843a7aefb6d8c2d
|
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f506410e88dc6e2115bc6edcbc060241e4ef7c5641e072a1e034a87be6c4843
|
|
| MD5 |
71d9780b267459d715047ed9717d00ce
|
|
| BLAKE2b-256 |
29702a25ed65c24ccc7f328e5727b287d091a59fe99dbebc84c491c1d9f96eb6
|
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-macosx_26_0_arm64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9af7955c93e23eeddda16ecf3bfde07ebcd1ed4b6841647b207308707e2ca92
|
|
| MD5 |
703f41765507d625c6da45d9090fe1d8
|
|
| BLAKE2b-256 |
08a1f4b2a8ee0fcf79d0ff38e4ebb26a5ad95a50f84d521c669b313761704647
|
File details
Details for the file pymcu_pic-0.1.0a3-py3-none-macosx_13_0_x86_64.whl.
File metadata
- Download URL: pymcu_pic-0.1.0a3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7abbf7b40b6fae85c99385b592fbd908eedbbcc7330222c1b1c1837568f0a54
|
|
| MD5 |
21f63bf25ee5c73aef863bfa19a57817
|
|
| BLAKE2b-256 |
837c20a96c544921f79ef30d39297d7230c7633bf873a5ebb0022f8ace4825b0
|