[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Re: Insight & simulavr ->korrektion :-)
From: |
Theodore A. Roth |
Subject: |
[avr-gcc-list] Re: Insight & simulavr ->korrektion :-) |
Date: |
Tue, 31 Dec 2002 10:56:01 -0800 (PST) |
Hi Klaus,
I'm not seeing anything wrong happen in simulavr. I ran the attached
program in the sim with avr-gdb (no insight). Run avr-gdb as such:
$ avr-gdb -nx -x gdb.in
Here's the disassembly of the resulting code:
000000ca <main>:
volatile int foo;
int main (void)
{
ca: cf ef ldi r28, 0xFF ; 255
cc: d0 e1 ldi r29, 0x10 ; 16
ce: de bf out 0x3e, r29 ; 62
d0: cd bf out 0x3d, r28 ; 61
for (;;)
{
foo++;
d2: 80 91 00 01 lds r24, 0x0100
d6: 90 91 01 01 lds r25, 0x0101
da: 01 96 adiw r24, 0x01 ; 1
dc: 90 93 01 01 sts 0x0101, r25
e0: 80 93 00 01 sts 0x0100, r24
e4: f6 cf rjmp .-20 ; 0xd2
which looks simular to what you posted.
I don't have insight on my computer at home, but will retry this on my
computer at work later today.
Ted Roth
On Fri, 27 Dec 2002, Klaus Rudolph wrote:
:)>Hi all, hi Tod,
:)>
:)>
:)>I saw a funny but absolutly wrong result in testing insight
:)>today.
:)>
:)>I compiled a simple program and got the following window
:)>in insight:
:)> 5 int main() {
:)>- 0x56 <main>: ldi r28, 0x5F ; 95
:)>- 0x58 <main+2>: ldi r29, 0x02 ; 2
:)>- 0x5a <main+4>: out 0x3e, r29 ; 62
:)>- 0x5c <main+6>: out 0x3d, r28 ; 61
:)>- 0x5e <main+8>: nop
:)> 6 for (;;) {
:)>- 0x72 <main+28>: rjmp .-20 ; 0x60
:)> 7 a++;
:)> 0x60 <main+10>: lds r24, 0x0060
:)>- 0x64 <main+14>: lds r25, 0x0061
:)>- 0x68 <main+18>: adiw r24, 0x01 ; 1
:)>- 0x6a <main+20>: sts 0x0061, r25
:)>- 0x6e <main+24>: sts 0x0060, r24
:)>- 0x74 <__stop_progIi__>: rjmp .-2 ; 0x74
:)>
:)>In address 0x68 the r24/25 register should be added by one, but simulavr
:)>add not
:)>one, it add any possible value. Looking into memory give a total
:)>confused output. Every assembler step the complete memory content
:)>change :-(
:)
:)Sorry, the memory content is ok, I forget to ad 0x800000 and the dump
:)was
:)relativ to $PC. Sorry, "change user error".
:)
:)But simulavr add the wrong value, this behavior did not change :-(
:)
:)
:)>I use:
:)>simulavr-0.1.1
:)>insight-5.3
:)
:)>Maybe some compatibility problems with the downloaded versions??
:)
:)>Thanks
:)> Klaus
:)
test.tar.gz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-gcc-list] Re: Insight & simulavr ->korrektion :-),
Theodore A. Roth <=