"MCL" (Micropython Compatibility Layer) library allowing inclusion of Micropython code targeting MCUs within CPython. Made for RISC-V based RP2350 GPIO Expansion Card for Framework Laptops. Works well with any MCU that supports Micropython connected to RISC-V, ARM and X86 PCs.
Clone the repository:
git clone https://github.com/semitov/SemiTOV-MCL.gitSync the project (creates virtual environment and installs dependencies):
cd SemiTOV-MCL
uv syncInstall the package:
uv pip install -e .uv run examples/<script_name.py>from mcl import Boardboard = Board("/dev/ttyACM0", 115200)
board.add_import("machine")
board.add_from_import("machine", "Pin")led = board.set_variable("led", "Pin(10, Pin.OUT)")
led.value(1) # Use itAfter creating (or setting) a variable you will be able to use it as a normal one.
Run tests:
uv run pytestIn order to contribute, first check the opened issues and choose one. All the new code that fixes something or implements a new feature must be pushed on a new branch with the name of the issue that is fixing. Only after it will be merged into the develop branch. DO NOT PUSH ON THE MASTER BRANCH. If you want to push new code and no issue match with it, create a new one first.