This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help! Cannot simulate


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]