[ECOS] assertion checks for stack

Joerg Rapka joerg.rapka@duagon.com
Wed Jan 10 05:15:00 GMT 2001


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



More information about the Ecos-discuss mailing list