This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
assertion checks for stack
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] assertion checks for stack
- From: "Joerg Rapka" <joerg dot rapka at duagon dot com>
- Date: Wed, 10 Jan 2001 14:14:45 +0100
Hello all
I have some trouble with assertion checks for the stack
in file "packages/kernel/current/include/thread.inl".
The assertion checks uses the type "CYG_WORD" for alignment tests.
This type "CYG_WORD" is defined in file
"packages/infra/current/include/cyg_type.h".
It is of type "cyg_uint32" (that's fixed - so it should have always 32
bits).
So the assertion checks for the stack requires a 32-bit alignment of the
stack address.
I'm using the following:
- Motorola M68331 CPU
- latest CVS sources
- template "elix" (without network support)
On my target the assertion check generates a failure, if it checks the main
stack.
This main stack is defined in file
"packages/compat/posix/current/src/pthread.cxx"
in the following way:
static char main_stack[CYGNUM_LIBC_MAIN_DEFAULT_STACK_SIZE];
This error happens, since the m68k GNU compiler will align the "main_stack"
to 16-bit alignment.
How should I solve the problem?
I cannot (will not) modify the definition of the "main_stack" in file
"pthread.cxx"
either I cannot modify the type definition of "CYG_WORD" in file
"cyg_type.h" (since
this type must have 32-bit - as I understood the rest of the source code).
Thanks in advance for any help or tips.
Best regards, Joerg