public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: John Mills <john.m.mills@alum.mit.edu>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Newbie-Q: Clean exits from tests and examples
Date: Wed, 16 May 2007 18:17:00 -0000	[thread overview]
Message-ID: <20070516175134.GD29989@lunn.ch> (raw)
In-Reply-To: <Pine.LNX.4.44.0705160934220.2647-100000@otter.localdomain>

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
synth.

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-05-16 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 15:05 John Mills
2007-05-16 18:17 ` Andrew Lunn [this message]
2007-05-16 18:36 ` Sergei Gavrikov
2007-05-16 20:42   ` John Mills

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070516175134.GD29989@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=john.m.mills@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).