[Top][All Lists]

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

Re: [avr-gcc-list] stack layout

From: Klaus Rudolph
Subject: Re: [avr-gcc-list] stack layout
Date: Sat, 25 Jun 2005 08:07:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114

Hi Torsten,

to get a complete overview on memory layout whithout touching the
software itself you simply run your application in a simulator and
monitor the stack and maybe the heap usage if needed.
You can also manipulate the irq load and other environment things there
for worst case situations to get an error free application. To do this in
real hardware is not a easy thing. If you add monitoring code
to your software the timing relevant things will be totally differnt and maybe
your application works only with debug code but you will maybe have
problems if you run your "relaese" version.



i'd like to change the memory layout of a program, especially the

So i linked my program with --defsym,__stack=0x900

When i look into the listing of my program that i got with:
avr-objdump -h -S file.elf

Then in __init the stackpointer still gets loaded as 0x10ff.
But in the beginning of main it gets reloaded to 0x8ff.

Is it a bug that the stack is set to 0x10ff in __init?

Can i change the options somehow to _always_ use 0x8ff for
the stack, also in __init?

Shouldn't the startup code also refer to the symbol __stack?

__stack seems to be only a symbol, not a section.  Would it make
sense to define an own section for the stack, so some overlap
checking could be done?

Best regards,

reply via email to

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