public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] twothreads.c-error
@ 2002-07-18  4:38 arun%anwsi.com
  2002-07-18  6:33 ` Scott Dattalo
  2002-07-18  6:45 ` Gary Thomas
  0 siblings, 2 replies; 3+ messages in thread
From: arun%anwsi.com @ 2002-07-18  4:38 UTC (permalink / raw)
  To: ecos-discuss

hello friends

  when i was executing the example program hello.c and twothreads.c 
there was some errors

1) i edited the makefile 

2) gcc -g -I/user/cvs-1.11/packages/install/include/ hello.c \
< -L/user/cvs-1.11/packages/install/lib -Ttarget.ld -nostdlib

there was an error 
" collct2: ls terminated with signal 11 [segmentation fault ]"

3)but after executing "gcc -g -I/user/cvs-1.11/packages/install/include/
hello.c"  alone
i got a.out file

4) but when executing "gcc -g -I/user/cvs-1.11/packages/install/include/
pthreads.c \
< -L/user/cvs-1.11/packages/install/lib -Ttarget.ld -nostdlib

i got the same "segmentation fault "

can i know the reason for this error
thanks in advance
arun.c



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



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

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

* Re: [ECOS] twothreads.c-error
  2002-07-18  4:38 [ECOS] twothreads.c-error arun%anwsi.com
@ 2002-07-18  6:33 ` Scott Dattalo
  2002-07-18  6:45 ` Gary Thomas
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Dattalo @ 2002-07-18  6:33 UTC (permalink / raw)
  Cc: ecos-discuss

On Thu, 18 Jul 2002, arun%anwsi.com@mail3.srivari.net wrote:

> hello friends
> 
>   when i was executing the example program hello.c and twothreads.c 
> there was some errors

What does the gdb trace look like?

I've come across several seg faults in eCos (not because of eCos, but 
because of the way I'm mis-using eCos) and always have managed to catch 
them with the debugger. I suggest you run the code in the debugger. When 
the fault occurs, examine the call stack: 

gdb> bt

bt = backtrace

This will show the sequence of calls leading up to the point of failure. 
You'll probably recognize one of those calls :).


---
BTW, I'm not sure which processor you're targetting, but you may be able 
to use the simulator. If you're using arm-elf-*, then the Insight debugger 
can simulate the ARM processor for you. Start the debugger:

$ arm-elf-gdb your-executable

From within Insight, select File->Target Settings. A window will pop up. 
In the connection box, you'll see "Target". Click on the pulldown arrow 
and select simulator.

After you've done that, you'll need to connect to the "target" and load 
the code. Do this from the main Insight menu by clicking on the "Run" menu 
and selecting "Connect to Target". Then "down load" the code through the 
same menu.

Now you should be able to debug your code as though if it is running on a 
real processor. 

I've been using this simulator and the one with SID and have found them 
invaluable. At this stage of my project, I'm still trying to sort out the 
software so that I can make decisions about the hardware (like how much 
RAM and ROM I'll need). 

I hope this helps.

Scott


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

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

* Re: [ECOS] twothreads.c-error
  2002-07-18  4:38 [ECOS] twothreads.c-error arun%anwsi.com
  2002-07-18  6:33 ` Scott Dattalo
@ 2002-07-18  6:45 ` Gary Thomas
  1 sibling, 0 replies; 3+ messages in thread
From: Gary Thomas @ 2002-07-18  6:45 UTC (permalink / raw)
  To: arun; +Cc: eCos Discussion

On Thu, 2002-07-18 at 05:38, arun%anwsi.com@mail3.srivari.net wrote:
> hello friends
> 
>   when i was executing the example program hello.c and twothreads.c 
> there was some errors
> 
> 1) i edited the makefile 
> 
> 2) gcc -g -I/user/cvs-1.11/packages/install/include/ hello.c \
> < -L/user/cvs-1.11/packages/install/lib -Ttarget.ld -nostdlib
> 
> there was an error 
> " collct2: ls terminated with signal 11 [segmentation fault ]"
> 
> 3)but after executing "gcc -g -I/user/cvs-1.11/packages/install/include/
> hello.c"  alone
> i got a.out file
> 

This would be a native file - not an eCos program.

> 4) but when executing "gcc -g -I/user/cvs-1.11/packages/install/include/
> pthreads.c \
> < -L/user/cvs-1.11/packages/install/lib -Ttarget.ld -nostdlib
> 
> i got the same "segmentation fault "
> 
> can i know the reason for this error

This is a problem with the tools, not eCos.  The failure is happening 
with the linker while it's trying to build the eCos application.

* What tools are you running?
* What's the host?
* Have you followed [to the letter] the install instructions from 
  our web site?



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

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

end of thread, other threads:[~2002-07-18 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-18  4:38 [ECOS] twothreads.c-error arun%anwsi.com
2002-07-18  6:33 ` Scott Dattalo
2002-07-18  6:45 ` Gary Thomas

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).