1316 -> 1246. libavr took the finding this repo filed when its pin last moved: the shared transaction ladder's cost was never the ladder but the argument list reaching it - AVR passes eight bytes in call-clobbered registers and the rest in call-saved ones, so twelve bytes made every forwarder save four it never reads. A write has no read span, so the write path now passes eight. Worth recording that the candidate this repo suggested was measured and rejected upstream, and the numbers filed from here are why: it wins 66 B on a driver like this one and charges a single-byte reader 20, which is a class rather than one program. The mega328P does not move at 1480 - its TWI backend has its own ladder and was never charged. Net over the whole 22-commit advance the tiny85 is +8 B, and all of it is the bit-period fix that made the wire rate stop following the inliner. Sixteen tests green, cross-mode identity held on both chips. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
22 lines
830 B
CMake
22 lines
830 B
CMake
libavr_format_test()
|
|
|
|
# The example's size is stated in the README, per chip, and a library advance
|
|
# that moves it silently is what this catches.
|
|
if(LIBAVR_MCU STREQUAL "atmega328p")
|
|
libavr_size_claim_test(clock 1480)
|
|
elseif(LIBAVR_MCU STREQUAL "attiny85")
|
|
libavr_size_claim_test(clock 1246)
|
|
endif()
|
|
|
|
# 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(clock)
|
|
|
|
# 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_link_libraries(consteval_tests PRIVATE ds3231)
|
|
|
|
add_test(NAME ds3231.consteval
|
|
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target consteval_tests)
|