This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Confused by the stack about ARM in eCOS.
- From: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- To: "Ecos-Discuss \(E-mail\)" <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 1 Aug 2002 17:04:27 +0100
- Subject: [ECOS] Confused by the stack about ARM in eCOS.
Hi all:
I looked into the vectors.s file in order to make out how stack is set
up in ecos. But there is something confused me. so could anybody give me
some help? Thanks a lot!
vectors.S
#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
ldr sp,.__startup_stack
#endif
bl cyg_start
.balign 16
__startup_stack_base:
#ifdef CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK
.rept 512
#else
.rept CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
#endif
.byte 0
.endr
.balign 16
__startup_stack:
It seems the stack pointer (SP) is setup before entering the cyg_start()
then ...
When I create a ecos(arm e7t default) the
CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK has been defined so is that
means the __startup_stack is 512*2 byte big?
If in the main() I define a big local array as: int a[9000] , so where will
this located? in the Stack? (the __startup_stack stack?) if not how the
stack pointer is setup when run into main() or cyg_user_start() ? Thanks a
lot!
Best regards!
qiang
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss