This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Wrong declaration of idle_thread_stack
- From: "Uwe Kindler" <ukindler at htwm dot de>
- To: <ecos-discuss at sources dot redhat dot com>
- Cc: "Andrew Lunn" <andrew at lunn dot ch>
- Date: Wed, 21 Jan 2004 20:16:56 +0100
- Subject: [ECOS] Re: Wrong declaration of idle_thread_stack
- References: <002701c3e030$81cec690$2c79378d@uwepc> <20040121182548.GB3270@lunn.ch>
Hello Andrew,
> assertion never goes off. If this were not true, all the targets in
> eCosCentrics test farm would be failing this test at regular
Do you have an Hitachi H8300 or H8S in your testfarm? - I develop for the
Renesas EDOSK-2674 board with H8S/2674 processor.
> Now, is this really a compiler issue? I think it probably is. I
> suspect there is lots of code out there in general that assumes a char
> array starts on a word boundary. We could apply your patch, but i
> suspect you will run into trouble some where else. I think maybe you
Well, I executed the h8300-elf-nm command on the file tm_basic after
building the eCos kernel tests. Here are some lines:
0074ef60 b ___mangler_line
0074efc4 B _hal_saved_interrupt_state
0074efc8 B __cyg_hal_compiler_dummy
0074efcc b _cyg_dummy_diag_init_obj
0074efcd b _ZZ9trim_funcPKcE4fbuf
0074f031 b _idle_thread_stack
0074f834 B _idle_thread_loops
0074f838 B _idle_thread
0074f8d8 B __ZN10Cyg_Thread17exception_controlE
The idle thread stack starts at address 0x74f031 - so the assertions will
fail (and they do fail). Now I compiled a very simple and small application
(nothing eCos related):
static char stack01[16];
static char stack02[15];
static char stack03[14];
static char stack04[3];
static char stack05[4];
int main (void)
{
for (count=0; count<12; count++)
After building I executed the h8300-elf-nm command again - this is the
result:
00ffc00c b _stack01
00ffc01c b _stack02
00ffc02b b _stack03
00ffc039 b _stack04
00ffc03c b _stack05
0000026e T _start
So the h8300 compiler/linker does not align char arrays to CYG_WORD
boundary. So what can I do?
Regards, Uwe
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss