public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problem with Hello world
@ 2007-04-19 15:07 LONY David
  2007-04-19 15:17 ` Andrew Lunn
  0 siblings, 1 reply; 25+ messages in thread
From: LONY David @ 2007-04-19 15:07 UTC (permalink / raw)
  To: ecos-discuss

Hi all,

I'm new to ecos and I've have some problem with the Hello World program 
on Linux Synthetic Target (default template). I'm sucessfully compile 
eCos on the configtool with these options :
-Wall -Wpointer-arith -Winline -Wundef -Woverloaded-virtual -g -O2 
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc
for Global Compiler Flags

and

-g -nostdlib -Wl,--gc-sections -Wl,-static
for Global Linker Flags

then i compile a small program :

#include <stdio.h>
int main(void)
{
 printf("Hello, eCos world!\n");
 return 0;
}

like this : gcc -g -ILinux_install/include main.c -LLinux_install/lib 
-Ttarget.ld -nostdlib
then I try to debug the final executable with gdb like that :

[lony@localhost eCOS_config]$ gdb
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)
Copyright 2004 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 "i386-redhat-linux-gnu".
(gdb) file a.out
Reading symbols from /home/lony/eCOS_config/a.out...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r
Starting program: /home/lony/eCOS_config/a.out
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xbb2000

Program received signal SIGSEGV, Segmentation fault.
0x0100bf46 in _memcpy (s1=0x0, s2=0x100ec68, n=18) at 
/home/lony/ecos/ecos-2.0/packages/infra/v2_0/src/memcpy.c:165
165             *aligned_dst++ = *aligned_src++;
(gdb)

does I make something wrong ?
Thanks you
Best regards

David LONY






-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-04-23 19:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-19 15:07 [ECOS] Problem with Hello world LONY David
2007-04-19 15:17 ` Andrew Lunn
2007-04-19 15:33   ` David LONY
2007-04-19 15:41     ` Andrew Lunn
2007-04-20 13:16       ` David LONY
2007-04-20 13:54         ` Andrew Lunn
2007-04-20 14:16           ` David LONY
2007-04-20 14:51             ` Andrew Lunn
2007-04-20 15:04               ` David LONY
2007-04-20 17:22                 ` Andrew Lunn
2007-04-23  9:46                   ` David LONY
2007-04-23 10:05                     ` Andrew Lunn
2007-04-23 12:36                       ` Robin Randhawa
2007-04-23 14:28                       ` David LONY
2007-04-23 14:48                         ` Andrew Lunn
2007-04-23 14:50                         ` [ECOS] " Grant Edwards
2007-04-23 14:30                       ` Grant Edwards
2007-04-23 14:54                         ` Andrew Lunn
2007-04-23 15:26                           ` Grant Edwards
2007-04-23 15:30                           ` David LONY
2007-04-23 15:40                             ` Grant Edwards
2007-04-23 19:15                               ` Grant Edwards
2007-04-23 15:09                         ` David LONY
2007-04-23 15:12                           ` Andrew Lunn
2007-04-23 15:35                           ` Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).