buserror / simavr

simavr is a lean, mean and hackable AVR simulator for linux & OSX
GNU General Public License v3.0
1.56k stars 365 forks source link

ATMEGA328p - avr_sadly_crashed #183

Closed ricardojlrufino closed 6 years ago

ricardojlrufino commented 7 years ago

Running...

simavr -m atmega328p UsbConnection.ino.elf

I got this error:

CORE: *** Invalid read address PC=1cc2 SP=08e4 O=918c Address 859e out of ram (08ff) avr_sadly_crashed avr_gdb_init listening on port 1234 ^Csignal caught, simavr terminating

I compiled using Arduino IDE - Uno Board. I am sending the folder that Arduino generates with the compiled files

USBTest.tmp.zip

hovercraft-github commented 7 years ago

Well, this usually just means there is a bug in you firmware. Under this condition simavr activates the GDB backend and waits debugger connection using TCP on the localhost:1234. You can setup your IDE (Eclipse or CodeBlocks ..) to start the 'remote' debug session using this address, and then trace the situation leading to the above error.

ricardojlrufino commented 7 years ago

It was what I imagined at first, but the same code is running from Arduino UNO. I think it might be some mistake to access the EEPROM, I'll investigate more calmly, trying to debug.