Repository navigation
feat(boards): add the ATtiny85 board hardware and its rules (P6.4) - #336
Merged
Merged
Conversation
Port B with INT0 and PCINT0, timer 0 with its own registers and one-word vectors, the ATtiny timer 1, a four-channel ADC that reads REFS2 at bit 4, EEPROM timed for 8 MHz, watchdog and clock prescaler. INT0 and the pin-change interrupt share GIMSK and GIFR, which avr8js wires for one of them only; the profile wraps both hooks. Registered with the board hardware in P6.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TX is decoded from PB0 with the baud rate found from the edge distances and the bit width measured from them; RX drives PB1 through an analog comparator model. SoftwareUart offers the USART members SerialPorts uses, for the ATtiny85 board. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pins 0-5 as PB0-PB5 with A0-A3 as second names, PWM on 0, 1 and 4, RESET on PB5 and Serial as a software port on 0/1. SerialPorts takes a USART or the software UART, the PWM observation reads timer 1 of the ATtiny85, and the sketch parsers resolve A<n> and analogRead(n) as ATTinyCore does. The pin map is checked against the core in the toolchain gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Paket
P6.4 Board-Hardware und Regeln ATtiny85 (M). Gestapelt auf #335 → #334. Die Basis ist
feature/browser-emulation; bis die Vorgänger gemergt sind, enthält der Diff deren Commits mit. Merge-Reihenfolge: #334, #335, dann dieser PR.Umgesetzt
Paket
ATTINY85_BOARD, gegenvariants/tinyX5/pins_arduino.hgeprüft:LED_BUILTIN1;analogName);TIMER1_PWM) und 4 (Timer 1 B);reset;Serialist ein Port der Artsoftwarean 0 (TX) und 1 (RX).Profil und Hardware des ATtiny85 sind jetzt in
mcuProfileundboardHardwareregistriert.SerialPortsnimmt einen USART oder einenSoftwareUart(feat(emulator): model the software UART of the ATtiny85 (P6.3) #335).setFallbackBaudsetzt die Rate, mit der dekodiert wird, bis die Leitung die des Sketches zeigt; angebunden wird es mit P6.5.PWM-Beobachtung für Timer 1 des ATtiny85:
pwmChannelRegistersgibtio-usageeine gemeinsame Sicht auf alle Timer.Die Pinanzeige zeigt damit
analogWrite(4, 200)richtig, obwohl avr8js dort kein Signal erzeugt (feat(emulator): add the ATtiny85 MCU profile (P6.2) #334).Shared und Parser
Das Pinmodell kennt
analogName;resolveBoardPin("attiny85", "A1")liefert 2,boardPinAliasesliefert die Zweitnamen.Die Parser rechnen wie ATTinyCore:
A<n>ist0x80 | nund wird in jeder Pinfunktion zum Pin;analogRead(n)nimmt den Kanal n (pinContext.analogValue,isPinValue,callPin). Ohne das wurdeanalogRead(A1)zu Pin 4. Beim Uno, Nano und Mega bleibt alles wie vorher; das zeigen die bestehenden Parser-Tests.Neue Warnungen:
analogRead(A0)bleibt erlaubt);Serialverwendet.Serial1gibt es nicht; das deckte die bestehende Regel schon ab.Toolchain-Gate: Ein neuer Fall in
avr-emulator-board-pinmap.test.tsprüft Port, Bit, Timer, Analogkanäle undLED_BUILTINgegen ATTinyCore.analogInputToDigitalPin(n)undLED_BUILTIN(( 1)) wertet der Compiler des Cores aus (-S,.wordlesen), weil der Präprozessor diese Ausdrücke nicht ausrechnet.Doku: SSOT Boards (Pinmodell und Regeln ATtiny85), README des Pakets, Plan, Status.
Abnahmeevidenz
tests/attiny85-board.test.ts(8 Fälle), über denEmulator:Serialüber den Software-UART und Eingabe mit Antwort;analogWritein der I/O-Registry;tests/shared/attiny85-pins-and-rules.test.ts: 8 Fälle.npm run buildmit Bundle 690,1 kB von 710 kB;check,lint,knip,check:docs, Pre-Push mit Sonar (zwei S3358 behoben).Abweichungen vom Plan
Der Board-Status bleibt
planned. Die Freigabe alspreviewist P6.5, zusammen mit der UI (DIP-8-Grafik, Analognamen in der Anzeige), dem Korpus und dem E2E-Test.Geänderte bestehende Tests (freigegeben vom Nutzer am 23.10.2026)
Fünf Tests nutzten
attiny85als Beispiel für ein „Board ohne Hardware-Profil“. Sie prüfen den Rückfall jetzt mit einer unbekannten ID; die Prüfung selbst bleibt:packages/avr-emulator/tests/atmega328p-boards.test.ts:39–41tests/client/lib/active-board.test.tstests/shared/board-pins.test.tstests/shared/boards.test.ts(boardPinAliases)tests/shared/parsers-per-board.test.ts(Rückfall auf den Uno)Ohne Freigabe nötig, weil keine Prüfung geändert wurde: Der Helfer in
avr-emulator-board-pinmap.test.tsist umgebaut (coreProperties); die drei bestehenden Board-Fälle sind unverändert.🤖 Generated with Claude Code