From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15562 invoked by alias); 16 May 2007 17:51:53 -0000 Received: (qmail 15549 invoked by uid 22791); 16 May 2007 17:51:53 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 May 2007 17:51:49 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1HoNew-0002gJ-00; Wed, 16 May 2007 19:51:34 +0200 Date: Wed, 16 May 2007 18:17:00 -0000 To: John Mills Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070516175134.GD29989@lunn.ch> Mail-Followup-To: John Mills , ecos-discuss@ecos.sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Newbie-Q: Clean exits from tests and examples X-SW-Source: 2007-05/txt/msg00082.txt.bz2 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= > > 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