From bf18f99635a466949049db948d77138c91a79877 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 23 Aug 2026 02:20:57 +0200 Subject: [PATCH] build: the libavr pin advances, and one adiw appears in the ring 43fc479 -> aec9955, 8380 -> 8382 B. Two bytes, and they are all of e226340: the uart ring now declares its indices before its storage. The library measured that reorder at 0 B and it is +2 here, so the difference is worth stating. The reorder exists for the 0..63 displacement window, and at 32 entries the indices were never outside it - ldd Z+32 and ld Z are both two bytes, so moving them to the front buys nothing. What it does do is take storage off offset zero, and storage is the member reached by a computed index: pop() loaded storage[tail] as X = Z + tail with the base free, and now adds the base with an adiw. So it is free where the indices were out of the window and a loss where they were in it, and which of those a consumer gets depends on its ring size and on whether pop() is out of line - fantemp's is. Filed upstream with the disassembly; nothing to work around here, and 8382 of 32768 is not a budget question. Everything else crossed is inert for this firmware: no i2c, no eeprom writer, no spare vectors, and percent_t already reached through ::of(). Five tests green in both modes, cross-mode identity held. Co-Authored-By: Claude Opus 5 --- README.md | 2 +- libavr | 2 +- test/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 700d34e..25805ad 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ cmake --preset atmega328p-generated cmake --build --preset atmega328p-generated ``` -The firmware is **8380 B** of flash, byte-identical between the generated and +The firmware is **8382 B** of flash, byte-identical between the generated and reflect modes, and `ctest` holds it to that number. ## Atmel Studio diff --git a/libavr b/libavr index 43fc479..aec9955 160000 --- a/libavr +++ b/libavr @@ -1 +1 @@ -Subproject commit 43fc4796c2670e522233bd95a982a688052b9cf3 +Subproject commit aec9955ad390bb0888eea4f0c21ea7936c7e879f diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 03b99c5..6b5bff8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,7 +2,7 @@ libavr_format_test() # The image must stay below the boot section at 0x7e00, and the README states # what it measures; a library advance that moves it says nothing on its own. -libavr_size_claim_test(fantemp 8380) +libavr_size_claim_test(fantemp 8382) # The README says the two modes emit the same image, and only a tree with # both built can say whether they do.