[Top][All Lists]

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

[avr-gcc-list] simulavr - address out of bounds

From: Ted Larsson
Subject: [avr-gcc-list] simulavr - address out of bounds
Date: Mon, 18 Mar 2002 10:03:51 +0100
User-agent: Mutt/1.3.27i


I am having some trouble with my avr-gcc code and I just
want to find out what is going on.

I suspect that I am not using avr-gcc correctly, or that
there is something seriously wrong with it, but considering
my limited experience with it, the former seems more

I am using the 8515, and I am not doing anything complicated
at the moment, just interfacing to a led driver chip with
serial input and a shift register with parallel inputs. To
verify the correctness of this setup, I try to read input
from the shift registers, and write it to the leds.

when I run the program, it first writes a few hardcoded bit
patterns to the leds (this works) but when I go into an
infinite loop to read data and then write it out to the
leds, I get unpredictable results. 

When I run it in avr-gdb/simulavr, simulavr says "address
out of bounds: 0x2000". When I look at the map file there is
a line saying: 

Name            Origin          Length          Attributes
text            0x00000000      0x00002000      xr

If I interpret this correctly, gcc somehow places variables
outside of the internal ram. How do I control this? From
what I have read on this list, I suspect that I have to
manually edit a linker script somewhere, but I have no
experience with this.

I am attaching my makefile and mapfile if it is any help in
solving this. Iam using gcc-3.0.4 and avr-libc 020203.

Thanks in advance,


Attachment: Makefile
Description: Text document

Attachment: iris.map
Description: Text document

reply via email to

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