EmbeddedRelated.com
Forums

heap, stack etc

Started by Jakub Szumacher September 8, 2011
In my Crossworks i found many variables:

Heap size
Stack size (Abort mode)
Stack size (FIQ mode)
Stack size (IRQ mode)
Stack size (Supervisior Mode)
Stack size (Undefinded Mode)
Stack size (User/System Mode)

I've never wonder what are they for.

Could anyone explain me when my application use these parts of stack?
(Paul - I know is basic question but dont be unkind for me, please. )

Regards
Jakub

An Engineer's Guide to the LPC2100 Series

On 08/09/2011 11:40, Jakub Szumacher wrote:
>
>
> In my Crossworks i found many variables:
>
> Heap size
> Stack size (Abort mode)
> Stack size (FIQ mode)
> Stack size (IRQ mode)
> Stack size (Supervisior Mode)
> Stack size (Undefinded Mode)
> Stack size (User/System Mode)
>
> I've never wonder what are they for.
>
> Could anyone explain me when my application use these parts of stack?
> (Paul - I know is basic question but dont be unkind for me, please. )
This is not a compiler question, or a C question, and only indirectly an
LPC2000 question. These refer to the operating modes of ARM7 core which
the LPC2000 uses.

Get yourself a copy of the ARM ARM (ARM Architecture Reference Manual)
and read about the programmers model. If it is the same as mine,
section 2.2 will answer the question you have.

Try googling for the ARM Architecture reference manual. It might be
helpful to google for 14128.pdf specifically.
Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

> Regards
> Jakub

> In my Crossworks i found many variables:
>
> Heap size
> Stack size (Abort mode)
> Stack size (FIQ mode)
> Stack size (IRQ mode)
> Stack size (Supervisior Mode)
> Stack size (Undefinded Mode)
> Stack size (User/System Mode)
>
> I've never wonder what are they for.
>
> Could anyone explain me when my application use these parts of stack?
> (Paul - I know is basic question but dont be unkind for me, please. )

These are for the stack sizes in the various ARM7/9 CPU modes. (Ok, this is not exactly 100% correct but is good enough in this case.) If your CPU runs in any of these modes you may want to allocate stack for them using these definitions. You will need to consult the ARM Architecture manuals to see how the modes and shadow registers work.

Regards,

-- Paul.