-------- Original-Nachricht -------- > Datum: Sun, 18 Dec 2011 22:21:55 +0100 > Von: "Petr Hluzín" <petr.hlu...@gmail.com> > An: Klaus Rudolph <lts-rudo...@gmx.de> > CC: "D. Laszlo Sitzer" <dlsit...@googlemail.com>, simulavr-devel@nongnu.org > Betreff: Re: [Simulavr-devel] build fails
> On 14 December 2011 17:11, Klaus Rudolph <lts-rudo...@gmx.de> wrote: > > > > The problem with mi is not really clear to me but could be fixed by > > removing auto with the correct data type from the iterator needed. I can > > send a patch tomorrow. I actually could not access my other pc :-) > > The "auto" is a feature added in C++11, compiler is required to infer > the type from the expression. Apparently C++11 is disabled by default > in GCC. I know, but I run also into trouble with enabled -std=c++11. Maybe I have used a wrong compiler version. It was a very fast attempt to get the actual simulavr running :-) > > > > > But after all fixes I only could do one single step and the simulavr > > crashes with an exception. Something with SP != 0 ??? Couldn't remember > > the complete problem. > > I am interested in details, preferably a program which reproduces the > crash. I hope I could spend some time for avr this weak. If I run again into trouble, I send a mail to this list with a hopefully much more detailed error message :-) > > > The next thing is, that gdb from 7.1 version is longer compatible with > > simulavr. The disassembler output comes from ram and not longer from > > flash, which really makes no sense. > > I am using gdb-7.3 and disassembly works fine, it reads from flash. > So I will describe what I have done: Running a c/c++ program, target at90s8515. Running "my" very old version of simulavr. Using a few different versions of gdb und ddd. In detail: #include <avr/io.h> volatile int x; int main() { x=0x1234; return 0; } --------- avr-g++ -mmcu=at90s8515 -g -O3 -o go main.cpp Version: avr-g++ (GCC) 4.6.1 simulavr -d at90s8515 -g -f ./go ( with my very old version) ddd -debugger /opt/avr/bin/avr-gdb go Version of gdb: GNU gdb (GDB) 7.1 Now in ddd: View->Machine Code Window Dump of assembler code for function __vectors: => 0x00000000 <+0>: rjmp .+24 ; 0x1a <__trampolines_start> 0x00000002 <+2>: rjmp .+78 ; 0x52 <__bad_interrupt> 0x00000004 <+4>: rjmp .+76 ; 0x52 <__bad_interrupt> 0x00000006 <+6>: rjmp .+74 ; 0x52 <__bad_interrupt> 0x00000008 <+8>: rjmp .+72 ; 0x52 <__bad_interrupt> Look good! now: > stepi Dump of assembler code from 0x80001a to 0x80011a: 0x0080001a: nop 0x0080001c: nop 0x0080001e: nop 0x00800020: nop 0x00800022: nop 0x00800024: nop Which is simply wrong. If I use gdb versions 7.0.1 or lower, all works fine! -------------------- If I use the git-version: ~/work/simulavr_git/simulavr_test001/src/simulavr -d at90s8515 -g -f ./go After the first stepi I run into: WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x20], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x21], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x22], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x23], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x24], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x25], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x26], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x27], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x40], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x42], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x43], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x46], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x47], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x50], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x51], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x54], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x56], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x57], PC=0x1a WARNING: file rwmem.cpp: line 115: Invalid read access from IO[0x5c], PC=0x1a simulavr: hwstack.cpp:282: void ThreadList::OnSPRead(int): Assertion `0 != SP_value' failed. I hope this helps a bit. Thanks Klaus -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de _______________________________________________ Simulavr-devel mailing list Simulavr-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/simulavr-devel