The three files libavr's consumers carry: .vscode/settings.json names the
atmega328p-generated database and passes --query-driver, .clangd holds the
stand-ins clang needs for GCC's AVR dialect -- and no database, because this
driver is made to be vendored and the file travels with it -- and
extensions.json names the two extensions. The libavr pin advances to the
editor-audit fixes, without which every TU inherits device.hpp's
alias-shadowing errors. The preset builds green from the pin and clangd
reports zero errors on the example TU.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The register sugar now rides the bus's own master role - device<Bus>
resolves avr::i2c::device<typename Bus::master, bus_address>, so a
consumer keeps handing over its declared dev::i2c<...> unchanged - and
the DS3231's hardwired 0x68 is a named constant. The example's four
discards became the LED's own error signal (a failed seed or a failed
alarm clear holds it dark, the same word a stuck bus says), the tree is
reformatted under InsertBraces, the sources are ASCII, and the README's
stale Studio byte counts are replaced by the claim its check-flags gate
holds.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
timer::engine gains stop()/start() and a runtime TOP, adc gains
disable()/enable(), and libavr_programming_targets() stops leaving .fuse bytes
in the flash HEX. Every one of them is additive, and this port adopts none of
them yet: its 1 built image comes out byte-identical across the pin change,
which is what the advance is here to keep true.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Built and tested against it in a clean checkout of this port, through its own
submodule rather than a working-tree override, so the pin is what was proved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The de-string-2 pass upstream: every peripheral block behind generated
instance traits, the string layer gone. Nothing here changes — both
examples rebuild byte-identically across modes at their recorded sizes
(tiny85 1212 B, mega328P 1242 B).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The submodule replaces FetchContent and the unpinned forge fallback;
LIBAVR_ROOT stays as the tandem-development override, the presets take the
toolchain file from the submodule, and the Studio project's include path
anchors there — correct by construction.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The presets cover both parts, so the solution should too. Studio carries
avrdevice as a project property, so a part is a project rather than a
configuration, and both build example/main.cpp to a .text byte-identical to
their CMake counterpart: 1242 B on the mega, 1212 B on the tiny, each with the
architecture its own object file says.
They need separate directories, not just separate names. Studio builds into
<project dir>/<Configuration> whatever OutputDirectory claims — setting it per
project creates the directory and then ignores it — so two projects in one
directory share example/main.o. Verified rather than assumed: with both in ide/,
the single shared object read avr:25 while the mega's ELF read avr:5, so a
build of one after the other without a rebuild links the wrong part's object.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
master opens in Studio, so this branch should too. The solution builds
example/main.cpp — the port's only executable, the driver itself being an
INTERFACE library — for the ATmega328P that solution targeted, and the
acceptance is not that it builds but that it builds the same firmware: .text
comes out byte-identical to CMake's at 1242 B.
One project, one chip. Studio carries avrdevice as a project property, so the
attiny85 half of the presets would need a second project rather than a second
configuration; CMake stays the build system and covers both.
libavr is found beside this repo, anchored to the project directory rather than
written relative to the generated makefile, which runs from the configuration's
output directory. No LIBAVR_ROOT: a variable exported in a shell is invisible to
Studio launched from the Start menu.
Both configurations verified headless with LIBAVR_ROOT unset, and the flag
mirror checked against the CMake build's own compile_commands.json.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same driver surface as the yazoalfa version — clock and alarm get/set,
alarm interrupts, flag check/clear — plus oscillator-stop detection and
die temperature. One source for tiny85 (software I2C) and mega328P (TWI),
built against libavr in both generated and reflect mode, byte-identical
.text across modes. Errors surface as std::expected instead of being
dropped; weekday-rate alarms now really set the DY bit (legacy cleared
it); multi-register access is one coherent bus transaction. Legacy stays
on master.
Co-Authored-By: Claude <noreply@anthropic.com>