This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running sample applications on eCos


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]