This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Running hello.c on i386


I tried to make hello.c using the Makefile given in the /examples.

bash.exe-2.04$ make hello.o
i386-elf-gcc                                     -c -o hello.o -g -Wall
-I//c/us
ers/philip/ecos/stub1_install/include -ffunction-sections
-fdata-sections hello.
c
hello.c:2: stdio.h: No such file or directory
make: *** [hello.o] Error 1

I encountered some errors and I fixed it by adding one more include
path...

bash.exe-2.04$ make hello.o
i386-elf-gcc                                     -c -o hello.o -g -Wall
-I//c/us
ers/philip/ecos/stub1_install/include -I/usr/include -ffunction-sections
-fdata-
sections hello.c
bash.exe-2.04$

The compilation was successful.  The target I used is a PIII machine,
host is Windows NT.  I started up the i386 target using the gdb stub
floppy and run the following:

bash.exe-2.04$ i386-elf-gdb -nw hello.o
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "--host=i686-pc-cygwin --target=i386-elf"...
(gdb) set remotebaud 38400
(gdb) target remote com1
Remote debugging using com1
0x37dc in ?? ()
(gdb) continue
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x37dc in ?? ()

Anyone has any idea why the program hit a stop?

Philip Teng
DSO National Labs
tcheewan@dso.org.sg



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]