From b5020a1e201e8ca2917826de90123afc4bb6c319 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Thu, 23 Jul 2026 01:09:38 +0200 Subject: [PATCH] pureboot 4: the loader carries its fixes' identity The unaligned-W and U2X-hand-over fixes change the loader's observable on-wire behavior, and the --stay reconnect fix changes the host tool, so both move: loader version 3 -> 4, tool VERSION 2 -> 3. The protocol and info block are unchanged, so OLDEST_LOADER stays 1. Co-Authored-By: Claude Opus 4.8 (1M context) --- libavr | 2 +- pureboot/pureboot.cpp | 2 +- pureboot/pureboot.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavr b/libavr index a8ed8c4..57dbe76 160000 --- a/libavr +++ b/libavr @@ -1 +1 @@ -Subproject commit a8ed8c485191a84cd1228f062374b00585c163d5 +Subproject commit 57dbe76b1baae0da4cc88806767a6680d0bf190f diff --git a/pureboot/pureboot.cpp b/pureboot/pureboot.cpp index f365139..396c2e0 100644 --- a/pureboot/pureboot.cpp +++ b/pureboot/pureboot.cpp @@ -67,7 +67,7 @@ constexpr std::uint8_t timeout_seconds = PUREBOOT_TIMEOUT; // The loader's one identity number. The protocol carries none of its own — // a version implies it, and the host tool holds that map (README.md). -constexpr std::uint8_t version = 3; +constexpr std::uint8_t version = 4; // The 'b' reply, byte for byte (layout: README.md). Flash-resident because // no crt copies a .data image — and flash_table's storage carries the word diff --git a/pureboot/pureboot.py b/pureboot/pureboot.py index 5ee31bb..6a9585b 100644 --- a/pureboot/pureboot.py +++ b/pureboot/pureboot.py @@ -24,13 +24,13 @@ else: import termios PROMPT = b"+" -VERSION = 2 # this tool's own version — free to drift from a loader's +VERSION = 3 # this tool's own version — free to drift from a loader's # The loader versions this tool speaks. A pureboot version implies its wire # protocol, which carries no number of its own, so this window is where that # map lives: every version so far speaks the same protocol, and one that # changes it becomes the new floor here. OLDEST_LOADER = 1 -NEWEST_LOADER = 3 +NEWEST_LOADER = 4 SLOT = 512 # the loader slot, on every chip RETRIES = 3 # rewrites of a page that reads back wrong, before the run stops