public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] hello world app SEG faults with Linux synth target
@ 2009-07-21  6:30 Mandeep Sandhu
  2009-07-21  7:30 ` Sergei Gavrikov
  2009-07-21  7:46 ` [ECOS] " John Dallaway
  0 siblings, 2 replies; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21  6:30 UTC (permalink / raw)
  To: ecos-discuss

Hi All,

My hello world app crashes with seg fault when I try to run it. Here's the o/p:

mandeep@mindstorm:~/ecos/ecos-3.0/examples$ ./hello
Segmentation fault
mandeep@mindstorm:~/ecos/ecos-3.0/examples$ strace ./hello
execve("./hello", ["./hello"], [/* 41 vars */]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
mandeep@mindstorm:~/ecos/ecos-3.0/examples$

Any clues how to fix this?

How does the hello world app make use of the ecosynth app?

On the doc page () it says:

"...I/O facilities are provided through an I/O auxiliary process, ecosynth, that
gets spawned by the eCos application during startup"

My ecosynth is installed at:
/usr/local/libexec/ecos/hal/synth/arch/v3_0/

I added this to my PATH env, but that didn't help at all.

Should this be statically linked to my app while compiling? If so, I'll have
to modify my Makefile. I used "build_Makefile" in my repos examples dir
to generate the Makefile (i later just altered the target names in the generic
Makefile).

Thanks,
-mandeep

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21  6:30 [ECOS] hello world app SEG faults with Linux synth target Mandeep Sandhu
@ 2009-07-21  7:30 ` Sergei Gavrikov
       [not found]   ` <b18c5f790907210111k3a4643adg80003969e2bf0520@mail.gmail.com>
  2009-07-21  7:46 ` [ECOS] " John Dallaway
  1 sibling, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21  7:30 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: ecos-discuss

Mandeep Sandhu writes:
 
> My hello world app crashes with seg fault when I try to run it.

Look at this recent thread
http://ecos.sourceware.org/ml/ecos-devel/2009-06/msg00042.html

May be, that's it.

Sergei

-- 
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] 32+ messages in thread

* [ECOS] Re: hello world app SEG faults with Linux synth target
  2009-07-21  6:30 [ECOS] hello world app SEG faults with Linux synth target Mandeep Sandhu
  2009-07-21  7:30 ` Sergei Gavrikov
@ 2009-07-21  7:46 ` John Dallaway
  2009-07-21  8:10   ` Mandeep Sandhu
  1 sibling, 1 reply; 32+ messages in thread
From: John Dallaway @ 2009-07-21  7:46 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: ecos-discuss

Hi Mandeep

Mandeep Sandhu wrote:

> My hello world app crashes with seg fault when I try to run it. Here's the o/p:
> 
> mandeep@mindstorm:~/ecos/ecos-3.0/examples$ ./hello
> Segmentation fault
> mandeep@mindstorm:~/ecos/ecos-3.0/examples$ strace ./hello
> execve("./hello", ["./hello"], [/* 41 vars */]) = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> mandeep@mindstorm:~/ecos/ecos-3.0/examples$
> 
> Any clues how to fix this?
> 
> How does the hello world app make use of the ecosynth app?

You should not need the I/O auxiliary process for a "hello world"
application.

Which Linux distribution and version are you using?

If you are running on Debian or Ubuntu, try adding
"-fno-stack-protector" to CYGBLD_GLOBAL_CFLAGS. Ref:

  http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000801

You will need to "make clean" and rebuild eCos.

John Dallaway

-- 
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] 32+ messages in thread

* [ECOS] Re: hello world app SEG faults with Linux synth target
  2009-07-21  7:46 ` [ECOS] " John Dallaway
@ 2009-07-21  8:10   ` Mandeep Sandhu
  2009-07-21  9:41     ` John Dallaway
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21  8:10 UTC (permalink / raw)
  To: John Dallaway; +Cc: ecos-discuss

>>
>> Any clues how to fix this?
>>
>> How does the hello world app make use of the ecosynth app?
>
> You should not need the I/O auxiliary process for a "hello world"
> application.

Ok. So the printf's would use the std in/out/err file descriptors offered
to the ecos process by Linux?

>
> Which Linux distribution and version are you using?

uname -a:
Linux mindstorm 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51
UTC 2009 i686 GNU/Linux
>
> If you are running on Debian or Ubuntu, try adding
> "-fno-stack-protector" to CYGBLD_GLOBAL_CFLAGS. Ref:
>
>  http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000801
>
> You will need to "make clean" and rebuild eCos.

Just did that and it seems to work...though I don't see the printf's
on the console
and the app does not exit! Where does the printf output go?

Thanks as always,
-mandeep

>
> John Dallaway
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
       [not found]   ` <b18c5f790907210111k3a4643adg80003969e2bf0520@mail.gmail.com>
@ 2009-07-21  8:43     ` Sergei Gavrikov
  2009-07-21  9:05       ` Sergei Gavrikov
  2009-07-21  9:29       ` Sergei Gavrikov
  0 siblings, 2 replies; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21  8:43 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

Mandeep Sandhu wrote:
> >> My hello world app crashes with seg fault when I try to run it.
> >
> > Look at this recent thread
> > http://ecos.sourceware.org/ml/ecos-devel/2009-06/msg00042.html
> >
> > May be, that's it.
> 
> That was it! :)

Please, keep the list.

> But now, even though the app does not seg faults, it seems to be hung (as in
> the app does NOT exit)...and I don't see any printf output! :(

cdl_option CYGSEM_LIBC_EXIT_STOPS_SYSTEM {
    user_value 1
};

There is a nice comment for the option in ecos.ecc

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21  8:43     ` Sergei Gavrikov
@ 2009-07-21  9:05       ` Sergei Gavrikov
  2009-07-21 11:00         ` Mandeep Sandhu
  2009-07-21  9:29       ` Sergei Gavrikov
  1 sibling, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21  9:05 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

On Tue, Jul 21, 2009 at 11:47:34AM +0300, Sergei Gavrikov wrote:
> Mandeep Sandhu wrote:
> > >> My hello world app crashes with seg fault when I try to run it.
> > >
> > > Look at this recent thread
> > > http://ecos.sourceware.org/ml/ecos-devel/2009-06/msg00042.html
> > >
> > > May be, that's it.
> > 
> > That was it! :)
> 
> Please, keep the list.
> 
> > But now, even though the app does not seg faults, it seems to be hung (as in
> > the app does NOT exit)...and I don't see any printf output! :(

Build and try eCos tests first (why hello?)

make -C language/c/libc/stdio/current tests

then try

./install/tests/language/c/libc/stdio/current/tests/stdiooutput

and then invoke that test with `--io' arg.


Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21  8:43     ` Sergei Gavrikov
  2009-07-21  9:05       ` Sergei Gavrikov
@ 2009-07-21  9:29       ` Sergei Gavrikov
  2009-07-21 10:51         ` Mandeep Sandhu
  1 sibling, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21  9:29 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

On Tue, Jul 21, 2009 at 11:47:34AM +0300, Sergei Gavrikov wrote:
> Mandeep Sandhu wrote:
> > >> My hello world app crashes with seg fault when I try to run it.
> > >
> > > Look at this recent thread
> > > http://ecos.sourceware.org/ml/ecos-devel/2009-06/msg00042.html
> > >
> > > May be, that's it.
> > 
> > That was it! :)
> 
> Please, keep the list.
> 
> > But now, even though the app does not seg faults, it seems to be hung (as in
> > the app does NOT exit)...and I don't see any printf output! :(
> 
> cdl_option CYGSEM_LIBC_EXIT_STOPS_SYSTEM {
>     user_value 1
> };

I was wrong with opt. Read good answer from Andrew Lunn
http://sourceware.org/ml/ecos-discuss/2007-05/msg00081.html

Sergei

-- 
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] 32+ messages in thread

* [ECOS] Re: hello world app SEG faults with Linux synth target
  2009-07-21  8:10   ` Mandeep Sandhu
@ 2009-07-21  9:41     ` John Dallaway
  2009-07-21 10:50       ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: John Dallaway @ 2009-07-21  9:41 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: ecos-discuss

Mandeep Sandhu wrote:

>>> Any clues how to fix this?
>>>
>>> How does the hello world app make use of the ecosynth app?
>> You should not need the I/O auxiliary process for a "hello world"
>> application.
> 
> Ok. So the printf's would use the std in/out/err file descriptors offered
> to the ecos process by Linux?

printf() output should go to stdout by default.

>> Which Linux distribution and version are you using?
> 
> uname -a:
> Linux mindstorm 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51
> UTC 2009 i686 GNU/Linux
>> If you are running on Debian or Ubuntu, try adding
>> "-fno-stack-protector" to CYGBLD_GLOBAL_CFLAGS. Ref:
>>
>>  http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000801
>>
>> You will need to "make clean" and rebuild eCos.
> 
> Just did that and it seems to work...though I don't see the printf's
> on the console and the app does not exit!

Running the "stdiooutput" test (without "--io") works for me on CentOS
5. Test output is on stdout and the test exits normally.

John Dallaway

-- 
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] 32+ messages in thread

* [ECOS] Re: hello world app SEG faults with Linux synth target
  2009-07-21  9:41     ` John Dallaway
@ 2009-07-21 10:50       ` Mandeep Sandhu
  0 siblings, 0 replies; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21 10:50 UTC (permalink / raw)
  To: John Dallaway; +Cc: ecos-discuss

>> uname -a:
>> Linux mindstorm 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51
>> UTC 2009 i686 GNU/Linux
>>> If you are running on Debian or Ubuntu, try adding
>>> "-fno-stack-protector" to CYGBLD_GLOBAL_CFLAGS. Ref:
>>>
>>>  http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000801
>>>
>>> You will need to "make clean" and rebuild eCos.
>>
>> Just did that and it seems to work...though I don't see the printf's
>> on the console and the app does not exit!
>
> Running the "stdiooutput" test (without "--io") works for me on CentOS
> 5. Test output is on stdout and the test exits normally.

I don't get anything on my console when i run "stdiooutput" test (w/o
-io option).

I'm running Ubuntu (Jaunty Jackalope).

Thanks,
-mandeep

>
> John Dallaway
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21  9:29       ` Sergei Gavrikov
@ 2009-07-21 10:51         ` Mandeep Sandhu
  0 siblings, 0 replies; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21 10:51 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos discuss list

>> > But now, even though the app does not seg faults, it seems to be hung (as in
>> > the app does NOT exit)...and I don't see any printf output! :(
>>
>> cdl_option CYGSEM_LIBC_EXIT_STOPS_SYSTEM {
>>     user_value 1
>> };
>
> I was wrong with opt. Read good answer from Andrew Lunn
> http://sourceware.org/ml/ecos-discuss/2007-05/msg00081.html

Ok. So that explains why hello (or for that matter any other app) wont
exit. Thanks.

Now to figure where my printfs are going! :)

Regards,
-mandeep
>
> Sergei
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21  9:05       ` Sergei Gavrikov
@ 2009-07-21 11:00         ` Mandeep Sandhu
  2009-07-21 11:18           ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21 11:00 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos discuss list

>
> ./install/tests/language/c/libc/stdio/current/tests/stdiooutput
>
> and then invoke that test with `--io' arg.
>

If I run stdiooutput with the "-io" opt, I get a bunch of errors:

$ ./stdiooutput -io
can't read "synth::_ecos_repository": no such variable
    while executing
"set _repo $synth::_ecos_repository"
...
...

So I figure, that the ecos repo path is missing. After setting ECOS_REPOSITORY
env var, I get a window (what is this? ecos console?) BUT no output!

Am I missing something?

Thanks,
-mandeep

>
> Sergei
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21 11:00         ` Mandeep Sandhu
@ 2009-07-21 11:18           ` Sergei Gavrikov
       [not found]             ` <b18c5f790907210442q59e83781lf138151b37244a53@mail.gmail.com>
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21 11:18 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

On Tue, Jul 21, 2009 at 04:30:05PM +0530, Mandeep Sandhu wrote:
> >
> > ./install/tests/language/c/libc/stdio/current/tests/stdiooutput
> >
> > and then invoke that test with `--io' arg.
> >
> 
> If I run stdiooutput with the "-io" opt, I get a bunch of errors:
> 
> $ ./stdiooutput -io
> can't read "synth::_ecos_repository": no such variable
>     while executing
> "set _repo $synth::_ecos_repository"
> ...
> ...
> 
> So I figure, that the ecos repo path is missing. After setting ECOS_REPOSITORY
> env var, I get a window (what is this? ecos console?) BUT no output!
> 
> Am I missing something?
> 

May be you do all are not leaving GUI tool (configtool). Try outside GUI:

Alt-F2, type and run

gnome-terminal

Chdir into tests dir, then invoke 3 commands in the terminal and send the output

1) echo $ECOS_REPOSITORY
2) gcc -v
3) tclsh
% info pa
^D

if ECOS_REPOSITORY is not empty, try invoke stdiooutput in that terminal
session.

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
       [not found]             ` <b18c5f790907210442q59e83781lf138151b37244a53@mail.gmail.com>
@ 2009-07-21 12:29               ` Sergei Gavrikov
  2009-07-21 14:01                 ` Mandeep Sandhu
  2009-07-22  8:55                 ` Mandeep Sandhu
  0 siblings, 2 replies; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21 12:29 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

Please copy the mailing list to your replies - that way everyone
benefits.

Mandeep Sandhu writes:

> $ echo $ECOS_REPOSITORY
> /home/mandeep/ecos/ecos-3.0/packages
 
This looks well.

> $ gcc -v

[snip]

> gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

GCC likes your kernel is the very recent stuff.

> $ tclsh
> % info pa
> 8.4.19

This looks well.

> > if ECOS_REPOSITORY is not empty, try invoke stdiooutput in that terminal
> > session.

> I did. Same result. Screenshot attached.
                      ^^^^^^^^^^^^^^^^^^^
                      Thanks, but that was odd :-)

So, _perhaps_ your issue is freshmeat kernel or (and) gcc.

You can

1) Try `i386-elf' toolchain from eCosCentric
ftp://ecos.sourceware.org/pub/ecos/gnutools/i386linux/ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2

STFW
http://sourceware.org/ml/ecos-discuss/2009-05/msg00010.html

If that won't be work for you

2) ... downgrade your distro (I have success with Ubuntu 7.04, 8.04 LTS)
or try to run that distro on any kind VM under your nowadays distro.


Sergei


-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21 12:29               ` Sergei Gavrikov
@ 2009-07-21 14:01                 ` Mandeep Sandhu
  2009-07-21 14:11                   ` Sergei Gavrikov
  2009-07-22  8:55                 ` Mandeep Sandhu
  1 sibling, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-21 14:01 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos discuss list

On Tue, Jul 21, 2009 at 6:03 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> Please copy the mailing list to your replies - that way everyone
> benefits.
>
> Mandeep Sandhu writes:
>
>> $ echo $ECOS_REPOSITORY
>> /home/mandeep/ecos/ecos-3.0/packages
>
> This looks well.
>
>> $ gcc -v
>
> [snip]
>
>> gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
>
> GCC likes your kernel is the very recent stuff.

somehow i don;t feel too good about my "bleeding" edge s/w! :)
>
>> $ tclsh
>> % info pa
>> 8.4.19
>
> This looks well.
>
>> > if ECOS_REPOSITORY is not empty, try invoke stdiooutput in that terminal
>> > session.
>
>> I did. Same result. Screenshot attached.
>                      ^^^^^^^^^^^^^^^^^^^
>                      Thanks, but that was odd :-)
>
> So, _perhaps_ your issue is freshmeat kernel or (and) gcc.

Out of curiosity, what _is_ that window...where the o/p's supposed to come?
Is it like some virtual term for ecos?

>
> You can
>
> 1) Try `i386-elf' toolchain from eCosCentric
> ftp://ecos.sourceware.org/pub/ecos/gnutools/i386linux/ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2
>
> STFW
> http://sourceware.org/ml/ecos-discuss/2009-05/msg00010.html

Ok. I'll try this out and let you know the results.

>
> If that won't be work for you
>
> 2) ... downgrade your distro (I have success with Ubuntu 7.04, 8.04 LTS)
> or try to run that distro on any kind VM under your nowadays distro.

Downgrade seems doable. If the first method doesn't work i'll try an older
version of Ubuntu.

Thanks,
-mandeep
>
>
> Sergei
>
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21 14:01                 ` Mandeep Sandhu
@ 2009-07-21 14:11                   ` Sergei Gavrikov
  0 siblings, 0 replies; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-21 14:11 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

Mandeep Sandhu wrote:

> Out of curiosity, what _is_ that window...where the o/p's supposed to
> come? Is it like some virtual term for ecos?

I'm sorry, I don't use CT, if you told about

  Tools
    Shell...

That item invokes xterm terminal emulator
http://en.wikipedia.org/wiki/Xterm

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-21 12:29               ` Sergei Gavrikov
  2009-07-21 14:01                 ` Mandeep Sandhu
@ 2009-07-22  8:55                 ` Mandeep Sandhu
  2009-07-22 10:45                   ` Sergei Gavrikov
  1 sibling, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-22  8:55 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos discuss list

> So, _perhaps_ your issue is freshmeat kernel or (and) gcc.
>
> You can
>
> 1) Try `i386-elf' toolchain from eCosCentric
> ftp://ecos.sourceware.org/pub/ecos/gnutools/i386linux/ecoscentric-gnutools-i386-elf-20081107-sw.i386linux.tar.bz2
>
> STFW
> http://sourceware.org/ml/ecos-discuss/2009-05/msg00010.html
>
> If that won't be work for you
>
> 2) ... downgrade your distro (I have success with Ubuntu 7.04, 8.04 LTS)
> or try to run that distro on any kind VM under your nowadays distro.

So I tried this step first (everythin built with the hosts GCC), but
unfortunately
I got the same results! :(

Some info on the new setup:

$ cat /etc/issue
Ubuntu 7.10 \n \l

$ uname -a
Linux vdp-server-1 2.6.22-14-server #1 SMP Tue Feb 12 08:27:05 UTC
2008 i686 GNU/Linux

$ echo $ECOS_REPOSITORY
/home/server/ecos/ecos-3.0/packages

$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

$ tclsh
% info pa
8.3.5
%

I'll goto step 1 now.

I have installed the i386-elf toolchain using the ecos-install.tcl script.
Hope this is ok.

Regards,
-mandeep

>
>
> Sergei
>
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-22  8:55                 ` Mandeep Sandhu
@ 2009-07-22 10:45                   ` Sergei Gavrikov
  2009-07-22 10:54                     ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-22 10:45 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: eCos discuss list

On Wed, Jul 22, 2009 at 02:25:11PM +0530, Mandeep Sandhu wrote:
> Some info on the new setup:
> 
> $ cat /etc/issue
> Ubuntu 7.10 \n \l

Unfortunately, I did not try this distro. I use 7.04 and 8.04.3 LTS.

> I'll goto step 1 now.
> 
> I have installed the i386-elf toolchain using the ecos-install.tcl
> script. Hope this is ok.

IMO, a way to build linux synth eCos with stable i386-elf toolchain is
more deterministic way to get synth working. BTW, you can just preset

cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
    user_value i386-elf
};

and do not use those my CC=... AR=... arguments for make. And an absent
libgcc_eh.a is a minor issue.

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-22 10:45                   ` Sergei Gavrikov
@ 2009-07-22 10:54                     ` Mandeep Sandhu
  2009-07-22 14:05                       ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-22 10:54 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: eCos discuss list

>
> cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
>    user_value i386-elf
> };
>
> and do not use those my CC=... AR=... arguments for make. And an absent
> libgcc_eh.a is a minor issue.

I did that ...i used the GUI tool though!

I also followed your steps for removing the libgcc_eh.a from the target.ld

It still gives the same result! :(

BUT.

Let me try again by starting afresh, from scratch for everything, using the
i386-elf toolchain. Let me get back here then.

As an aside, I tried doing a "Tools -> Run Tests" in the GUI...

It shows "exec error - No such file or directory" in the output window.

Thanks,
-mandeep

>
> Sergei
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-22 10:54                     ` Mandeep Sandhu
@ 2009-07-22 14:05                       ` Mandeep Sandhu
  2009-07-22 14:10                         ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-22 14:05 UTC (permalink / raw)
  To: Sergei Gavrikov, John Dallaway; +Cc: eCos discuss list

> Let me try again by starting afresh, from scratch for everything, using the
> i386-elf toolchain. Let me get back here then.

It worked! :)

I did a fresh start, i.e install ecos with i386-elf binaries.

This is what I did (on my Ubuntu 9.04):

$ mkdir linux-synth
$ cd linux-synth
$ ecosconfig new linux
$ ecosconfig add lwip_eth
$ ecosconfig add libc_stdio
$ ecosconfig tree

edit ecos.ecc
set CYGBLD_GLOBAL_COMMAND_PREFIX to "i386-elf"
change CYGBLD_GLOBAL_CFLAGS, append -fno-stack-protector

$ make
$ sed -i 's/ libgcc_eh.a//' install/lib/target.ld
$ make tests
$ ./install/tests/language/c/libc/stdio/v3_0/tests/stdiooutput

NOTE: I did not have to give the "-io" option.

Sergei, John, thanks a lot for your help.

Regards,
-mandeep

>
> As an aside, I tried doing a "Tools -> Run Tests" in the GUI...
>
> It shows "exec error - No such file or directory" in the output window.
>
> Thanks,
> -mandeep
>
>>
>> Sergei
>>
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-22 14:05                       ` Mandeep Sandhu
@ 2009-07-22 14:10                         ` Sergei Gavrikov
  2009-07-23  8:04                           ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-22 14:10 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

On Wed, Jul 22, 2009 at 07:35:03PM +0530, Mandeep Sandhu wrote:
> > Let me try again by starting afresh, from scratch for everything, using the
> > i386-elf toolchain. Let me get back here then.
> 
> It worked! :)

[snip]

> edit ecos.ecc
> set CYGBLD_GLOBAL_COMMAND_PREFIX to "i386-elf"

That's right.

> change CYGBLD_GLOBAL_CFLAGS, append -fno-stack-protector
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

And this step is needed only if you use Debian/Ubuntu host GCC.

Will,

Sergei


-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-22 14:10                         ` Sergei Gavrikov
@ 2009-07-23  8:04                           ` Mandeep Sandhu
  2009-07-23  8:20                             ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23  8:04 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

After the stdiooutput test worked, I thought I'd try and run the
simple hello world program
too! (just for completeness support).

For this to work, I had to add the extra package libc_stdio (and it's
related dependencies).

However, on running the hello world app, there's no output.

Strangely now, even my earlier stdiooutput program (which was working)
stops working
after printing the following:

$ ./install/tests/language/c/libc/stdio/v3_0/tests/stdiooutput
INFO:<Starting tests from testcase
/home/mandeep/ecos/ecos-3.0/packages/language/c/libc/stdio/v3_0/tests/stdiooutput.c
for C library stdio output functions>
INFO:<The output of these tests needs to be manually verified.>
INFO:<Expect: Hello printf world 42!>

I have to press Ctrl+C to kill the app.

Running "strace" on both programs reveal some seg faults happening internally.

$ starce ./hello
...
...
 VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ


$ starce ./install/tests/language/c/libc/stdio/v3_0/tests/stdiooutput
...
...
 VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
sigreturn()                             = ? (mask now [TRAP ABRT USR1
USR2 STKFLT TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH PWR SYS RTMIN])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

I had compiled the app too with the extra -fno-stack-protector switch.
Is that fine?

Regards,
-mandeep


On Wed, Jul 22, 2009 at 7:40 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> On Wed, Jul 22, 2009 at 07:35:03PM +0530, Mandeep Sandhu wrote:
>> > Let me try again by starting afresh, from scratch for everything, using the
>> > i386-elf toolchain. Let me get back here then.
>>
>> It worked! :)
>
> [snip]
>
>> edit ecos.ecc
>> set CYGBLD_GLOBAL_COMMAND_PREFIX to "i386-elf"
>
> That's right.
>
>> change CYGBLD_GLOBAL_CFLAGS, append -fno-stack-protector
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> And this step is needed only if you use Debian/Ubuntu host GCC.
>
> Will,
>
> Sergei
>
>

--
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23  8:04                           ` Mandeep Sandhu
@ 2009-07-23  8:20                             ` Sergei Gavrikov
  2009-07-23  9:36                               ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23  8:20 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

Mandeep Sandhu wrote:
> After the stdiooutput test worked, I thought I'd try and run the
> simple hello world program too! (just for completeness support).
> 
> For this to work, I had to add the extra package libc_stdio (and it's
> related dependencies).
> 
> However, on running the hello world app, there's no output.
> 
> Strangely now, even my earlier stdiooutput program (which was working)

[snip]

Are you sure that you use `i386-elf-gcc' as it was yesterday? May be
your today's build was done with host GCC again?

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23  8:20                             ` Sergei Gavrikov
@ 2009-07-23  9:36                               ` Mandeep Sandhu
  2009-07-23  9:46                                 ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23  9:36 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 1:49 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> Mandeep Sandhu wrote:
>> After the stdiooutput test worked, I thought I'd try and run the
>> simple hello world program too! (just for completeness support).
>>
>> For this to work, I had to add the extra package libc_stdio (and it's
>> related dependencies).
>>
>> However, on running the hello world app, there's no output.
>>
>> Strangely now, even my earlier stdiooutput program (which was working)
>
> [snip]
>
> Are you sure that you use `i386-elf-gcc' as it was yesterday? May be
> your today's build was done with host GCC again?
>

Yeah, pretty sure its using i386-elf. Confirmed this from the makefile
as well as the make output.

I even did a clean build (removed all *.o files)...but that did not help.

Does adding libc_stdio have anything to do with this? I've tried going
back to the old config, i.e w/o stdio and friends, and start with a clean
build....but that too did not help. :(

Maybe I'll reinstall everything again...even ecos?! :/

BTW, does make clean work? There's no "clean" target defined in
the makefiles of the subdirectories! I always have to manually delete
the generated obj files.

-mandeep

> Sergei
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23  9:36                               ` Mandeep Sandhu
@ 2009-07-23  9:46                                 ` Sergei Gavrikov
  2009-07-23 10:34                                   ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23  9:46 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

Mandeep Sandhu wrote:
> Does adding libc_stdio have anything to do with this? I've tried going

If you use default template (and I hope what you use), stdio support is
there.

> back to the old config, i.e w/o stdio and friends, and start with a
> clean build....but that too did not help. :(
> 
> Maybe I'll reinstall everything again...even ecos?! :/

I don't think so.

> BTW, does make clean work? There's no "clean" target defined in the
> makefiles of the subdirectories! I always have to manually delete the
> generated obj files.

If something wrong, start config in an empty directory. Just for fun I
wrote this "CT F* Manual" for you. All worked for me.

Sergei

[-- Attachment #2: ctfm.txt --]
[-- Type: text/plain, Size: 1587 bytes --]

CT F* Manual

$ /opt/ecos/ecos-3.0/tools/bin/configtool


CT
  Tools
    Shell...

That strange window is XTERM. May be you are young man, but I break
my eyes :-) A quote:

X Consortium xterm provides popup menus, by pressing the control key
together with the mouse button. Control right mouse button pops up
the VT FONTS menu, from which you can select fonts that are specified
in xterm's resources.

Ctrl + RightMouseButton

VT Fonts
  Huge


XTERM
  $ rm -f -r /tmp/foo* /tmp/examples



CT
  Build
    Templates...
      Hardware
        Linux synthetic target
      Packages
        default
          OK
          Resolve conflicts
            Continue


CT
  + Configuration
    + Global build options
      Global command prefix	i386-elf


CT
  File
    Save as...
      /tmp/foo.ecc
        OK


CT
  Build
    Library


XTERM
  $ head -n4 /tmp/foo_install/lib/target.ld 
  STARTUP(vectors.o)
  ENTRY(_start)
  INPUT(extras.o)
  GROUP(libtarget.a libgcc.a libsupc++.a libgcc_eh.a)

  $ sed -i 's,libgcc_eh.a,,' /tmp/foo_install/lib/target.ld

  $ head -n4 /tmp/foo_install/lib/target.ld 
  STARTUP(vectors.o)
  ENTRY(_start)
  INPUT(extras.o)
  GROUP(libtarget.a libgcc.a libsupc++.a )


CT
  Build
    Tests


XTERM
  $ /tmp/foo_install/tests/language/c/libc/stdio/current/tests/stdiooutput
  INFO:<Starting tests from testcase ...>
  ...
  PASS:<Stdio output tests completed>
  EXIT:<Finished tests from testcase ...>
  
  $ cd /tmp
  $ cp $ECOS_REPOSITORY/../examples . -a
  $ make -C examples INSTALL_DIR=`pwd`/foo_install
  
  $ ./examples/hello 
  Hello, eCos world
  ^C



[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23  9:46                                 ` Sergei Gavrikov
@ 2009-07-23 10:34                                   ` Mandeep Sandhu
  2009-07-23 11:03                                     ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23 10:34 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

> If something wrong, start config in an empty directory. Just for fun I
> wrote this "CT F* Manual" for you. All worked for me.

Thanks Sergei! :)

Will try it out and let you know.

Regards,
-mandeep

>
> Sergei
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 10:34                                   ` Mandeep Sandhu
@ 2009-07-23 11:03                                     ` Mandeep Sandhu
  2009-07-23 11:11                                       ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23 11:03 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 4:04 PM, Mandeep
Sandhu<mandeepsandhu.chd@gmail.com> wrote:
>> If something wrong, start config in an empty directory. Just for fun I
>> wrote this "CT F* Manual" for you. All worked for me.
>
> Thanks Sergei! :)
>
> Will try it out and let you know.

I tried out the steps mentioned by you - verbatim.

so things were going great....it built the tests fine....stdiooutput
ran fine....BUT....hello world failed as always - no output! :(

Maybe my systems jinxed! What OS do you run? Fedora?

-mandeep

>
> Regards,
> -mandeep
>
>>
>> Sergei
>>
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 11:03                                     ` Mandeep Sandhu
@ 2009-07-23 11:11                                       ` Sergei Gavrikov
  2009-07-23 11:21                                         ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23 11:11 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 04:32:55PM +0530, Mandeep Sandhu wrote:
> On Thu, Jul 23, 2009 at 4:04 PM, Mandeep
> Sandhu<mandeepsandhu.chd@gmail.com> wrote:
> >> If something wrong, start config in an empty directory. Just for fun I
> >> wrote this "CT F* Manual" for you. All worked for me.
> >
> > Thanks Sergei! :)
> >
> > Will try it out and let you know.
> 
> I tried out the steps mentioned by you - verbatim.
> 
> so things were going great....it built the tests fine....stdiooutput
> ran fine....BUT....hello world failed as always - no output! :(

It's strange if stdiooutput ouputs, but hello.

Try append in hello.c before to exit.

fflush(stdout);

> Maybe my systems jinxed! What OS do you run? Fedora?

I use Ubuntu 7.04 (old PC) and 8.04 LTS on other one. But, they speaks
CentOS handles synth target smoothly. Seek the list, I don't remember
exactly.

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 11:11                                       ` Sergei Gavrikov
@ 2009-07-23 11:21                                         ` Sergei Gavrikov
  2009-07-23 11:39                                           ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23 11:21 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 02:11:15PM +0300, Sergei Gavrikov wrote:
> It's strange if stdiooutput ouputs, but hello.
> 
> Try append in hello.c before to exit.
> 
> fflush(stdout);

I hope that your greeting is terminated by NL. Check it! If it is
buffering issue, try

fprintf(stderr, "hello, world!\n");

may be `setvbuf' (man setvbuf) will be useful for you.

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 11:21                                         ` Sergei Gavrikov
@ 2009-07-23 11:39                                           ` Mandeep Sandhu
  2009-07-23 11:45                                             ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23 11:39 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 4:51 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> On Thu, Jul 23, 2009 at 02:11:15PM +0300, Sergei Gavrikov wrote:
>> It's strange if stdiooutput ouputs, but hello.
>>
>> Try append in hello.c before to exit.
>>
>> fflush(stdout);
>
> I hope that your greeting is terminated by NL. Check it! If it is
> buffering issue, try
>
> fprintf(stderr, "hello, world!\n");

Awesome! Both the approaches worked! Thanks!!!

The NL char was there i the original source though. Though
there is no buffering issue if we use the stderr stream. Why so?

Should one of these stmts be put in the default hello.c file that comes with
ECOS? Do you think others might also face this issue?

Thanks,
-mandeep

>
> may be `setvbuf' (man setvbuf) will be useful for you.
>
> Sergei
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 11:39                                           ` Mandeep Sandhu
@ 2009-07-23 11:45                                             ` Sergei Gavrikov
  2009-07-23 13:18                                               ` Mandeep Sandhu
  0 siblings, 1 reply; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23 11:45 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 05:09:38PM +0530, Mandeep Sandhu wrote:
> On Thu, Jul 23, 2009 at 4:51 PM, Sergei
> Gavrikov<sergei.gavrikov@gmail.com> wrote:
> > On Thu, Jul 23, 2009 at 02:11:15PM +0300, Sergei Gavrikov wrote:
> >> It's strange if stdiooutput ouputs, but hello.
> >>
> >> Try append in hello.c before to exit.
> >>
> >> fflush(stdout);
> >
> > I hope that your greeting is terminated by NL. Check it! If it is
> > buffering issue, try
> >
> > fprintf(stderr, "hello, world!\n");
> 
> Awesome! Both the approaches worked! Thanks!!!
> 
> The NL char was there i the original source though. Though there is no
> buffering issue if we use the stderr stream. Why so?
> 
> Should one of these stmts be put in the default hello.c file that
> comes with ECOS? Do you think others might also face this issue?

I am sorry, but, I did not meet the same report for synth target :-(
Thank you for your persistence! We will know about (Ubuntu 9.04 + synth
+ stdio buffering).

Sergei

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 11:45                                             ` Sergei Gavrikov
@ 2009-07-23 13:18                                               ` Mandeep Sandhu
  2009-07-23 13:35                                                 ` Sergei Gavrikov
  0 siblings, 1 reply; 32+ messages in thread
From: Mandeep Sandhu @ 2009-07-23 13:18 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: John Dallaway, eCos discuss list

> I am sorry, but, I did not meet the same report for synth target :-(
> Thank you for your persistence! We will know about (Ubuntu 9.04 + synth
> + stdio buffering).

No problemo! Rather thanks to you all for helping me out patiently with a simple
hello world app! :)

Now onto the next bigger task of getting ethernet to work with my
synth target! :)
Any good links for the same? Right now I'm looking at;

http://ecos.sourceware.org/docs-latest/ref/devs-eth-synth-ecosynth.html

Thanks,
-mandeep

>
> Sergei
>

-- 
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] 32+ messages in thread

* Re: [ECOS] hello world app SEG faults with Linux synth target
  2009-07-23 13:18                                               ` Mandeep Sandhu
@ 2009-07-23 13:35                                                 ` Sergei Gavrikov
  0 siblings, 0 replies; 32+ messages in thread
From: Sergei Gavrikov @ 2009-07-23 13:35 UTC (permalink / raw)
  To: Mandeep Sandhu; +Cc: John Dallaway, eCos discuss list

On Thu, Jul 23, 2009 at 06:48:19PM +0530, Mandeep Sandhu wrote:
> Now onto the next bigger task of getting ethernet to work with my
> synth target! :) Any good links for the same? Right now I'm looking
> at;
> 
> http://ecos.sourceware.org/docs-latest/ref/devs-eth-synth-ecosynth.html

That's right place. Read that manual carefully. Seek the list

Keywords are: synth, eth, bootp, dhcpd, tun, tap

Tools are: ifconfig, route, tunctl, ping, ethereal (wireshark) and sudo
as well :-)

Sergei

-- 
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] 32+ messages in thread

end of thread, other threads:[~2009-07-23 13:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21  6:30 [ECOS] hello world app SEG faults with Linux synth target Mandeep Sandhu
2009-07-21  7:30 ` Sergei Gavrikov
     [not found]   ` <b18c5f790907210111k3a4643adg80003969e2bf0520@mail.gmail.com>
2009-07-21  8:43     ` Sergei Gavrikov
2009-07-21  9:05       ` Sergei Gavrikov
2009-07-21 11:00         ` Mandeep Sandhu
2009-07-21 11:18           ` Sergei Gavrikov
     [not found]             ` <b18c5f790907210442q59e83781lf138151b37244a53@mail.gmail.com>
2009-07-21 12:29               ` Sergei Gavrikov
2009-07-21 14:01                 ` Mandeep Sandhu
2009-07-21 14:11                   ` Sergei Gavrikov
2009-07-22  8:55                 ` Mandeep Sandhu
2009-07-22 10:45                   ` Sergei Gavrikov
2009-07-22 10:54                     ` Mandeep Sandhu
2009-07-22 14:05                       ` Mandeep Sandhu
2009-07-22 14:10                         ` Sergei Gavrikov
2009-07-23  8:04                           ` Mandeep Sandhu
2009-07-23  8:20                             ` Sergei Gavrikov
2009-07-23  9:36                               ` Mandeep Sandhu
2009-07-23  9:46                                 ` Sergei Gavrikov
2009-07-23 10:34                                   ` Mandeep Sandhu
2009-07-23 11:03                                     ` Mandeep Sandhu
2009-07-23 11:11                                       ` Sergei Gavrikov
2009-07-23 11:21                                         ` Sergei Gavrikov
2009-07-23 11:39                                           ` Mandeep Sandhu
2009-07-23 11:45                                             ` Sergei Gavrikov
2009-07-23 13:18                                               ` Mandeep Sandhu
2009-07-23 13:35                                                 ` Sergei Gavrikov
2009-07-21  9:29       ` Sergei Gavrikov
2009-07-21 10:51         ` Mandeep Sandhu
2009-07-21  7:46 ` [ECOS] " John Dallaway
2009-07-21  8:10   ` Mandeep Sandhu
2009-07-21  9:41     ` John Dallaway
2009-07-21 10:50       ` Mandeep Sandhu

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