public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problem getting eCos tests running
@ 1999-10-05 21:12 John Fisher
  1999-10-06 10:12 ` Jesper Skov
  0 siblings, 1 reply; 3+ messages in thread
From: John Fisher @ 1999-10-05 21:12 UTC (permalink / raw)
  To: 'eCos discussion mailing list'

I have installed the sourceware distribution of eCos as described at
http://sourceware.cygnus.com/ecos/install-windows.html . Everything went
smoothly.

I am running through the tutorial and have configured and built eCos to use
the PowerPC architecture and the Motorola FADS evaluation board. Everything
has gone smoothly up to the point where I try an eCos test case running as
described in
http://sourceware.cygnus.com/ecos/docs-1.2.1/tutorials/ecos-tutorial/run-an-
ecos-test-case.html

The following is a transcript of the session:

/cygnus/ecosSWtools-990319/H-i586-cygwin32/bin/powerpc-eabi-gdb -nw
install/tests/kernel/bin_sem0
GNU gdb 4.17-ecosSWtools-990319
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.  This version of GDB is supported
for customers of Cygnus Solutions.  Type "show warranty" for details.
This GDB was configured as "--host=i586-cygwin32 --target=powerpc-eabi"...
(gdb) target sim -f  "/Program Files/Cygnus
Solutions/eCos/packages/hal/powerpc/sim/v1_2_1/runtime/tree"
Size of register r0 (0) incorrect (1 instead of 4))Connected to the
simulator.
(gdb) rbreak cyg_test_exit
No program loaded.
(gdb) rbreak cyg_assert_fail
(gdb) load
(gdb) run
Starting program: /c/eCosFADS/install/tests/kernel/bin_sem0.exe
cpu 1, cia 0xfff00700: double interrupt - MSR[RI] bit clear when attempting
to d
eliver interrupt, cia=0xfff00700, msr=0x40; srr0=0x23ac(cia),
srr1=0x82042(msr);
 trap-vector=0x700, trap-msr=0x40

Program terminated with signal ?, Unknown signal.
The program no longer exists.
(gdb)


The message "Size of register r0 (0) incorrect (1 instead of 4)" appears to
be caused by a bug in the power PC simulator with sim_fetch_register() in
ecosSWtools-990319\src\sim\ppc\sim_calls.c:

int
sim_fetch_register (SIM_DESC sd, int regno, unsigned char *buf, int length)
{
  if (simulator == NULL) {
    return;


	/* ^^^^ no return value from non void function */

  }
  TRACE(trace_gdb, ("sim_fetch_register(regno=%d(%s), buf=0x%lx)\n",
		    regno, register_names[regno], (long)buf));
  psim_read_register(simulator, MAX_NR_PROCESSORS,
		     buf, register_names[regno],
		     raw_transfer);
  return -1;
}

This function doesn't seem to suit its caller very well either:
gdbsim_fetch_register() which is the size of the register in bytes.

I don't know whether this is the cause of the problem or minor. Any
comments?

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

* Re: [ECOS] Problem getting eCos tests running
  1999-10-05 21:12 [ECOS] Problem getting eCos tests running John Fisher
@ 1999-10-06 10:12 ` Jesper Skov
  1999-10-06 10:54   ` Jonathan Larmour
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Skov @ 1999-10-06 10:12 UTC (permalink / raw)
  To: jfisher; +Cc: 'eCos discussion mailing list'

>>>>> "John" == John Fisher <jfisher@tns.neca.nec.com.au> writes:

I think your problem is that you are trying to run an FADS executable
in the SIM. The PowerPC simulator can only handle executable that are
configured for it (--target=powerpc --platform=sim).

John> The message "Size of register r0 (0) incorrect (1 instead of 4)"
John> appears to be caused by a bug in the power PC simulator with
John> sim_fetch_register() in
John> ecosSWtools-990319\src\sim\ppc\sim_calls.c:

Yes, we've seen this before. I think it's actually a bug that may have
been forgotten :( I'll make sure your comment reaches the simulator
team.

Cheers,
Jesper

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

* Re: [ECOS] Problem getting eCos tests running
  1999-10-06 10:12 ` Jesper Skov
@ 1999-10-06 10:54   ` Jonathan Larmour
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 1999-10-06 10:54 UTC (permalink / raw)
  To: jfisher; +Cc: 'eCos discussion mailing list'

Jesper Skov wrote:
> 
> >>>>> "John" == John Fisher <jfisher@tns.neca.nec.com.au> writes:
> 
> I think your problem is that you are trying to run an FADS executable
> in the SIM. The PowerPC simulator can only handle executable that are
> configured for it (--target=powerpc --platform=sim).
> 
> John> The message "Size of register r0 (0) incorrect (1 instead of 4)"
> John> appears to be caused by a bug in the power PC simulator with
> John> sim_fetch_register() in
> John> ecosSWtools-990319\src\sim\ppc\sim_calls.c:
> 
> Yes, we've seen this before. I think it's actually a bug that may have
> been forgotten :( I'll make sure your comment reaches the simulator
> team.

It turns out this bug has been fixed in GDB 4.18. You could try using that
if you liked, but since you think you've found the problem it shouldn't make
much difference now :-).

Jifl
-- 
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK.  Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
 my brains kept falling out."    || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/  These opinions are all my own fault

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

end of thread, other threads:[~1999-10-06 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-05 21:12 [ECOS] Problem getting eCos tests running John Fisher
1999-10-06 10:12 ` Jesper Skov
1999-10-06 10:54   ` Jonathan Larmour

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