public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Linux Synthetic target problems
@ 2008-09-04 12:36 Tyler Wilson
  2008-09-04 13:12 ` Andrew Lunn
  2008-09-04 13:49 ` Bart Veer
  0 siblings, 2 replies; 17+ messages in thread
From: Tyler Wilson @ 2008-09-04 12:36 UTC (permalink / raw)
  To: ecos-discuss

Good day,

I have been attempting to build the Linux synthetic target on what is essentially an Ubuntu 7.10 system (actually, andLinux which uses coLinux). When I get to the point of running the hello application, I get a segmentation fault. If I attempt to debug with gdb, it spits out an internal error:

This GDB was configured as "i486-linux-gnu"...
/build/buildd/gdb-6.6.dfsg/gdb/dwarf2-frame.c:1725: internal-error: decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
A problem internal to GDB has been detected,

This is using GCC version 4.1.3. A co-worker got the same error on a 'pure' Ubuntu install.

FYI, I used the instructions in this post for the build: http://www.nabble.com/SIGSEV,-Segmentation-Fault:-When-attempting-to-run-%22Hello-World%27-on-Synthetic-Linux-td8250747.html

    ecosconfig new linux default 
    ecosconfig tree 
    make

I have seen reports in other places that say the Linux kernel version may have an impact on the success of the synthetic target. On the other hand, I have seen Changelogs in CVS with notes about 'update for later GCC versions'.

Any clues welcome.

Thank you,
Tyler

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 12:36 [ECOS] Linux Synthetic target problems Tyler Wilson
@ 2008-09-04 13:12 ` Andrew Lunn
  2008-09-04 13:49 ` Bart Veer
  1 sibling, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2008-09-04 13:12 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: ecos-discuss

On Thu, Sep 04, 2008 at 05:35:26AM -0700, Tyler Wilson wrote:
> Good day,
> 
> I have been attempting to build the Linux synthetic target on what is essentially an Ubuntu 7.10 system (actually, andLinux which uses coLinux). When I get to the point of running the hello application, I get a segmentation fault. If I attempt to debug with gdb, it spits out an internal error:

Try building eCos and your application with

-fno-stack-protection

There is a thread about this at 

http://www.mail-archive.com/ecos-discuss@ecos.sourceware.org/msg05983.html

but you might be seeing something else.

    Andrew

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 12:36 [ECOS] Linux Synthetic target problems Tyler Wilson
  2008-09-04 13:12 ` Andrew Lunn
@ 2008-09-04 13:49 ` Bart Veer
  2008-09-04 14:03   ` Tyler Wilson
  2008-09-05 16:19   ` Tyler Wilson
  1 sibling, 2 replies; 17+ messages in thread
From: Bart Veer @ 2008-09-04 13:49 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: ecos-discuss

>>>>> "Tyler" == Tyler Wilson <TWilson@ugobe.com> writes:

    Tyler> Good day,
    Tyler> I have been attempting to build the Linux synthetic target
    Tyler> on what is essentially an Ubuntu 7.10 system (actually,
    Tyler> andLinux which uses coLinux). When I get to the point of
    Tyler> running the hello application, I get a segmentation fault.
    Tyler> If I attempt to debug with gdb, it spits out an internal
    Tyler> error:

    Tyler> This GDB was configured as "i486-linux-gnu"...
    Tyler> /build/buildd/gdb-6.6.dfsg/gdb/dwarf2-frame.c:1725: internal-error: decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
    Tyler> A problem internal to GDB has been detected,

Note that this is a bug in the Ubuntu release of gdb, not in the
synthetic target. If you want to debug a synthetic target application
then you will probably have to upgrade or downgrade your version of
gdb.
    
    Tyler> This is using GCC version 4.1.3. A co-worker got the same
    Tyler> error on a 'pure' Ubuntu install.

    Tyler> FYI, I used the instructions in this post for the build:
    Tyler> http://www.nabble.com/SIGSEV,-Segmentation-Fault:-When-attempting-to-run-%22Hello-World%27-on-Synthetic-Linux-td8250747.html

    Tyler> ecosconfig new linux default 
    Tyler> ecosconfig tree 
    Tyler> make

    Tyler> I have seen reports in other places that say the Linux
    Tyler> kernel version may have an impact on the success of the
    Tyler> synthetic target. On the other hand, I have seen Changelogs
    Tyler> in CVS with notes about 'update for later GCC versions'.

The synthetic target is vulnerable to changes in both the Linux kernel
and the toolchain - compiler, linker, ... Actually all of eCos is
vulnerable to toolchain changes, but for most targets people stick
with known good toolchains they have downloaded. For the synthetic
target people use whatever toolchain is installed with their Linux
distribution. Generally that is of newer vintage than the
cross-compilers so more likely to show up problems.

For this issue, first try Andrew's suggestion of
-fno-stack-protector (not -fno-stack-protection). Hopefully you have
run into a known problem rather than a new one.

Bart

-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.

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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-04 13:49 ` Bart Veer
@ 2008-09-04 14:03   ` Tyler Wilson
  2008-09-04 14:11     ` Andrew Lunn
  2008-09-05 16:19   ` Tyler Wilson
  1 sibling, 1 reply; 17+ messages in thread
From: Tyler Wilson @ 2008-09-04 14:03 UTC (permalink / raw)
  To: Bart Veer; +Cc: ecos-discuss

Thank you both for the tips. I am trying to add the additional GCC flag,
but - being new to eCos (and not an expert in Linux either) - I do not
know the optimal way to integrate it.

My understanding from working with eCos on the Windows side was that I
modify the install/include/pkgconf/ecos.mak file; specifically, the
ECOS_GLOBAL_CFLAGS. Then I do a 'make' at the root of the synthetic
build tree. But when I build, I do not see the compiler option listed in
the compiler output - it appears to be cut off after the
-fno-exceptions. Perhaps just the output is being truncated?

Am I doing this right?

Thank you,
Tyler

> -----Original Message-----
> From: Bart Veer [mailto:bartv@ecoscentric.com]
> Sent: Thursday, September 04, 2008 9:48 AM
> To: Tyler Wilson
> Cc: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> >>>>> "Tyler" == Tyler Wilson <TWilson@ugobe.com> writes:
> 
>     Tyler> Good day,
>     Tyler> I have been attempting to build the Linux synthetic target
>     Tyler> on what is essentially an Ubuntu 7.10 system (actually,
>     Tyler> andLinux which uses coLinux). When I get to the point of
>     Tyler> running the hello application, I get a segmentation fault.
>     Tyler> If I attempt to debug with gdb, it spits out an internal
>     Tyler> error:
> 
>     Tyler> This GDB was configured as "i486-linux-gnu"...
>     Tyler> /build/buildd/gdb-6.6.dfsg/gdb/dwarf2-frame.c:1725:
> internal-error: decode_frame_entry_1: Assertion `fde->cie != NULL'
> failed.
>     Tyler> A problem internal to GDB has been detected,
> 
> Note that this is a bug in the Ubuntu release of gdb, not in the
> synthetic target. If you want to debug a synthetic target application
> then you will probably have to upgrade or downgrade your version of
> gdb.
> 
>     Tyler> This is using GCC version 4.1.3. A co-worker got the same
>     Tyler> error on a 'pure' Ubuntu install.
> 
>     Tyler> FYI, I used the instructions in this post for the build:
>     Tyler> http://www.nabble.com/SIGSEV,-Segmentation-Fault:-When-
> attempting-to-run-%22Hello-World%27-on-Synthetic-Linux-td8250747.html
> 
>     Tyler> ecosconfig new linux default
>     Tyler> ecosconfig tree
>     Tyler> make
> 
>     Tyler> I have seen reports in other places that say the Linux
>     Tyler> kernel version may have an impact on the success of the
>     Tyler> synthetic target. On the other hand, I have seen Changelogs
>     Tyler> in CVS with notes about 'update for later GCC versions'.
> 
> The synthetic target is vulnerable to changes in both the Linux kernel
> and the toolchain - compiler, linker, ... Actually all of eCos is
> vulnerable to toolchain changes, but for most targets people stick
> with known good toolchains they have downloaded. For the synthetic
> target people use whatever toolchain is installed with their Linux
> distribution. Generally that is of newer vintage than the
> cross-compilers so more likely to show up problems.
> 
> For this issue, first try Andrew's suggestion of
> -fno-stack-protector (not -fno-stack-protection). Hopefully you have
> run into a known problem rather than a new one.
> 
> Bart
> 
> --
> Bart Veer                                   eCos Configuration
> Architect
> eCosCentric Limited    The eCos experts
> http://www.ecoscentric.com/
> Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223
> 245571
> Registered in England and Wales: Reg No 4422071.

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 14:03   ` Tyler Wilson
@ 2008-09-04 14:11     ` Andrew Lunn
  2008-09-04 17:00       ` Tyler Wilson
  0 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2008-09-04 14:11 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: Bart Veer, ecos-discuss

On Thu, Sep 04, 2008 at 07:02:31AM -0700, Tyler Wilson wrote:
> Thank you both for the tips. I am trying to add the additional GCC flag,
> but - being new to eCos (and not an expert in Linux either) - I do not
> know the optimal way to integrate it.
> 
> My understanding from working with eCos on the Windows side was that I
> modify the install/include/pkgconf/ecos.mak file; specifically, the
> ECOS_GLOBAL_CFLAGS. Then I do a 'make' at the root of the synthetic
> build tree. But when I build, I do not see the compiler option listed in
> the compiler output - it appears to be cut off after the
> -fno-exceptions. Perhaps just the output is being truncated?
> 
> Am I doing this right?

No. Modify CYGBLD_GLOBAL_CFLAGS in your configuration and then 

ecosconfig tree
make clean
make

        Andrew

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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-04 14:11     ` Andrew Lunn
@ 2008-09-04 17:00       ` Tyler Wilson
  2008-09-04 18:40         ` Sergei Gavrikov
  0 siblings, 1 reply; 17+ messages in thread
From: Tyler Wilson @ 2008-09-04 17:00 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Bart Veer, ecos-discuss

Okay, thanks again to Andrew and Bart, I was able to successfully build and run the example programs in/with the Linux Synthetic target! In order to assist others, here are the steps from start to finish:

	1. CVS checkout to /opt/ecos/ecos-cvs

	2. We need a working ecosconfig (command-line tool), so we do the following:
		a. ‘mkdir ~/ecosconfig-build’ and ‘cd ~/ecosconfig-build’
		b. ‘/opt/ecos/ecos-cvs/host/configure –with-tcl-version=8.4 –prefix=/usr/local’. Change the Tcl version to that you have installed, and prefix to where you want the resultant bins, includes and libs to end up in.
		c. ‘make’ and ‘sudo make install’. (you should end up with ecosconfig in /usr/local/bin and some includes and libs in /usr/local/include and /usr/local/libs, repsectively

	3. Add ‘export ECOS_REPOSITORY=/opt/ecos/ecos-cvs/packages’ to ~/.bashrc. This is used by the ecosconfig tool, so we do not have to include the –-srcdir option all the time.
	
	4. To build the synthetic target (library):
		a. ‘mkdir ~/synth-build’ and ‘cd ~/synth-build’
		b. ‘ecosconfig  new linux’. This creates a new ecos.ecc
		c. Edit ecos.ecc: 
			i. Uncomment the ‘user_value’ line in the CYGBLD_GLOBAL_CFLAGS section
			ii. Remove the ‘–finit-priority’ option
			iii. add the ‘-fno-stack-protector’ option
		d. ‘ecosconfig tree’
		e. ‘make’
	
	5. To build the examples:
		a. ‘mkdir ~/examples-build’ and ‘cd ~/examples-build’
		b. ‘cp /opt/ecos/ecos-cvs/examples/* .’
		c. ‘make INSTALL_DIR=~/synth-build/install’
		
If this is all successful, you can then execute ‘./hello’, ‘./twothreads’or ‘./simple-alarm’ to test.

I hope this helps others out there. Note I am running on andLinux Beta 1 (basically Ubuntu 7.10) and using GCC 4.1.3, binutils 2.18 and Tcl/Tk 8.4.


As an aside, it took me a while to 'grok' the way in which eCos is designed to be used. I think there is a need for a nice simple flow diagram of the process to help beginners. Something like:

eCos Source -> ecosconfig|configtool -> target.ecc -> ecosconfig|configtool -> target build tree -> make -> target library/includes

then

Application code -> make + directory of target library/includes -> Application binary

Important to note the following:
	- The original eCos source - whether from CVS or any snapshot - is basically read-only at all times when building targets and applications
	- Multiple targets can be 'extracted' and built from this one source
	- An application can easily be re-targeted simply by pointing to different target 'install' locations.

When I first looked at eCos, I was not thrilled by the naming scheme, and it was unclear to me how the system worked. The more I work it though, the more impressed I am in the modularity and customization ability of the system. Now, to build some applications...

Thank you,
Tyler

> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Thursday, September 04, 2008 10:11 AM
> To: Tyler Wilson
> Cc: Bart Veer; ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> On Thu, Sep 04, 2008 at 07:02:31AM -0700, Tyler Wilson wrote:
> > Thank you both for the tips. I am trying to add the additional GCC
> flag,
> > but - being new to eCos (and not an expert in Linux either) - I do
> not
> > know the optimal way to integrate it.
> >
> > My understanding from working with eCos on the Windows side was that
> I
> > modify the install/include/pkgconf/ecos.mak file; specifically, the
> > ECOS_GLOBAL_CFLAGS. Then I do a 'make' at the root of the synthetic
> > build tree. But when I build, I do not see the compiler option listed
> in
> > the compiler output - it appears to be cut off after the
> > -fno-exceptions. Perhaps just the output is being truncated?
> >
> > Am I doing this right?
> 
> No. Modify CYGBLD_GLOBAL_CFLAGS in your configuration and then
> 
> ecosconfig tree
> make clean
> make
> 
>         Andrew

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 17:00       ` Tyler Wilson
@ 2008-09-04 18:40         ` Sergei Gavrikov
  2008-09-04 19:18           ` Tyler Wilson
  0 siblings, 1 reply; 17+ messages in thread
From: Sergei Gavrikov @ 2008-09-04 18:40 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: Andrew Lunn, Bart Veer, ecos-discuss

Tyler Wilson writes:

[snip]

> If this is all successful, you can then execute ‘./hello’,
> ‘./twothreads’or ‘./simple-alarm’ to test.

You will be more expessed when run those apps with '--io' command line
option:

./twothreads --io

or beeing inside a fresh built directory for synth target fulfil:

make -C kernel/current TESTS=tests/tm_basic
./install/tests/kernel/current/tests/tm_basic --io

and yet another funny example: where is synthetic dog from?

ecosconfig new linux
...
ecosconfig add watchdog
ecosconfig tree
make
make -C io/watchdog/current tests
./install/tests/io/watchdog/current/tests/watchdog2 --io

[snip]

> When I first looked at eCos, I was not thrilled by the naming scheme,
> and it was unclear to me how the system worked. The more I work it
> though, the more impressed I am in the modularity and customization
> ability of the system. Now, to build some applications...

if you noticed there is 'makefile' inside build tree (not 'Makefile'),
so you can build own Makefile for your application or project just
using these build_Make.params, build_Makefile are placed in examples
directory, same lazy example:

echo 'main(){printf("howdy!\n");}' > foo.c
SRCS=foo.c DST=foo $ECOS_REPOSITORY/../examples/build_Makefile
make -f Makefile
./foo
^C

You see what `build_Makefile' won't overwrite eCos `makefile', but
builds `Makefile' for your application or project.

Happy eCosing,

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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-04 18:40         ` Sergei Gavrikov
@ 2008-09-04 19:18           ` Tyler Wilson
  2008-09-04 19:35             ` Sergei Gavrikov
  0 siblings, 1 reply; 17+ messages in thread
From: Tyler Wilson @ 2008-09-04 19:18 UTC (permalink / raw)
  To: ecos-discuss

Thank you for the additional tips. Though to be honest I do not (yet) see the utility of the IO auxiliary. What we could really use is a way to input data to the application, which I do not believe is currently possible. Is this true?

Thank you,
Tyler

> -----Original Message-----
> From: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com]
> Sent: Thursday, September 04, 2008 2:39 PM
> To: Tyler Wilson
> Cc: Andrew Lunn; Bart Veer; ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> Tyler Wilson writes:
> 
> [snip]
> 
> > If this is all successful, you can then execute ‘./hello’,
> > ‘./twothreads’or ‘./simple-alarm’ to test.
> 
> You will be more expessed when run those apps with '--io' command line
> option:
> 
> ./twothreads --io
> 
> or beeing inside a fresh built directory for synth target fulfil:
> 
> make -C kernel/current TESTS=tests/tm_basic
> ./install/tests/kernel/current/tests/tm_basic --io
> 
> and yet another funny example: where is synthetic dog from?
> 
> ecosconfig new linux
> ...
> ecosconfig add watchdog
> ecosconfig tree
> make
> make -C io/watchdog/current tests
> ./install/tests/io/watchdog/current/tests/watchdog2 --io
> 
> [snip]
> 
> > When I first looked at eCos, I was not thrilled by the naming scheme,
> > and it was unclear to me how the system worked. The more I work it
> > though, the more impressed I am in the modularity and customization
> > ability of the system. Now, to build some applications...
> 
> if you noticed there is 'makefile' inside build tree (not 'Makefile'),
> so you can build own Makefile for your application or project just
> using these build_Make.params, build_Makefile are placed in examples
> directory, same lazy example:
> 
> echo 'main(){printf("howdy!\n");}' > foo.c
> SRCS=foo.c DST=foo $ECOS_REPOSITORY/../examples/build_Makefile
> make -f Makefile
> ./foo
> ^C
> 
> You see what `build_Makefile' won't overwrite eCos `makefile', but
> builds `Makefile' for your application or project.
> 
> Happy eCosing,
> 
> Sergei

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 19:18           ` Tyler Wilson
@ 2008-09-04 19:35             ` Sergei Gavrikov
  2008-09-05  5:24               ` Andrew Lunn
  0 siblings, 1 reply; 17+ messages in thread
From: Sergei Gavrikov @ 2008-09-04 19:35 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: ecos-discuss

Tyler Wilson writes:
> Thank you for the additional tips. Though to be honest I do not (yet)
> see the utility of the IO auxiliary. What we could really use is a way
> to input data to the application, which I do not believe is currently
> possible. Is this true?

Start to read here
http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html

Then... using serial device for synthetic you can interact with
synthetic applications:
http://sourceware.org/ml/ecos-discuss/2007-10/msg00139.html

You are on linux! Try socat to redirect serial I/O and use telnet then.
http://www.dest-unreach.org/socat/

Then you can setup tun/tap interfaces, for example, and interact using
ethernet like interfaces.

And grep ecos-discuss list. Someone posted about running synthetic
applications using vmware and qemu.

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-04 19:35             ` Sergei Gavrikov
@ 2008-09-05  5:24               ` Andrew Lunn
  0 siblings, 0 replies; 17+ messages in thread
From: Andrew Lunn @ 2008-09-05  5:24 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: ecos-discuss

> And grep ecos-discuss list. Someone posted about running synthetic
> applications using vmware and qemu.

I would probably use the pcmb target for these, not synth.

  Andrew

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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-04 13:49 ` Bart Veer
  2008-09-04 14:03   ` Tyler Wilson
@ 2008-09-05 16:19   ` Tyler Wilson
  2008-09-05 16:37     ` Bart Veer
  2008-09-05 19:27     ` Sergei Gavrikov
  1 sibling, 2 replies; 17+ messages in thread
From: Tyler Wilson @ 2008-09-05 16:19 UTC (permalink / raw)
  To: Bart Veer; +Cc: ecos-discuss

WRT to the GDB 6.6 issue: I upgraded my Ubuntu 7.10 to Ubuntu 8.04,
which puts gdb at 6.8 and gcc at 4.2.3. I rebuilt the synthetic target
and examples, and I am getting the same internal gdb errors.

Does this set up work for anybody else?

I will try the gcc 3.4(.6) tool chain next.

Thank you,
Tyler

> -----Original Message-----
> From: Bart Veer [mailto:bartv@ecoscentric.com]
> Sent: Thursday, September 04, 2008 9:48 AM
> To: Tyler Wilson
> Cc: ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> >>>>> "Tyler" == Tyler Wilson <TWilson@ugobe.com> writes:
> 
>     Tyler> Good day,
>     Tyler> I have been attempting to build the Linux synthetic target
>     Tyler> on what is essentially an Ubuntu 7.10 system (actually,
>     Tyler> andLinux which uses coLinux). When I get to the point of
>     Tyler> running the hello application, I get a segmentation fault.
>     Tyler> If I attempt to debug with gdb, it spits out an internal
>     Tyler> error:
> 
>     Tyler> This GDB was configured as "i486-linux-gnu"...
>     Tyler> /build/buildd/gdb-6.6.dfsg/gdb/dwarf2-frame.c:1725:
> internal-error: decode_frame_entry_1: Assertion `fde->cie != NULL'
> failed.
>     Tyler> A problem internal to GDB has been detected,
> 
> Note that this is a bug in the Ubuntu release of gdb, not in the
> synthetic target. If you want to debug a synthetic target application
> then you will probably have to upgrade or downgrade your version of
> gdb.
> 
>     Tyler> This is using GCC version 4.1.3. A co-worker got the same
>     Tyler> error on a 'pure' Ubuntu install.
> 
>     Tyler> FYI, I used the instructions in this post for the build:
>     Tyler> http://www.nabble.com/SIGSEV,-Segmentation-Fault:-When-
> attempting-to-run-%22Hello-World%27-on-Synthetic-Linux-td8250747.html
> 
>     Tyler> ecosconfig new linux default
>     Tyler> ecosconfig tree
>     Tyler> make
> 
>     Tyler> I have seen reports in other places that say the Linux
>     Tyler> kernel version may have an impact on the success of the
>     Tyler> synthetic target. On the other hand, I have seen Changelogs
>     Tyler> in CVS with notes about 'update for later GCC versions'.
> 
> The synthetic target is vulnerable to changes in both the Linux kernel
> and the toolchain - compiler, linker, ... Actually all of eCos is
> vulnerable to toolchain changes, but for most targets people stick
> with known good toolchains they have downloaded. For the synthetic
> target people use whatever toolchain is installed with their Linux
> distribution. Generally that is of newer vintage than the
> cross-compilers so more likely to show up problems.
> 
> For this issue, first try Andrew's suggestion of
> -fno-stack-protector (not -fno-stack-protection). Hopefully you have
> run into a known problem rather than a new one.
> 
> Bart
> 
> --
> Bart Veer                                   eCos Configuration
> Architect
> eCosCentric Limited    The eCos experts
> http://www.ecoscentric.com/
> Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223
> 245571
> Registered in England and Wales: Reg No 4422071.

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-05 16:19   ` Tyler Wilson
@ 2008-09-05 16:37     ` Bart Veer
  2008-09-05 19:27     ` Sergei Gavrikov
  1 sibling, 0 replies; 17+ messages in thread
From: Bart Veer @ 2008-09-05 16:37 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: ecos-discuss

>>>>> "Tyler" == Tyler Wilson <TWilson@ugobe.com> writes:

    Tyler> WRT to the GDB 6.6 issue: I upgraded my Ubuntu 7.10 to
    Tyler> Ubuntu 8.04, which puts gdb at 6.8 and gcc at 4.2.3. I
    Tyler> rebuilt the synthetic target and examples, and I am getting
    Tyler> the same internal gdb errors.

    Tyler> Does this set up work for anybody else?

    Tyler> I will try the gcc 3.4(.6) tool chain next.

I know that Fedora's gdb 6.8-17.fc9 works fine, and I have not seen
any gdb problems with any recent release of Fedora. I do not have an
Ubuntu system at the moment so cannot help further.

Bart
    
-- 
Bart Veer                                   eCos Configuration Architect
eCosCentric Limited    The eCos experts      http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK.      Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-05 16:19   ` Tyler Wilson
  2008-09-05 16:37     ` Bart Veer
@ 2008-09-05 19:27     ` Sergei Gavrikov
  2008-09-08 15:35       ` Tyler Wilson
  1 sibling, 1 reply; 17+ messages in thread
From: Sergei Gavrikov @ 2008-09-05 19:27 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: Bart Veer, ecos-discuss

Wilson wrote:
> WRT to the GDB 6.6 issue: I upgraded my Ubuntu 7.10 to Ubuntu 8.04,
> which puts gdb at 6.8 and gcc at 4.2.3. I rebuilt the synthetic target
> and examples, and I am getting the same internal gdb errors.
> 
> Does this set up work for anybody else?
> 
> I will try the gcc 3.4(.6) tool chain next.

Hm. I have installed Ubuntu 7.04 at work and Andrew's suggest about
-fno-stack-protector works for me. I can build the synthetic target
tests and run then with a distro's gdb.

At home I have installed same as you distro 8.04 and I was just wounder,
would I build and run the target tests in gdb 6.8-debian? No, I could
not. gdb 6.8 did crash.

I passed about one hour tuning CFLAGS (optimization and stack protector)
and changing distro's GCC/GXX: gcc-3.4.6, gcc-4.1.3, gcc-4.2.3. The gdb
6.8 crashed every time and I did remember what

Bart Veer wrote:
> > Note that this is a bug in the Ubuntu release of gdb, not in the
> > synthetic target. If you want to debug a synthetic target
> > application then you will probably have to upgrade or downgrade your
> > version of gdb.

I did follow Bart's suggest and became to test the force installed
Debian GDBs: experimental/tested/unstable/stable. No success.  All GDB
crashed. Hm. It's possible, it's a hard friday night.

> > The synthetic target is vulnerable to changes in both the Linux
> > kernel and the toolchain - compiler, linker, ... Actually all of
> > eCos is vulnerable to toolchain changes, but for most targets people
> > stick with known good toolchains they have downloaded. For the
> > synthetic target people use whatever toolchain is installed with
> > their Linux distribution. Generally that is of newer vintage than
> > the cross-compilers so more likely to show up problems.

If it is not friday I will agree with the Bart's conclusion the above,
because I tried both instaled kernels which I have at home: 2.6.24-18
and 2.6.24-19, No success. Someone said here that a stable toolchain
is not a big deal. I think what Tyler do not share this conclusion.

Tyler, if you will get the results with synthetic builds and GDB on
Ubuntu 8.04, please, enlighten me too.

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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-05 19:27     ` Sergei Gavrikov
@ 2008-09-08 15:35       ` Tyler Wilson
  2008-09-08 18:17         ` Sergei Gavrikov
  0 siblings, 1 reply; 17+ messages in thread
From: Tyler Wilson @ 2008-09-08 15:35 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: Bart Veer, ecos-discuss

Sergei,

Just to be clear: do you get the same internal error as I do? See here:

twilson@andLinux:~/examples-build$ gdb ./hello
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
/build/buildd/gdb-6.8/gdb/dwarf2-frame.c:1837: internal-error:
decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)

Thank you,
Tyler

> -----Original Message-----
> From: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com]
> Sent: Friday, September 05, 2008 3:27 PM
> To: Tyler Wilson
> Cc: Bart Veer; ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> Wilson wrote:
> > WRT to the GDB 6.6 issue: I upgraded my Ubuntu 7.10 to Ubuntu 8.04,
> > which puts gdb at 6.8 and gcc at 4.2.3. I rebuilt the synthetic
> target
> > and examples, and I am getting the same internal gdb errors.
> >
> > Does this set up work for anybody else?
> >
> > I will try the gcc 3.4(.6) tool chain next.
> 
> Hm. I have installed Ubuntu 7.04 at work and Andrew's suggest about
> -fno-stack-protector works for me. I can build the synthetic target
> tests and run then with a distro's gdb.
> 
> At home I have installed same as you distro 8.04 and I was just
> wounder,
> would I build and run the target tests in gdb 6.8-debian? No, I could
> not. gdb 6.8 did crash.
> 
> I passed about one hour tuning CFLAGS (optimization and stack
> protector)
> and changing distro's GCC/GXX: gcc-3.4.6, gcc-4.1.3, gcc-4.2.3. The
gdb
> 6.8 crashed every time and I did remember what
> 
> Bart Veer wrote:
> > > Note that this is a bug in the Ubuntu release of gdb, not in the
> > > synthetic target. If you want to debug a synthetic target
> > > application then you will probably have to upgrade or downgrade
> your
> > > version of gdb.
> 
> I did follow Bart's suggest and became to test the force installed
> Debian GDBs: experimental/tested/unstable/stable. No success.  All GDB
> crashed. Hm. It's possible, it's a hard friday night.
> 
> > > The synthetic target is vulnerable to changes in both the Linux
> > > kernel and the toolchain - compiler, linker, ... Actually all of
> > > eCos is vulnerable to toolchain changes, but for most targets
> people
> > > stick with known good toolchains they have downloaded. For the
> > > synthetic target people use whatever toolchain is installed with
> > > their Linux distribution. Generally that is of newer vintage than
> > > the cross-compilers so more likely to show up problems.
> 
> If it is not friday I will agree with the Bart's conclusion the above,
> because I tried both instaled kernels which I have at home: 2.6.24-18
> and 2.6.24-19, No success. Someone said here that a stable toolchain
> is not a big deal. I think what Tyler do not share this conclusion.
> 
> Tyler, if you will get the results with synthetic builds and GDB on
> Ubuntu 8.04, please, enlighten me too.
> 
> 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] 17+ messages in thread

* Re: [ECOS] Linux Synthetic target problems
  2008-09-08 15:35       ` Tyler Wilson
@ 2008-09-08 18:17         ` Sergei Gavrikov
  2008-09-08 19:03           ` Sergei Gavrikov
  2008-09-09 16:48           ` Tyler Wilson
  0 siblings, 2 replies; 17+ messages in thread
From: Sergei Gavrikov @ 2008-09-08 18:17 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: Bart Veer, ecos-discuss

On Mon, Sep 08, 2008 at 08:34:16AM -0700, Tyler Wilson wrote:
> Sergei,
> 
> Just to be clear: do you get the same internal error as I do? See here:
> 
> twilson@andLinux:~/examples-build$ gdb ./hello
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> /build/buildd/gdb-6.8/gdb/dwarf2-frame.c:1837: internal-error:
> decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n)

Exactly.

But, when I built old eCos 2.0 tests using gcc-3.2.1, all test did pass
with _this_ debugger and kernel without any errors.

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

* Re: [ECOS] Linux Synthetic target problems
  2008-09-08 18:17         ` Sergei Gavrikov
@ 2008-09-08 19:03           ` Sergei Gavrikov
  2008-09-09 16:48           ` Tyler Wilson
  1 sibling, 0 replies; 17+ messages in thread
From: Sergei Gavrikov @ 2008-09-08 19:03 UTC (permalink / raw)
  To: Tyler Wilson; +Cc: Bart Veer, ecos-discuss

Sergei Gavrikov wrote:
Tyler Wilson wrote:
> > Sergei,
> > 
> > Just to be clear: do you get the same internal error as I do? See here:
> > 
> > twilson@andLinux:~/examples-build$ gdb ./hello
> > GNU gdb 6.8-debian
> > Copyright (C) 2008 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html>
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show
> > copying"
> > and "show warranty" for details.
> > This GDB was configured as "i486-linux-gnu"...
> > /build/buildd/gdb-6.8/gdb/dwarf2-frame.c:1837: internal-error:
> > decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> > Quit this debugging session? (y or n)
> 
> Exactly.
> 
> But, when I built old eCos 2.0 tests using gcc-3.2.1, all test did pass
> with _this_ debugger and kernel without any errors.

It is a bit more digged. I found that I have no problem with GNU gdb
6.8-debian (Ubuntu 8.04 LTS) if I compile all synth stuff (got from
latest anon CVS) ... using stable, but, pretty old toolchain:

ftp://ecos.sourceware.org/pub/ecos/gnutools/i386linux/ecoscentric-gnutools-i386-elf-1.4-2.i386linux.tar.bz2

$ i386-elf-gcc --version|sed -n 1p
i386-elf-gcc (GCC) 3.2.1 (eCosCentric)

How I built

ecosconfig new linux
ecosconfig import /dev/stdin << _EOF
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
    user_value i386-elf
};
_EOF
ecosconfig tree
make -s
sed -i 's@ libgcc_eh.a@@' install/lib/target.ld
make -s tests

Example of session

$ gdb install/tests/infra/current/tests/cxxsupp 
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) b cyg_start
Breakpoint 1 at 0x100016f: file
/home/sg/repos/ecos/packages/infra/current/tests/cxxsupp.cxx, line 133.
(gdb) run
Starting program: /tmp/a/install/tests/infra/current/tests/cxxsupp 

Breakpoint 1, cyg_start ()
    at /home/sg/repos/ecos/packages/infra/current/tests/cxxsupp.cxx:133
133	    CYG_TEST_INIT();
(gdb) 


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

* RE: [ECOS] Linux Synthetic target problems
  2008-09-08 18:17         ` Sergei Gavrikov
  2008-09-08 19:03           ` Sergei Gavrikov
@ 2008-09-09 16:48           ` Tyler Wilson
  1 sibling, 0 replies; 17+ messages in thread
From: Tyler Wilson @ 2008-09-09 16:48 UTC (permalink / raw)
  To: Sergei Gavrikov; +Cc: Bart Veer, ecos-discuss

I just did my own additional testing: I tried GCC 3.3.6 and GCC 3.4.6 -
the oldest versions of GCC in the Ubuntu repos. I still get the gdb
error below when attempting to debug.

I would expect that there is some compiler switch or some such that
could allow us to use more recent tool chain versions with eCos and GDB.
(There were hints to this in mentions of eCos 3.0 I have seen on this
list, which I would expect would be part of the CVS tree).

We are expecting the eCosPro Dev Kit soon, so all of this may be moot,
but I think it would be good for the community to figure it out anyway.

Thank you,
Tyler

> -----Original Message-----
> From: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com]
> Sent: Monday, September 08, 2008 2:16 PM
> To: Tyler Wilson
> Cc: Bart Veer; ecos-discuss@ecos.sourceware.org
> Subject: Re: [ECOS] Linux Synthetic target problems
> 
> On Mon, Sep 08, 2008 at 08:34:16AM -0700, Tyler Wilson wrote:
> > Sergei,
> >
> > Just to be clear: do you get the same internal error as I do? See
> here:
> >
> > twilson@andLinux:~/examples-build$ gdb ./hello
> > GNU gdb 6.8-debian
> > Copyright (C) 2008 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later
> > <http://gnu.org/licenses/gpl.html>
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show
> > copying"
> > and "show warranty" for details.
> > This GDB was configured as "i486-linux-gnu"...
> > /build/buildd/gdb-6.8/gdb/dwarf2-frame.c:1837: internal-error:
> > decode_frame_entry_1: Assertion `fde->cie != NULL' failed.
> > A problem internal to GDB has been detected,
> > further debugging may prove unreliable.
> > Quit this debugging session? (y or n)
> 
> Exactly.
> 
> But, when I built old eCos 2.0 tests using gcc-3.2.1, all test did
pass
> with _this_ debugger and kernel without any errors.
> 
> 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] 17+ messages in thread

end of thread, other threads:[~2008-09-09 16:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-04 12:36 [ECOS] Linux Synthetic target problems Tyler Wilson
2008-09-04 13:12 ` Andrew Lunn
2008-09-04 13:49 ` Bart Veer
2008-09-04 14:03   ` Tyler Wilson
2008-09-04 14:11     ` Andrew Lunn
2008-09-04 17:00       ` Tyler Wilson
2008-09-04 18:40         ` Sergei Gavrikov
2008-09-04 19:18           ` Tyler Wilson
2008-09-04 19:35             ` Sergei Gavrikov
2008-09-05  5:24               ` Andrew Lunn
2008-09-05 16:19   ` Tyler Wilson
2008-09-05 16:37     ` Bart Veer
2008-09-05 19:27     ` Sergei Gavrikov
2008-09-08 15:35       ` Tyler Wilson
2008-09-08 18:17         ` Sergei Gavrikov
2008-09-08 19:03           ` Sergei Gavrikov
2008-09-09 16:48           ` Tyler Wilson

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