public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Help! Cannot simulate
@ 2007-06-27  0:38 Michele Portolan
  2007-06-28  8:23 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Michele Portolan @ 2007-06-27  0:38 UTC (permalink / raw)
  To: ecos-discuss

Hello everyone,
I have eCos running nicely on my FPGA-implemented Leon2, but I cannot simulate in on modelsim. 

In fact <cyg_hal_invoke_constructors> does not seem to end correctly: each time it cause an acces at address 0x070, that if I am not mistaken is an exception.

I saw that the code for <cyg_hal_invoke_constructors> is the following:

	  void	cyg_hal_invoke_constructors (void)
		{
		    typedef void (*pfunc) (void);
		    extern pfunc __CTOR_LIST__[];
		    extern pfunc __CTOR_END__[];
		    pfunc *p;
	
		    for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
		        (*p) ();
		}

Well, in the desassembly of my ecos executable there is no definition if symbols "__CTOR_END__" and "__CTOR_LIST__", that on the other hand are always defined when compiling without ecos.

What is the problem? I am really stuck here.....

Thanks,

Michele

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

* Re: [ECOS] Help! Cannot simulate
  2007-06-27  0:38 [ECOS] Help! Cannot simulate Michele Portolan
@ 2007-06-28  8:23 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2007-06-28  8:23 UTC (permalink / raw)
  To: Michele Portolan; +Cc: ecos-discuss

On Tue, Jun 26, 2007 at 08:53:48AM +0200, Michele Portolan wrote:
> Hello everyone,
> I have eCos running nicely on my FPGA-implemented Leon2, but I cannot 
> simulate in on modelsim. 
> In fact <cyg_hal_invoke_constructors> does not seem to end correctly: each 
> time it cause an acces at address 0x070, that if I am not mistaken is an 
> exception.
> 
> I saw that the code for <cyg_hal_invoke_constructors> is the following:
> 
> 	  void	cyg_hal_invoke_constructors (void)
> 		{
> 		    typedef void (*pfunc) (void);
> 		    extern pfunc __CTOR_LIST__[];
> 		    extern pfunc __CTOR_END__[];
> 		    pfunc *p;
> 	
> 		    for (p = &__CTOR_END__[-1]; p >= __CTOR_LIST__; p--)
> 		        (*p) ();
> 		}
> 
> Well, in the desassembly of my ecos executable there is no definition if 
> symbols "__CTOR_END__" and "__CTOR_LIST__", that on the other hand are 
> always defined when compiling without ecos.

These symbols should be added by the linker and are inserted by the
linker script. eg take a look at:

packages/hal/arm/arch/current/src/arm.ld, line 233.

Check the linker file being used for your target.

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

end of thread, other threads:[~2007-06-27 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-27  0:38 [ECOS] Help! Cannot simulate Michele Portolan
2007-06-28  8:23 ` Andrew Lunn

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