This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
uSTL hello world
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Uwe Kindler <uwe dot kindler at cetoni dot de>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 28 Aug 2009 16:21:48 +0100
- Subject: [ECOS] uSTL hello world
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 <ustl.h>
//#include <stdio.h>
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