Selected engineering work · embedded systems

Deterministic embedded execution across phone, MCU, and replay

One small decision kernel, multiple execution environments, and a measurement contract that makes equivalence testable.

HomeRepository

The problem

Moving logic from a higher-level application environment to a microcontroller can create a subtle verification gap: the implementation may be "the same" conceptually while producing different decisions under real inputs.

The architecture

The project isolates the decision logic in allocation-free C99. The same source is called from a phone shadow path, compiled for microcontroller targets, and linked into an offline replay harness. Platform-specific I/O stays outside the kernel.

Verification

Recorded field traces provide exact input sequences for replay. Cross-architecture CI and hardware-in-the-loop tests compare the outputs produced by different builds and targets. The result is an explicit execution-equivalence check rather than a claim based on source similarity.

Why it matters

The broader pattern is useful whenever performance or deployment requires moving a workload across execution environments: freeze the input, keep a reference path, separate platform adapters from core computation, and compare outputs while measuring the target.