simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Problem with reading EEPROM in simulavr


From: Marek Pietrzak
Subject: [Simulavr-devel] Problem with reading EEPROM in simulavr
Date: Sun, 06 Nov 2011 22:49:37 +0100

Hi,

Recently I added a call to eeprom_read_byte from avrlibc to my project
but it results in AvrDevice::Step returning -1. This is wrong I believe.
I turned on trace output which resulted in the following: 

../Debug/lcmeter.elf 0x12fc: __eerd_byte_m8
CPU-waitstate
0
0
../Debug/lcmeter.elf 0x1300: __eerd_byte_m8+0x2             OUT 0x1f,
R25 EEAR=0x0
0
../Debug/lcmeter.elf 0x1302: __eerd_byte_m8+0x3             OUT 0x1e,
R24 EEAR=0x0
0
../Debug/lcmeter.elf 0x1304: __eerd_byte_m8+0x4             SBI 0x1c, 0
EECR=0x1 EEPROM: Read = 0x0
0
../Debug/lcmeter.elf 0x1304: __eerd_byte_m8+0x4
CPU-waitstate
0
../Debug/lcmeter.elf 0x1306: __eerd_byte_m8+0x5             CPU-Hold by
IO-Hardware 0
0
../Debug/lcmeter.elf 0x1306: __eerd_byte_m8+0x5             CPU-Hold by
IO-Hardware -1
-1

The number after "CPU-Hold by IO-Hardware" is the actual cpuCycles, so
it turns at some point negative and of course simulation returns as if
there was a breakpoint.

Marek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]