* [ECOS] Problems with test
@ 2003-10-14 11:31 James Yates
2003-10-14 11:43 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: James Yates @ 2003-10-14 11:31 UTC (permalink / raw)
To: ecos-discuss
I have recently ported eCos to a custom platform based on an SH2 chip. I am currently trying to build all the tests since I seem to be running into problems with multi-threads which I am trying to track down. Being very new to eCos this has been quite a learning process, but I am pretty stuck on this one.
I have a configuration with everything included except uitron and networking. I am trying to build the tests but upon building the mbox1 test in the kernel, the compiler seems to seg fault:
sh-elf-gcc -c -I/ecos-d/Dev/eCos/builds/test_install/include -I/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0 -I/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/src -I/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/tests -I. -I/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/tests/ -mb -m2 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -Wp,-MD,tests/mqueue1.tmp -o tests/mqueue1.o /ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/tests/mqueue1.cxx
make[1]: Leaving directory `/ecos-d/Dev/eCos/builds/test_build/kernel/v2_0'
/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/tests/mqueue1.cxx: In function `void
cyg_user_start()':
/ecos-d/ecos/ecos-2.0/packages/kernel/v2_0/tests/mqueue1.cxx:406: internal
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[1]: *** [tests/mqueue1.d] Error 1
make: Leaving directory `/ecos-d/Dev/eCos/builds/test_build'
make: *** [tests] Error 2
I am reasonably sure I am using the latest version of the sh-elf-gcc which is 3.2.1 which I downloaded from cygwin last week. Has anyone come across this problem, or has any ideas what could be wrong. I was also getting a seg fault when building snmp which is why I have taken networking out.
Any ideas anyone? Any help gratefully received.
James Yates
--
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] 5+ messages in thread
* Re: [ECOS] Problems with test
2003-10-14 11:31 [ECOS] Problems with test James Yates
@ 2003-10-14 11:43 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2003-10-14 11:43 UTC (permalink / raw)
To: James Yates; +Cc: ecos-discuss
> I am reasonably sure I am using the latest version of the sh-elf-gcc
> which is 3.2.1 which I downloaded from cygwin last week. Has anyone
> come across this problem, or has any ideas what could be wrong. I
> was also getting a seg fault when building snmp which is why I have
> taken networking out.
Have you tried the compiler recommended by eCosCentric? There version
has been tested with eCos and should work fine.
See http://ecos.sourceware.org/ecos/getstart.html, section toolchain.
Andrew
--
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] 5+ messages in thread
* RE: [ECOS] Problems with test
@ 2003-10-15 8:35 James Yates
0 siblings, 0 replies; 5+ messages in thread
From: James Yates @ 2003-10-15 8:35 UTC (permalink / raw)
To: Andrew Lunn; +Cc: ecos-discuss
Good idea. Many thanks. Will send in a bug report to GNU regarding compiler problems.
many thanks for your help.
James Yates
-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: 14 October 2003 16:10
To: James Yates
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Problems with test
On Tue, Oct 14, 2003 at 03:31:40PM +0100, James Yates wrote:
> Oops my apologies. Yes the version of gcc I am using was one that I
> downloaded with the latest version of eCos using the
> ecos-install.tcl script.
> After much playing around with configurations I have discovered that
> if I build with -O2 specified as a Build Flag, i get a segmentation
> fault when building mqueue1 test. If I specifiy -O1 or no
> optimization this problem goes away. So for the moment I have
> optimization at level 1.
Its probably a good idea to report a bug. For one of the files that
causes a crash, do the compile again, but add -save-temps. You will
then get some extra files generated. Goto
http://bugs.ecos.sourceware.org/query.cgi and create a new bug report
and attach the temp files.
> This has enabled to build most tests, although some of the
> clock tests in Libc time have failed due to cache problems. I have
> no cache defined since the SH2 I am using has no on-chip cache, this
> has caused me problems in various areas of the tree. I have had to
> resort to defining the various cache related functions to asm("nop")
> in my variant src to save having to make changes throughout the
> entire source. Is this a valid thing to do?
I've not looked at the SH2 code before today.....
It looks like a better solution would be to add a new
CYGARC_SH_MOD_CAC. You can then make the HAL macros empty statements
and set the HAL_?CACHE_SIZE to 0. This will tell eCos you don't have a
cache. We can then add this to anoncvs.
Andrew
--
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] 5+ messages in thread
* Re: [ECOS] Problems with test
2003-10-14 14:30 James Yates
@ 2003-10-14 15:09 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2003-10-14 15:09 UTC (permalink / raw)
To: James Yates; +Cc: ecos-discuss
On Tue, Oct 14, 2003 at 03:31:40PM +0100, James Yates wrote:
> Oops my apologies. Yes the version of gcc I am using was one that I
> downloaded with the latest version of eCos using the
> ecos-install.tcl script.
> After much playing around with configurations I have discovered that
> if I build with -O2 specified as a Build Flag, i get a segmentation
> fault when building mqueue1 test. If I specifiy -O1 or no
> optimization this problem goes away. So for the moment I have
> optimization at level 1.
Its probably a good idea to report a bug. For one of the files that
causes a crash, do the compile again, but add -save-temps. You will
then get some extra files generated. Goto
http://bugs.ecos.sourceware.org/query.cgi and create a new bug report
and attach the temp files.
> This has enabled to build most tests, although some of the
> clock tests in Libc time have failed due to cache problems. I have
> no cache defined since the SH2 I am using has no on-chip cache, this
> has caused me problems in various areas of the tree. I have had to
> resort to defining the various cache related functions to asm("nop")
> in my variant src to save having to make changes throughout the
> entire source. Is this a valid thing to do?
I've not looked at the SH2 code before today.....
It looks like a better solution would be to add a new
CYGARC_SH_MOD_CAC. You can then make the HAL macros empty statements
and set the HAL_?CACHE_SIZE to 0. This will tell eCos you don't have a
cache. We can then add this to anoncvs.
Andrew
--
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] 5+ messages in thread
* RE: [ECOS] Problems with test
@ 2003-10-14 14:30 James Yates
2003-10-14 15:09 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: James Yates @ 2003-10-14 14:30 UTC (permalink / raw)
To: Andrew Lunn; +Cc: ecos-discuss
Oops my apologies. Yes the version of gcc I am using was one that I downloaded with the latest version of eCos using the ecos-install.tcl script.
After much playing around with configurations I have discovered that if I build with -O2 specified as a Build Flag, i get a segmentation fault when building mqueue1 test. If I specifiy -O1 or no optimization this problem goes away. So for the moment I have optimization at level 1.
This has enabled to build most tests, although some of the clock tests in Libc time have failed due to cache problems. I have no cache defined since the SH2 I am using has no on-chip cache, this has caused me problems in various areas of the tree. I have had to resort to defining the various cache related functions to asm("nop") in my variant src to save having to make changes throughout the entire source.
Is this a valid thing to do?
I now have some tests running successfully although I have problems with signals, timers and mutex related stuff.
-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: 14 October 2003 12:43
To: James Yates
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Problems with test
> I am reasonably sure I am using the latest version of the sh-elf-gcc
> which is 3.2.1 which I downloaded from cygwin last week. Has anyone
> come across this problem, or has any ideas what could be wrong. I
> was also getting a seg fault when building snmp which is why I have
> taken networking out.
Have you tried the compiler recommended by eCosCentric? There version
has been tested with eCos and should work fine.
See http://ecos.sourceware.org/ecos/getstart.html, section toolchain.
Andrew
--
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] 5+ messages in thread
end of thread, other threads:[~2003-10-15 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-14 11:31 [ECOS] Problems with test James Yates
2003-10-14 11:43 ` Andrew Lunn
2003-10-14 14:30 James Yates
2003-10-14 15:09 ` Andrew Lunn
2003-10-15 8:35 James Yates
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).