Amps <- & -> Embedded
The fading Larson scanner that began this series, run from Zephyr's main thread with the hardware PWM and sigma-delta channels doing the dimming. It fits, with 164 bytes to spare, and it runs on the board.
Zephyr 4.5.0 built against the port with no changes and ran on the board. The image was 516 bytes bigger, and bisecting 11,492 commits found where they went.
Zephyr ticked for hours, and a press of the reset button killed it. Four wrong guesses later, the answer was 36 bytes of initialised data that a restart never reloaded.
A Zephyr image went from 15,696 to 10,880 bytes of RAM. Most of it came from reading the memory report, and the biggest single saving was from one 64-bit divide.
k_msleep(500) needs a counter, a compare, an interrupt and a way to wait. The core had all four, and the board says the sleep is 501 milliseconds, not 500.
The Hello ran on the real board at the first try. Whether it boots from power-up was a separate question, and the answer needed care because of what block RAM does in its first microseconds.
A 78-line serial driver, a one-line sample, and the question of how to trust a simulated 'Hello' when the simulator that checks it is the one that predicted it.
Zephyr's smallest sample did not fit in 8 KB, so the RAM doubled to every block RAM on the chip. The hardware change was easy. The build tool ran out of memory.
Every file compiled, then the linker said 'i' and 'e' do not mix. The fix was one line that claims an instruction the core traps, and the question is what that line is worth.
A memory map defined once in a Python file feeds the hardware, the simulator, the test programs, the C build and now Zephyr's device tree. What that does and does not guarantee.