This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
cyg_io_init problems
- To: Ecos Mailing List <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] cyg_io_init problems
- From: Carl van Schaik <carl at leg dot uct dot ac dot za>
- Date: Thu, 7 Sep 2000 12:34:58 +0200 (SAST)
Hi
I just updated my sources (AT91M40400) to 2000-09-06 cvs version (from
august version) and I'm having some problems.
in void cyg_io_init(void) the system is crashing
from what I've been able to debug, (below is the modified source code)
there is an offset problem occuring, the <cyg_devtab_entry_t *t;> seems to
be offset by 4.
cyg_io_init(void)
{
static int _init = false;
cyg_devtab_entry_t *t;
if (_init) return;
for (t = &__DEVTAB__[0]; t != &__DEVTAB_END__; t++) {
//#ifdef CYGDBG_IO_INIT
diag_printf("Init device '%s'\n", t->name);
//#endif
diag_printf("xxxxxxxxxxxxxxxxxxx Init 0x%x 0x%x 0x%x 0x%x\n", t,
&(t->init), t->init, &(t->name));
if (t != 0)
{
if (t->init(t)) {
diag_printf("xxxxxxxxxxxxxxxxxxx avail xxxxxxxxx\n");
t->status |= CYG_DEVTAB_STATUS_AVAIL;
} else {
diag_printf("xxxxxxxxxxxxxxxxxxx not avail xxxxxxxxx\n");
// What to do if device init fails?
// Device not [currently] available
t->status &= ~CYG_DEVTAB_STATUS_AVAIL;
}
}
<gdb trace>
(gdb) c
Continuing.
Init device '<null>'
xxxxxxxxxxxxxxxxxxx Init 0x200B7A4 0x200B7B0 0x200B6D0 0x200B7A4
[New thread 0]
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 0]
0x2013b1c in ?? ()
(gdb) x 0x200b7a4
0x200b7a4 <__DEVTAB__>: 0x00000000
(gdb) x 0x200b7a8
0x200b7a8 <tty_io_diag>: 0x0200b070
(gdb) x 0x200b070
0x200b070
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1744>:
0x7665642f
(gdb) x/10c 0x200b070
0x200b070
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1744>:
47 '/' 100 'd' 101 'e' 118 'v' 47 '/' 116 't' 116 't' 121 'y'
0x200b078
<_._t12Cyg_Mempolt21Z35Cyg_Mempool_dlmalloc_Implementation+1752>:
100 'd' 105 'i'
(gdb)
looks like at
0x200b7a4 <__DEVTAB__>: 0x00000000
the 0x0000000 has been inserted for some reason???
any ideas?
thanks
Carl van Schaik <carl@leg.uct.ac.za>
-----------------------------------------------------
Dept. Electrical Engineering, UCT
621 Menzies Building
University of Cape Town
Rondebosch
Western Cape
7700
South Africa
Tel: +27 21 650-3467
Fax: +27 21 650-3465