avr-libc
avr-libc copied to clipboard
EEPROM tests for ATtiny2313 are failing
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.