Firmware first: 24 commits before the board had a layout
In the Atmos One log, three firmware branches were written side by side in the first 37 minutes and merged in one second once the board was routed. Two of them were tested on a computer, one against a fake bus. What made that possible, and what it has not proved.
The usual order for a hardware product is board first. You design it, wait for it, and start on the firmware when something is on the desk to run it on. Weeks can pass between the two.
The commit log of [Atmos One](#/story/atmos-one) runs the other way. In its first 37 minutes there are 24 firmware commits. The schematics arrive at minute 36. The main board is routed at 1 hour 50 minutes.
The film draws that part of the log as a graph: one main line, and the branches that leave it and come back. Each dot is a commit, and its colour shows which model the commit names as co-author. Times are counted from the first commit.
Interfaces first
Five minutes into the log, one commit sets up the firmware as a skeleton: where each part of the code lives, the header files that say how the parts talk to each other, and a test harness that runs on an ordinary computer.
There is almost no behaviour in it. What it fixes is the borders. One header describes a sensor bus without saying what is on the other end. Another describes everything the screen and the network are allowed to ask of the rest of the device.
Once the borders are fixed, the parts can be written without waiting for each other.
Three branches, side by side

Half a minute after the skeleton, a second commit adds the network part's interface. From that commit the log splits into three branches.
| Branch | Commits | What is in it | Co-author named | | --- | --- | --- | --- | | Network | 7 | Wi-Fi setup, the web page and its API, firmware update | Claude Fable 5.2 | | Core | 9 | History, events, advice, settings, the sound-level maths | Claude Opus 5.5 | | Drivers | 6 | The air, pressure and light sensors, the touch controller | Claude Opus 5.5 |
The commit times interleave. All 22 commits fall inside 24 minutes, and the last one lands 48 seconds after the schematics.
How do you test a driver with no sensor?
The drivers are written against that bus header, and the test harness supplies a fake bus: a script of the bytes a real chip would send back. The driver cannot tell the difference. If it asks the wrong question, or reads the answer wrongly, a test fails.
The core is written as plain C that uses nothing from the chip maker's software kit, so it compiles for a laptop as easily as for the device.
At the release, the project's ledger counts 97 test cases in 13 programs for this portable part, run with two error checkers switched on, one for memory errors and one for undefined behaviour.
One second

Then the firmware branches go quiet for 73 minutes, while the main line produces the board. Four minutes after the board is routed, the three branches are merged. The three merge commits carry the same timestamp, to the second.
The pin table is generated

Somewhere the firmware has to know that the display's reset line is on pin 4 and the backlight on pin 46. In most projects a person copies that from the schematic into a header file, and sooner or later one line is wrong.
Here the header is generated. One Python file holds the assignment of signals to pins. The schematic generator reads it, and a small script writes the firmware's header from it. The script's own description says why: the two "cannot disagree". A check fails if the header on disk is ever out of date.
Only after that comes the layer that touches real pins: display, backlight, microphone, sensor power. It arrives in a fourth branch of 9 commits, together with the tasks that tie the parts together, and is merged at 2 hours 35 minutes.
A touch screen with no screen

The touch interface was added at 2 hours 46 minutes. It talks to the rest of the firmware through one header, so the same code runs in a simulator on a computer. The simulator feeds it a week of made-up readings, through the real history and event code, and a scripted finger taps its way to every screen.
The pictures in the film are that simulator's output. The project says so itself: "nothing here has been seen on the real panel yet."
What this does not prove
- It has never run on the device. There is no device. The complete image compiles for the chip, at about 1.7 MB, and that is as far as it has gone.
- A fake bus replays what its author believed. If the chip's datasheet was misread, the driver and its fake are wrong in the same way, and the tests still pass.
- Three parts have no tests on the computer. The hardware layer, the network part and the tasks that run the device are built for the chip only. What covers them so far is that the image compiles, and a check that the web pages only ask for addresses the firmware serves. In the hardware layer the code marks eight places with the word BRING-UP, for example the display's orientation and the microphone's clock edge, and the project's notes say [the bring-up plan](#/story/the-first-power-up) covers every one of them.
- The log does not show working time. Commit times say when work was saved, and nothing about what was tried and thrown away before.
What to take from it
- Write the headers between the parts of your firmware before the parts.
- Keep the logic free of chip-specific calls, so it runs on your computer.
- Give every driver a fake bus and a test.
- Generate the pin table from the same source as the schematic. If you cannot, check one against the other with a script.
- Mark every guess about the real hardware where it sits in the code, so the first day with a board has a list.
Firmware written this way is waiting for one thing: a board. [Ten makers asked, six quotes in three minutes](#/story/files-to-quotes-three-minutes) follows this board's files through EIN.