This is the mail archive of the 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: Newbie-Q: Clean exits from tests and examples

On Wed, May 16, 2007 at 09:58:53AM -0500, John Mills wrote:
> Hello -
> I'm getting started with the eCos-2.0 'synthetic' target and have a couple 
> of beginner's questions.
> I used the command line setup:
> $ ecosconfig new linux default
> [edited 'ecos.ecc' tools prefix to match my installation]
> $ ecosconfig tree
> $ make
> $ make tests
> All this went fine.
> I copied the 'ecos-2.0/examples' directory into my scratch directory 
> and can built the executables, which also went fine:
> $ cd examples
> $ make INSTALL_DIR=<my_install>
> The 'install/.../tests' like 'wallclock' run and exit fine. The 'examples' 
> run fine,
> but don't exit (i.e., 'hello' prints its output then sits until I kill it
> with '^C').
> $ ~/sandbox/ecos/examples> ./hello
> Hello, eCos world!
> [and here we stay until I issue a '^C']
> Question: How should 'examples/hello.c' be structured to run and exit, 
> returning cleanly to the parent Linux shell, or how should I invoke it?

Embedded systems don't exit. They run until the power goes off, or
they crash. Hence there is no generic way to exit on eCos.

If you absolutely, really must exit, try calling cyg_hal_sys_exit() on


Before posting, please read the FAQ:
and search the list archive:

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