[ECOS] Running sample applications on eCos

Jonathan Larmour jlarmour@redhat.com
Thu Dec 27 13:55:00 GMT 2001


Gary Thomas wrote:
> 
> On Wed, 2001-12-26 at 23:27, Subodh wrote:
> >  http://sources.redhat.com/ecos/tools/linux-i686-linux.html  The target is synthetic linux.
> > After the program prints
> > the message "Hello, eCos world!", it doesn't come to $ prompt. I have to press ctrl c
> > to get the dollar prompt.
> >
> >    If I compile this simple program using gcc  ( gcc hello.c ) and then run a.out, $ prompt returns.
> 
> This _is_ the expected behaviour of eCos applications.  When they
> "terminate", they simply spin.  If you want to stop on the exit, try
> setting a breakpoint at 'exit()' or some other appropriate point.

Actually in this particular case, for the synthetic linux target, we do
return to a prompt when a test program finishes, but only in the anonymous
CVS sources: http://sources.redhat.com/ecos/anoncvs.html

This won't happen by default for Hello World (the standard eCos rules
apply). You could do this instead by calling the function 

extern void cyg_test_exit(void);

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine



More information about the Ecos-discuss mailing list