public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Problems with running applications
@ 2001-08-21 12:02 Peter Blair
  2001-08-21 12:07 ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Blair @ 2001-08-21 12:02 UTC (permalink / raw)
  To: ecos-discuss

Hello Everyone,
 
I'm still plugging away with eCos, but have hit a wall a far as
execution of the compiled application is concerned.
 
I've written a test application (Source code provided at bottom of
email), compiled and linked it against the eCos library, and transfered
it to the target host (i386) via serial.  Unfortunately, I'm unable to
view any printf() statements on the target-pc's screen, but am pretty
sure that the application is running.
 
Also, the program seems to hang in i386-elf-gdb/insight once it has
reached the "cyg_libc_invoke_atexit_handlers()" from the exit.cxx file.
 
Conditions:
a) My eCos build was done from the command line by issuing: 
$ ecosconfig new pc
$ ecosconfig tree
$ make
b) I'm using the 'current' version of the eCos source repository, and
the updated version of 'ecosconfig'.
c) My build environment is Cygwin/Windows-2000.
d) I'm using i386-elf-gdb with the Insight front-end to transfer & run
my applications.
 
Is eCos' stdout the screen, a serial port on the target machine, or
somewhere in gdb?
 
(I experience the same things when running the programs supplied in the
example directory of the eCos repository)
 
Thanks,
Peter Blair
 
--Source Code--
#include <stdio.h>
int main_function(void){
  printf("Testing, 1-2-3\n");
  return 0;
}
void cyg_user_start(){
  main_function();
}
--Source Code end--

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

* Re: [ECOS] Problems with running applications
  2001-08-21 12:02 [ECOS] Problems with running applications Peter Blair
@ 2001-08-21 12:07 ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-21 12:07 UTC (permalink / raw)
  To: Peter Blair; +Cc: ecos-discuss

Peter Blair wrote:
> 
> Hello Everyone,
> 
> I'm still plugging away with eCos, but have hit a wall a far as
> execution of the compiled application is concerned.
> 
> I've written a test application (Source code provided at bottom of
> email), compiled and linked it against the eCos library, and transfered
> it to the target host (i386) via serial.  Unfortunately, I'm unable to
> view any printf() statements on the target-pc's screen, but am pretty
> sure that the application is running.
> 
> Also, the program seems to hang in i386-elf-gdb/insight once it has
> reached the "cyg_libc_invoke_atexit_handlers()" from the exit.cxx file.
> 
> Conditions:
> a) My eCos build was done from the command line by issuing:
> $ ecosconfig new pc
> $ ecosconfig tree
> $ make
> b) I'm using the 'current' version of the eCos source repository, and
> the updated version of 'ecosconfig'.
> c) My build environment is Cygwin/Windows-2000.
> d) I'm using i386-elf-gdb with the Insight front-end to transfer & run
> my applications.
> 
> Is eCos' stdout the screen, a serial port on the target machine, or
> somewhere in gdb?

If you loaded over serial via GDB, the output should come over the serial
via GDB. What if you just have:

-=-=-=-=-
#include <stdio.h>
int main(){
  printf("Testing, 1-2-3\n");
  return 0;
}
-=-=-=-=-


Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* Re: [ECOS] Problems with running applications
  2001-08-21 13:20 Peter Blair
@ 2001-08-21 13:44 ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-21 13:44 UTC (permalink / raw)
  To: Peter Blair; +Cc: ecos-discuss

Peter Blair wrote:
> 
> I did load the application via GDB/Insight, just as you described in
> your prior message.

Not in the command-line GDB trace you gave.

> As described in my previous message all transfers using GDB/Insight
> occur without problem-- the problem arrises when the application is
> executed, and no console box appears, and the program becomes stuck in
> the cyg_libc_invoke_atexit_handlers() function (even when no return(),
> or exit() function calls are made when using the cyg_user_start()
> function and not the main() function).

When your main_program function exits, the scheduler will start, and start
a main().

> Is there a way to get the console up, or is it expected behaviour on the
> Cygwin compiled copy of GDB/Insight? 

View->Console in Insight.

> And how can I get the program to
> not hang in this function call?

It's probably because a breakpoint has been set at "exit". At a guess.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* RE: [ECOS] Problems with running applications
@ 2001-08-21 13:20 Peter Blair
  2001-08-21 13:44 ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Blair @ 2001-08-21 13:20 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: ecos-discuss

I did load the application via GDB/Insight, just as you described in
your prior message.

As described in my previous message all transfers using GDB/Insight
occur without problem-- the problem arrises when the application is
executed, and no console box appears, and the program becomes stuck in
the cyg_libc_invoke_atexit_handlers() function (even when no return(),
or exit() function calls are made when using the cyg_user_start()
function and not the main() function).
 
Is there a way to get the console up, or is it expected behaviour on the
Cygwin compiled copy of GDB/Insight?  And how can I get the program to
not hang in this function call?

Thanks again,
Peter Blair.

	-----Original Message----- 
	From: Jonathan Larmour 
	Sent: Tue 8/21/2001 3:36 PM 
	To: Peter Blair; eCos discussion 
	Cc: 
	Subject: Re: [ECOS] Problems with running applications
	
	

	
	You haven't loaded the program yet! Type "load" in the command
line, or
	from GDB, use Run->Download. Even easier: Use File->Target
Settings and
	choose the "More Options" arrow and select "Attach to Target"
and "Download
	Program".
	
	

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

* Re: [ECOS] Problems with running applications
       [not found] <8669764C0A96B640AE8A6F5BB7C259D955D3@turnpdcf1.home.turnpikeglobal.com>
@ 2001-08-21 12:36 ` Jonathan Larmour
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Larmour @ 2001-08-21 12:36 UTC (permalink / raw)
  To: Peter Blair, eCos discussion

[ CC the list in future please ]

Peter Blair wrote:
> 
> I've tried that, and this time I attempted to connect without using
> insight--
> 
> <--snip-->
> $ i386-elf-gdb -nw test.exe
> GNU gdb 5.0
> Copyright 2000 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.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "--host=i686-pc-cygwin --target=i386-elf"...
> (gdb) set remotebaud 38400
> (gdb) target remote com1
> Remote debugging using com1
> 0x97a8 in ?? ()
>     at
> /ecos/ecos/packages/language/c/libc/startup/current/src/atexit.cxx:115
> 115             return 1; // failure
> (gdb)
> <--end snip-->

You haven't loaded the program yet! Type "load" in the command line, or
from GDB, use Run->Download. Even easier: Use File->Target Settings and
choose the "More Options" arrow and select "Attach to Target" and "Download
Program".
 
Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

* [ECOS] Problems with running applications
@ 2001-08-21 12:25 Peter Blair
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Blair @ 2001-08-21 12:25 UTC (permalink / raw)
  To: ecos-discuss

I've tried that, and this time I attempted to connect without using
insight-- 
<--snip-->

	$ i386-elf-gdb -nw test.exe
	GNU gdb 5.0
	Copyright 2000 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.
	There is absolutely no warranty for GDB.  Type "show warranty"
for details.
	This GDB was configured as "--host=i686-pc-cygwin
--target=i386-elf"...
	(gdb) set remotebaud 38400
	(gdb) target remote com1
	Remote debugging using com1
	0x97a8 in ?? ()
	    at
/ecos/ecos/packages/language/c/libc/startup/current/src/atexit.cxx:115
	115             return 1; // failure
	(gdb)
	<--end snip-->
	 
	As you can see, I'm faced with this error whenever I transfer
without insight.  Yet with insight, the transfer appears to go without a
hitch.
	 
	Side-Note:  Whenever running GDB/Insight with my native gcc/gdb,
a console pops up with the output of my program.  From your previous
message, I would believe that a simillar box should appear with eCos'
stdout, but no such box appears.
	 
	-Pete. 

		-----Original Message----- 
		From: Jonathan Larmour 
		Sent: Tue 8/21/2001 3:07 PM 
		To: Peter Blair 
		Cc: ecos-discuss@sources.redhat.com 
		Subject: Re: [ECOS] Problems with running applications
		

		
		> Is eCos' stdout the screen, a serial port on the
target machine, or
		> somewhere in gdb?
		
		If you loaded over serial via GDB, the output should
come over the serial
		via GDB. What if you just have:
		
		-=-=-=-=-
		#include <stdio.h>
		int main(){
		  printf("Testing, 1-2-3\n");
		  return 0;
		}
		-=-=-=-=-
		

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

end of thread, other threads:[~2001-08-21 13:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 12:02 [ECOS] Problems with running applications Peter Blair
2001-08-21 12:07 ` Jonathan Larmour
2001-08-21 12:25 Peter Blair
     [not found] <8669764C0A96B640AE8A6F5BB7C259D955D3@turnpdcf1.home.turnpikeglobal.com>
2001-08-21 12:36 ` Jonathan Larmour
2001-08-21 13:20 Peter Blair
2001-08-21 13:44 ` 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).