From b7d082ff116f65709912e76767b02620125a9bf1 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Tue, 21 Jul 2026 16:48:46 +0200 Subject: [PATCH] pureboot: correct the 1284P deployment profiles in the README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deployment section claimed the 1284P has no standalone profile, runs BOOTSZ = 512 words always, and self-updates with no fuse change, reset landing at 0x1f800 — internally contradictory (a 512-word section starts at 0x1fc00, and the section holding both 1 KiB slots is 1024 words) and contradicted by update_preflight, which refuses a self-update unless the boot section covers two slots. The text described a 512-byte-slot geometry this chip's loader cannot have. In truth the 328P profile table maps onto the 1284P doubled: standalone = 512 words (the smallest section is exactly the 1 KiB slot, reset at the loader base), self-update = 1024 words with the loader-first reset walking the staging slot. Co-Authored-By: Claude Fable 5 --- pureboot/README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pureboot/README.md b/pureboot/README.md index be29baa..225063d 100644 --- a/pureboot/README.md +++ b/pureboot/README.md @@ -108,17 +108,16 @@ write `0xff` (per page for flash, per byte for EEPROM). ## Deployment -**Megas**: program the loader at `flash − 512` with an external programmer. -Every mega's smallest-but-one BOOTSZ puts the boot-section start exactly at -the loader base (512 B — the m8/16/168A reach it at their second-smallest -step, the m32/328P at their smallest), so the ATmega328P profiles below -apply to all of them with their own addresses; the per-chip BOOTSZ ladders -live in the host tool (`BOOT_FUSE`). The **ATmega1284P** is the exception: -its smallest boot section is 1 KB, so the standalone profile does not exist -— BOOTSZ = 512 words always, and with BOOTRST programmed reset lands at -0x1f800, one erased slot below the loader (the loader-first walk behavior -below, built in). Its staging slot sits inside that same 1 KB section, so -self-update needs no fuse change. +**Megas**: program the loader at `flash − slot` with an external programmer. +Every mega has a BOOTSZ step whose boot section is exactly the loader slot — +512 B, the m8/16/168A's second-smallest step, the m32/328P's smallest; on +the m1284P that step is its smallest, 512 words, which is why its slot is +1 KiB — so the ATmega328P profiles below apply to every mega with its own +addresses and slot size; the per-chip BOOTSZ ladders live in the host tool +(`BOOT_FUSE`). The 1284P's numbers: standalone = BOOTSZ 512 words (reset at +the loader base 0x1fc00); self-update = 1024 words, covering both 1 KiB +slots, the loader-first reset landing at 0x1f800 — the staging slot, walked +across when erased. ATmega328P profiles (addresses for its 32 KiB):