* [ECOS] strange startup behavior
@ 2004-06-28 20:11 Rycerz Roman-G11565
0 siblings, 0 replies; only message in thread
From: Rycerz Roman-G11565 @ 2004-06-28 20:11 UTC (permalink / raw)
To: 'ecos-discuss@sources.redhat.com'
Hi, I am hoping someone can clue me into what going wrong here...
some background
ecos configuration
Common Error Support
Dynamic Memory allocation
eCos common HAL
eCos Kernel
I/O subsystem
Infrastructure
ISO C and POSIX Infrastructure
ISO C library general utilities
ISO C library internationalization
ISO C library standard i/o
ISO C library string functions
serial device package
Its a powerpc platform, using gcc 3.2.1, insight 5.3
a small program snippet
static void can_prog(CYG_ADDRESS data)
{
char *flx_t = "/dev/canA";
char *flx_r = "/dev/canB";
cyg_uint8 can_data[8];
Cyg_ErrNo err;
cyg_io_handle_t t, r;
cyg_uint32 t_len = sizeof(can_data);
cyg_uint32 r_len = sizeof(can_data);
err = cyg_io_lookup(flx_t, &t);
err = cyg_io_lookup(flx_r, &r);
err = cyg_io_read(r, can_data, &r_len);
err = cyg_io_write(t, can_data, &t_len);
}
void cyg_user_start(void)
{
cyg_thread_create(4, can_prog, (cyg_addrword_t) 0, "can", (void *)stack[0], STACKSIZE, &thread[0], &thread_obj[0]);
cyg_thread_resume(thread[0]);
}
if the call to cyg_io_write is not there this program runs fine
if it is there before it even executes cyg_user is crashes with a segmentation violation
Here is where it is
module routine
hal_misc.c cyg_hal_invoke_constructors
thread.cxx _GOLBAL_D.15000_2N18cyg_hardwarethread12thread_entryEP10cyg_thread
thread.cxx _static_initialization_and_destruction
thread.cxx ~cyg_idlethread
thread.cxx ~cyg_thread
thread.cxx cyg_thread::remove_from_list
here it tries to access some address in boom boom land
any clues ??? Thanks in advance
roman
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-28 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-28 20:11 [ECOS] strange startup behavior Rycerz Roman-G11565
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).