Repository navigation
Emulator fidelity: reset, interrupts, Intel HEX, Mega and ATtiny85 configs - #30
Open
begeistert wants to merge 2 commits into
Open
begeistert wants to merge 2 commits into
begeistert wants to merge 2 commits into
Conversation
- Intel HEX: handle extended segment/linear records and checksums; add TryLoadHex. - Cpu.Reset clears the I/O space up to RamStart and resets every peripheral. - Interrupt entry takes 4 cycles (5 on 22-bit-PC parts); the instruction after SEI/RETI always runs before a pending interrupt. Per-CPU interrupt hooks. - AvrRunner carries its cycle target across calls (Run, RunUntil, RunCycles). - USART keeps RXC unless RXEN goes 1 to 0; write-one-to-clear flags in TIFR, ADCSRA, SPSR, TWCR, WDTCSR and EECR. - ATmega2560 configs in the core with the right OCx pins, channel C, ICP, INT0-7 and PCINT0-2; fast PWM channel C sets its pin at BOTTOM. - ATtiny85: EEARH at 0x3F, AvrAttinyTimer1 ported from avr8js. - ADC Avcc/Aref settable; EEPROM write time scales with the CPU frequency.
Deploying avr8sharp-docs with
|
| Latest commit: |
f3924d1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bf3f119b.avr8sharp-docs.pages.dev |
| Branch Preview URL: | https://fix-emulator-fidelity.avr8sharp-docs.pages.dev |
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.
Fixes from the audit of the CPU, the peripherals and the iCircuit (CircuitMirror) integration. Full list in the CHANGELOG
[Unreleased]section.Things that break real firmware
LoadHexignored record types 02/04, so a Mega sketch larger than 64 KB overwrote its own vectors. There is now a shared parser with checksum verification, plus a strictTryLoadHex.Cpu.Reset(): it is now a real reset. The I/O space up toRamStartgoes back to its reset values and every peripheral resets. Before, iCircuit's firmware-reload path could hangSerial.write.analogWriteon pins 4 and 9-13).Mega2560*Config, and the TestKit uses them.eeprom_write_bytethrew with interrupts on.timer-attiny.ts.Fidelity
Avcc/Arefare settable.API (additive)
TryLoadHex/HexInfo.Cpu.RamStart,AvrBuilder.WithRamStartandCpu.PreserveOnReset.OnInterruptDispatch/OnBreakpoint/OnSleep. The static hooks are now[Obsolete].AvrRunner.Run/RunUntil/RunCycles.AvrTimerConfig.CreateNew.AvrAttinyTimer1.ATtiny85Simulation.Timer1changes type to it.Behaviour changes a test may notice
sei.Reset().Verification
Avr8Sharp.Tests: 657/657 (was 583)TestKit.Samples: 73/73 (was 45)