Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

IAR - Stack Organization in IAR for ARM complier

Status
Not open for further replies.

thavali

Newbie level 2
Joined
Jan 19, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
stack organization

when I use CodeVisionAVR for 8 bit AVR, then RAM Memory Organization consist (attached file):
- Registers.

- The Data Stack: area is used to dynamically store local variables, passing function parameters and saving registers R0, R1, R15, R22, R23, R24, R25, R26, R27, R30, R31 and SREG during interrupt routine servicing.
The Data Stack Pointer is implemented using the Y register.

- The Global Variables area is used to statically store the global variables during program execution. The size of this area can be computed by summing the size of all the declared global variables.

- The Hardware Stack area is used for storing the functions return addresses.
The SP register is used as a stack pointer and is initialized at start-up with value of the _HEAP_START_ -1 address.
During the program execution the Hardware Stack grows downwards to the Global Variables area.

- The Heap is a memory area located between the Hardware Stack and the RAM end.
It is used by the memory allocation functions from the Standard Library: malloc, calloc, realloc and free.

but, in IAR for ARM, then I can not find memory area in SRAM correlative with The Hardware Stack area of CodevisionAVR. Where is used to store the functions return addresses ?
for example: with a recursive function, size of LR register is not enough to store return addresses.

Thanks,
thavali
 

malloc iar arm

Hi

It is not advisable to use recursive function with microcontrollers!!!!

In the IAR compiler you can define the size of heap memory in the project set up or drectly in the linker setup file

All the best

Bobi
 

stack orgainztion

Thanks,

That, I can find in stack where in the stack is used to store local variables, where in the stack is used to store return addresses, or those works which complier should operate in auto and we can not control, handle ?.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top