# EG4 12000XP inverter com MCU firmware: Reimplementing the EG4 12000XP inverter communications firmware from the factory image

> Source: <https://reversedwithai.com/p/eg4-inverter-com-mcu-firmware-claude>
> Published: 2026-11-10 08:56:57+00:00

## Evidence at a glance

Based on the linked sources. The author's reported result and independent confirmation are separate checks.

- AI involvement
- Reported models: Claude Opus 4.8. Tools: Unicorn, GCC (ARM), Python. The writeup below describes the work attributed to AI.
- Reported result
- Research. This is the directory's source-based outcome classification.
- Independent confirmation
- Not reported.
- Human work and limitations
- The repository owner is jsharkey. The README carries a prominent warning not to flash the firmware onto a physical inverter: it is described as experimental, not feature-complete, not safety-reviewed and not tested on hardware. For now it lives only in the emulator and host tests.

### Original sources

## What was done

Claude has authored the commits of an open firmware for the communications MCU of EG4 and Luxpower solar inverters. The factory binary is used as a behavioural oracle in a Unicorn-based test harness, and the code is not meant to be flashed yet.

EG4 and Luxpower all-in-one inverters contain several processors, and this project reimplements only one of them: the ARM com MCU (STM32F103VE class) that handles communications, the display, supervision and relays. The real-time DSP, the safety CPU and the MPPT controller are left alone. The target is the EG4 12000XP, with the 18kPV and 6000XP planned because they run the same com-MCU codebase.

The approach described in the README treats the factory image as a specification, never as source to copy. One Unicorn emulator runs both the factory binary and the new C firmware against the same black-box tests covering GPIO, relays, the HMI, Modbus and the ARM to DSP configuration push, so agreement with the factory image is a passing test. The goal is functional equivalence, not byte-identical output, since the factory build used Keil armcc and this one uses GCC. The README also shows the real HMI drawn by the factory code in the emulator next to the new firmware's own menu engine on the same simulated panel, and a block diagram that identifies six processors across the inverter, battery and datalogger.

Sixty of the last 67 commits are authored as Claude, and 40 carry a Claude Opus 4.8 trailer. The repository has a CLAUDE.md.

## Reproduce it

Run make factory-hmi and make hmi-sim to see the factory HMI and the new HMI in the Unicorn harness. Running the factory-image comparison needs the user's own copy of the factory firmware; the repository does not describe shipping one.

## Community

Ask a question, share what worked, or follow the next milestone.

[Your library](https://reversedwithai.com/library)
