From a39a3c7f46a8fcba0d97130a052cc13e14e555ec Mon Sep 17 00:00:00 2001 From: BlackMark Date: Wed, 22 Jul 2026 17:08:24 +0200 Subject: [PATCH] docs: correct the size figures for the configured variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The headline numbers described the stock deployments but claimed "every configured variant of them", which the matrix contradicts: choosing the software UART where the chip has a USART costs 8-46 B, so the megas reach 460-462 rather than 452, and the 1284s' software-serial build is 546 B — inside their 1 KiB boot sector, but not inside 512. Also names the actual tightest chip. The 1284 looks like it at 506, but it deploys in 1 KiB with 478 B spare; against its own budget the ATmega328P has the least room, 50 B. Co-Authored-By: Claude Opus 4.8 (1M context) --- pureboot/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pureboot/README.md b/pureboot/README.md index cdf0b16..3b462b8 100644 --- a/pureboot/README.md +++ b/pureboot/README.md @@ -4,12 +4,17 @@ A serial bootloader on [libavr](https://git.blackmark.me/avr/libavr), pure by constraint: one C++ source, no inline assembly, no global register variables (attributes and compiler flags allowed), built for **every chip libavr targets — all 37 — in 512 bytes each**: 434 B on the tiny13s, 438–442 B on -the tiny25/45/85, 412–452 B across the megas and every configured variant of -them, and 506 B on the ATmega1284/1284P, whose far-flash machinery (ELPM -reads, RAMPZ page commands, word-addressed wire) is the heaviest. The 1284s -are the tight case: the loop-placement attributes on the byte streamers +the tiny25/45/85, 412–452 B across the megas, and 506 B on the +ATmega1284/1284P, whose far-flash machinery (ELPM reads, RAMPZ page commands, +word-addressed wire) is the heaviest. Those are the stock deployments; +choosing the software UART where the chip has a USART costs 8–46 B more (a +bit-bang against a peripheral), which every chip still absorbs inside its +slot — on the 1284s that means their 1 KiB boot sector, where the +software-serial image lands at 546 B. Bringing the 1284's default build +under 512 at all is what the loop-placement attributes on the byte streamers (`pureboot.cpp`) and the codegen flags on the loader TU (`CMakeLists.txt`) -are what carry that build under the line. Clock, baud, serial backend and +are for; measured against each chip's own budget the tightest is the +ATmega328P, 50 B spare. Clock, baud, serial backend and pins are per-build configuration (below); the size matrix in the test suite holds every combination inside its slot. The device speaks primitives; every composite — verify, erase, reset-vector surgery, updating the loader itself —