PCB Bring-Up

# Altium firmware simulation.

Altium MixedSim handles SPICE analog waveforms, not compiled MCU code. Import your Altium schematic, PCB, or ODB++ package into CircuitTwin to run real microcontroller firmware on your board layout before ordering prototypes.

[Start now](https://app.circuittwin.ai/try) [KiCad PCB simulation](https://circuittwin.ai/kicad-firmware-simulation)

## Altium MixedSim vs CircuitTwin.

SPICE verifies analog behavior. Digital hardware twins verify the compiled code running across your pins and buses.

| Capability              | Altium MixedSim (SPICE)                                       | CircuitTwin PCB Twin                                           |
| ----------------------- | ------------------------------------------------------------- | -------------------------------------------------------------- |
| Primary purpose         | Analog, power, and small digital subcircuit waveforms (SPICE) | Compiled MCU firmware execution across full board buses        |
| Compiled ELF / HEX code | Not supported for STM32, ESP32, NXP, or Cortex-M firmware     | Runs real STM32CubeIDE, Zephyr, ESP-IDF, and CMake binaries    |
| Schematic & PCB nets    | Native .SchDoc and .PcbDoc authoring                          | Imports Altium .SchDoc, .PcbDoc, ODB++, and IPC-2581 netlists  |
| Peripheral & sensor ICs | SPICE models for discrete and analog parts                    | Generates register-level IC twins from vendor datasheet PDFs   |
| Automated CI testing    | Desktop interactive runs only                                 | Headless ct CLI, GitHub Actions, GitLab CI, and fault matrices |

## From Altium project to running firmware.

Catch pinout swaps, wrong I2C addresses, and peripheral clock bugs before sending Gerbers to fab.

### Export or upload your Altium board

Import your Altium .SchDoc and .PcbDoc files, or export ODB++ or IPC-2581 from Altium Designer. CircuitTwin parses component designators, pinouts, and net connectivity automatically.

`ct board import ./hardware/controller.PcbDoc --out ./board-twin/`

### Generate twins for custom sensors and ICs

Catalog microcontrollers and common transceivers map automatically. For board-specific IMUs, power monitors, ADCs, or flash chips in your BOM, pass the vendor datasheet PDF or SVD file.

`ct twin generate datasheets/ina226.pdf --out ./board-twin/parts/`

### Run your real firmware on the wired board

Execute your compiled ELF or HEX binary against the imported netlist. Catch swapped TX/RX pins, wrong SPI chip-select polarity, missing pull-ups, and bus addressing bugs before sending Gerbers to fabrication.

`ct run --json --board ./board-twin build/firmware.elf --record trace/`

## Importing Altium Designer and EasyEDA PCBs into digital twins

Start testing firmware on your Altium or EasyEDA PCB layout weeks before bare boards return from fab.

Waiting three weeks for SMT assembly before discovering swapped UART TX/RX pins or an inverted SPI chip-select wastes an entire spin.

Import your Altium or EasyEDA layout into CircuitTwin, auto-wire the MCU and sensors from the actual copper nets, and run your compiled bring-up ELF before sending Gerbers to fabrication.

### Pre-fab wiring errors caught by CAD import

| Schematic / PCB mistake            | How twin catches it                               | Spin saved                    |
| ---------------------------------- | ------------------------------------------------- | ----------------------------- |
| Swapped UART TX / RX nets          | Console stays silent or AT modem times out        | Caught before Gerber release  |
| Wrong I2C address strap pin        | Target NACKs expected address (e.g. 0x68 vs 0x69) | Caught on first firmware boot |
| Missing pull-up on open-drain line | Bus stays stuck low during bring-up               | Caught before SMT assembly    |

Shell - import EasyEDA / Altium export

```
ct board import hardware/pcb-export.json --out board.yaml
ct run --json --board board.yaml build/bringup.elf
```

tests/prefab-bringup.suite.yaml

```
version: 1
board: board.yaml
firmware: build/bringup.elf
tests:
  - name: prefab-netlist-and-sensor-ids
    timeout_ms: 2500
    expect:
      console_contains: "ALL_WHOAMI_PASS"
      exit_code: 0
```

### Troubleshooting

| Symptom                              | Fix                                                                                                 |
| ------------------------------------ | --------------------------------------------------------------------------------------------------- |
| Altium binary PcbDoc needs export    | Export ODB++ or IPC-2581 from Altium Designer OutJob for full netlist and component-pin fidelity.   |
| EasyEDA footprint lacks MPN metadata | Include the BOM CSV alongside the EasyEDA JSON so every U-ref resolves to its exact datasheet twin. |

### Can CAD import catch swapped TX/RX or wrong I2C strap pins before ordering PCBs?

Yes. Because CircuitTwin wires peripherals from your actual PCB nets rather than a hand-typed assumption, a swapped net causes immediate firmware failure before fabrication.

## Common questions.

**Can Altium Designer simulate microcontroller firmware?**

Altium Designer includes MixedSim SPICE for analog circuits, power rails, and simple digital gates, but it does not run compiled Arm Cortex-M, RISC-V, or Xtensa microcontroller binaries. To test real firmware on an Altium design, import your Altium schematic, PCB, or ODB++ package into CircuitTwin.

**Which Altium file formats does CircuitTwin accept?**

CircuitTwin imports Altium .SchDoc and .PcbDoc files along with standard manufacturing outputs including ODB++ and IPC-2581, plus KiCad, Eagle, and EasyEDA designs.

**What if my Altium BOM includes sensors or ICs that are not in the catalog?**

Use ct twin generate with the manufacturer datasheet PDF or CMSIS-SVD file to build a register-accurate twin for any missing IC and attach it directly to the imported nets.

**Does CircuitTwin replace SPICE simulation in Altium Designer?**

No. Use Altium MixedSim SPICE for op-amp stability, regulator transient response, and analog signal integrity. Use CircuitTwin to execute compiled firmware, verify pinout wiring, and test UART, SPI, I2C, CAN, and Ethernet protocols before board spin.

## Related guides.

KiCad Firmware Simulation Import KiCad schematics and PCBs to run real microcontroller firmware before fabrication. [Read KiCad guide →](https://circuittwin.ai/kicad-firmware-simulation)

Test Firmware Without Hardware Set up deterministic hardware-free CI across STM32, ESP32, RP2040, and custom boards. [Read CI guide →](https://circuittwin.ai/test-firmware-without-hardware)

CAN Bus Firmware Simulator Verify multi-ECU CAN and CAN FD wiring, DBC frames, and bus-off recovery. [Explore CAN sim →](https://circuittwin.ai/can-bus-firmware-simulator)

How CircuitTwin Works Walk through datasheet twin generation, multi-board wiring, and silicon calibration. [Read overview →](https://circuittwin.ai/how-it-works)
