Skip to content

The MCode toolchain ​

MCode is a language for describing circuits. This page is the map: what each piece is, what it does for you, and the order things happen in.

The layers ​

your circuit (.mc source)
        |
        v
  mcc  -- the compiler: check, build, export, simulate
        |
        +--> mcode   the basic library (passives, sources, standard interfaces)
        +--> mcfam   abstract component families (the shapes: LDO, buck, op-amp, transceiver)
        +--> mcaps   recipes (the behavior: what an LDO must satisfy)
        +--> mcparts real device packs (the parts themselves)
        |
        v
  tools: the command line, the editor extension, the MCode Bench workbench

Four open repositories carry the layers: mcc is the compiler, mcfam the abstract families, mcaps the recipes, and mcparts the device packs. The basic library ships with the compiler.

What the compiler does for you ​

CommandWhat you get
mcc checkSyntax and semantic diagnostics — the green/red gate before anything else
mcc buildA manifest-driven build: loads dependencies, runs both passes, produces the circuit
mcc export netlist / bom / spiceThe same circuit in the format the next tool wants
mcc run / mcc simA readout of what the circuit does — a measurement, never a verdict
mcc libInstall and inspect libraries; versions are pinned, not "latest"
mcc matrixThe submission matrix: every candidate judged against one set of claims

A design is checked, then built. A built circuit can be exported, simulated, and compared against others. Nothing in the chain requires you to leave the command line — the editor extension and the workbench drive the same compiler.

Libraries: four kinds, one rule ​

KindWhat it gives youExample
Basic libraryThe parts every design needsRES, CAP, LED, DC.SRC, GPIO, I2C
Abstract familyThe shape of a part, with no vendor attachedLDO, DCDC, XCVR.CAN
RecipeThe behavior a part must satisfyDEV.PWR.LDO
Device packA real, specific partsgm2019, mcp2551

A design declares the family it means; the device pack is what you choose later. Pin your versions. A library is named name@version, and a bare name is refused when several versions are installed — the compiler will not pick one for you.

From a line of source to a picture ​

bash
mcc check main.mc          # diagnostics first
mcc build main.mc         # the circuit
mcc export bom main.mc    # the parts, with values

mcc check is the gate: it names what is wrong and where. Run it before you build, and the build stays boring.

What is not open ​

Some capabilities are not open source: the MCode Bench product itself, the value side of the device data, and the authorization that decides what a given caller may read. Those are reached through one door — the MCode gateway. Nothing on this site links around it, and nothing here ships a closed binary.

Where to go next ​

MCode Bench is the public face of the MCode stack. Closed capabilities are served through the MCode gateway.