Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEPROM tests for ATtiny2313 are failing #954

Open
sprintersb opened this issue Mar 24, 2024 · 0 comments
Open

EEPROM tests for ATtiny2313 are failing #954

sprintersb opened this issue Mar 24, 2024 · 0 comments

Comments

@sprintersb
Copy link
Collaborator

I am getting fails from running the EEPROM tests for ATtiny2313, for example execute in tests/simulate:

> MCU_LIST_FULL="attiny2313" ./runtest.sh -a $build  -s avr/eeprom-*.c
Simulate: avr/eeprom-1.c attiny2313 ... *** simulate failed: 70
Simulate: avr/eeprom-2.c attiny2313 ... *** simulate failed: 46
Simulate: avr/eeprom-3.c attiny2313 ... *** simulate failed: 64
Simulate: avr/eeprom-4.c attiny2313 ... *** simulate failed: 13

The fails are independent of compiler version, and they can be fixed by

diff --git a/libc/misc/eerd_word.S b/libc/misc/eerd_word.S
index 445f5ab1..7dc0c84c 100644
--- a/libc/misc/eerd_word.S
+++ b/libc/misc/eerd_word.S
@@ -53,9 +53,7 @@
 #else
 
        ldi     XL, 24          ; start address to write: r24
-# if  RAMEND > 0xFF
        ldi     XH, 0
-# endif
 
        ldi     n_lo, lo8(2)
 # if  E2END > 0xFF

etc.
This means the eeprom_read_blraw routine malfunctions when XH contains garbage. Maybe it is just a simulavr issue?

Using SimulAVR v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant