From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24631 invoked by alias); 28 Aug 2009 15:22:03 -0000 Received: (qmail 24619 invoked by uid 22791); 28 Aug 2009 15:22:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mtaout02-winn.ispmail.ntl.com (HELO mtaout02-winn.ispmail.ntl.com) (81.103.221.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Aug 2009 15:21:55 +0000 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090828152151.YOOL6611.mtaout02-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Fri, 28 Aug 2009 16:21:51 +0100 Received: from cog.dallaway.org.uk ([86.9.207.237]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090828152151.CLKI2093.aamtaout03-winn.ispmail.ntl.com@cog.dallaway.org.uk>; Fri, 28 Aug 2009 16:21:51 +0100 Received: from cog.dallaway.org.uk (cog.dallaway.org.uk [127.0.0.1]) by cog.dallaway.org.uk (8.13.8/8.13.8) with ESMTP id n7SFLmO6026412; Fri, 28 Aug 2009 16:21:49 +0100 Message-ID: <4A97F60C.2030208@dallaway.org.uk> Date: Fri, 28 Aug 2009 15:22:00 -0000 From: John Dallaway User-Agent: Thunderbird 2.0.0.22 (X11/20090625) MIME-Version: 1.0 To: Uwe Kindler CC: eCos Discussion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: [ECOS] uSTL hello world X-SW-Source: 2009-08/txt/msg00102.txt.bz2 Hi Uwe There seems to be a problem with the uSTL hello world example given in the uSTL documentation. The code produces no output. However, if I add a printf() call after the cout.flush(), then I see _both_ messages. This is not a case of printf() flushing the output - I can observe the output from cout on the diagnostics channel _before_ the call to printf() is made. In fact, if I move the printf() call to the start of main(), then everything still works. eCos was configured with default template, pc_i82559 target, ustl and fileio packages added, no optimization. Debugging via RedBoot over ethernet. Does the hello world example work unmodified on your own hardware platform? John Dallaway --cut here-- #include //#include using namespace ustl; int main (int argc, char* argv[]) { cout << "Hello world!\n"; cout.flush(); // printf("Hello printf!\n"); return EXIT_SUCCESS; } -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss