This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Newbie in truble, "Hello World" don't exit
- From: "paolo\.destro-demo" <paolo dot destro-demo at poste dot it>
- To: "ecos-discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 10 Mar 2006 09:52:24 +0100
- Subject: [ECOS] Newbie in truble, "Hello World" don't exit
Hi List.
I'm tryng to execute a simple program "hello world", I can
compile it and then I can run it, but it doesn't stop.
The program print on screen the string "Hello eCos world",
and than stop without finish.
Using ddd, I have seen it arrive at the last "}", using next
command I see gdb go in "invokemain.cxx", and then gdb stop
there at the line 120. If i push "next" ddd say "waiting
untill GDB gets ready".
This is the program
//hello.cc
#include <stdio.h>
int main(void)
{
printf("Hello, eCos world!\n");
return 0;
}
##################################################
This is the script I use to compile
#!/bin/bash
SRC="hello"
for I in $SRC;
do
gcc -c -o $I.o
-I/home/destro/ecos/ecos-work/mlp_net_install/include -Wall
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections
-fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
-finit-priority $I.cc;
done
for I in $SRC; do
OBJS="$OBJS $I.o"
done;
gcc -nostartfiles
-L/home/destro/ecos/ecos-work/mlp_net_install/lib
-Ttarget.ld -g -nostdlib -Wl,--gc-sections -Wl,-static -o
run.x $OBJS;
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss