Re: AVR stack problem



Hi,
> I just got my deign up and running using an AVR Mega128. For some odd
> reason it looks like my stack is disabled. Within AVRStudio the stack

Have a look at:
http://ftp.gnu.org/savannah/files/avr-libc/doc/avr-libc-user-manual/FAQ.html

It appears that your fuse bits are still in compatibility mode i.e.
pretending that you are using an Atmega 103.

....Well, certain odd problems arise out of the situation that the AVR
devices as shipped by Atmel often come with a default fuse bit configuration
that doesn't
match the user's expectations. Here is a list of things to care for:

.....
.. The ATmega128 ships with the fuse enabled that turns this device into
ATmega103 compatibility mode. This means that some ports are not fully
usable, and
in particular that the internal SRAM is located at lower addresses. Since by
default, the stack is located at the top of internal SRAM, a program
compiled
for an ATmega128 running on such a device will immediately crash upon the
first function call (or rather, upon the first function return).
.....
/Roland


.



Relevant Pages

  • Re: AVR stack problem
    ... I just got my deign up and running using an AVR Mega128. ... For some odd ... reason it looks like my stack is disabled. ...
    (comp.arch.embedded)
  • Re: Developing/compiling software
    ... these are details that are hidden by the compiler, and the AVR will have executed the necessary pushes, stack pointer manipulation, interrupt disable and whatever before the average 8051 device has managed to push the A register onto the stack. ... The discussion is about whether gcc's stack arrangement or IAR's stack arrangement is best for producing optimal interrupt code on the AVR - no one would seriously compare it to the 8051. ... Stuff like that may be hidden by the compiler, much as one might stick a bandaid on a sore to hide it, but the inefficiency is still there. ...
    (comp.arch.embedded)
  • Re: Set Up To Print Book, 2 Sides, L & R Margins Alternate-Pagination
    ... chapter a new section which starts on odd page. ... Printing might be more interesting. ... Place the output stack back in the input hopper ... The result is a duplex stack in the ...
    (microsoft.public.mac.office.word)
  • Re: Manual duplex printing requires each finished page to be flipp
    ... Daiya ... > SIDE B. This means that if you thumbed through the output stack, ... > If I do this all semi-manually (printing just the odd pages and then just ...
    (microsoft.public.word.docmanagement)
  • Re: Manual duplex printing requires each finished page to be flipp
    ... the first sheet in the stack will have PAGE 2 on SIDE A and ... SIDE B. This means that if you thumbed through the output stack, ... If I do this all semi-manually (printing just the odd pages and then just ... > What *is* the sequence of page images that Word is sending to the printer? ...
    (microsoft.public.word.docmanagement)