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 <noreply@anthropic.com>
32 lines
1.4 KiB
CMake
32 lines
1.4 KiB
CMake
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 8382)
|
|
|
|
# The README says the two modes emit the same image, and only a tree with
|
|
# both built can say whether they do.
|
|
libavr_mode_identity_test(fantemp)
|
|
|
|
# The battery is a compile: a static_assert that fails is the failure. It is a
|
|
# target rather than only a ctest so a plain build catches a regression too.
|
|
add_library(consteval_tests OBJECT consteval.cpp)
|
|
target_include_directories(consteval_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
|
target_link_libraries(consteval_tests PRIVATE libavr)
|
|
|
|
add_test(NAME fantemp.consteval
|
|
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target consteval_tests)
|
|
|
|
# The board has no reset line and no programming header, so the loader-entry
|
|
# route in the emitted image is the only thing standing between a firmware change
|
|
# and an unreflashable board.
|
|
find_package(Python3 COMPONENTS Interpreter)
|
|
if(Python3_FOUND)
|
|
add_test(NAME fantemp.reachability
|
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/check_reachability.py
|
|
--objdump ${CMAKE_OBJDUMP} --elf $<TARGET_FILE:fantemp>
|
|
--image $<TARGET_FILE_DIR:fantemp>/fantemp.bin)
|
|
else()
|
|
message(STATUS "Python not found - the reachability check is skipped")
|
|
endif()
|