This is the mail archive of the ecos-discuss@sourceware.cygnus.com 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]

Re: twothreads.c not working correctly on ARM AEB1


javelina wrote:
> 
> Jonathan Larmour wrote:
> 
> > javelina wrote:
> > > Continuing.
> > > Entering twothreads' cyg_user_start() function
> > > Beginning execution; thread data is 0
> > > Beginning execution; thread data is 1
> > > Thread 0: and now a delay of 1104334939 clock ticks
> > > Thread 1: and now a delay of 1149184530 clock ticks
> > >
> > > Notice the HUGE delay.  It should be something between 200 and 250.
> >
> > I haven't seen this before. Is this the default configuration? If not,
[snip my waffle]
> To try your suggestion:
> I believe I enabled assertions by editing the section of the ecos.ecc file as
> shown below:
> 
> cdl_component CYGPKG_INFRA_DEBUG {
>     # Flavor: bool
>     user_value 1                             <<< I edited this line, 

Yep that's right.

> Then I recompiled the kernel, and tried to compile twothreads.c, as shown
> below:
> 
> #arm-elf-gcc -g -I/home/ljavelina/ecos_work_new/install/include twothreads.c
> -L/home/ljavelina/ecos_work_new/install/lib -Ttarget.ld -nostdlib
> /usr/cygnus/ecosSWtools-arm-990321/H-i586-pc-linux-gnu/lib/gcc-lib/arm-elf/2.9-ecosSWtools-arm-990321/../../../../arm-elf/bin/ld:
> address 0x280e8 of a.out section .data is not within region ram
[snip]
> Am I on the right track?  Are the messages the desired consequence of enabling
> the assertions (i.e. to they tell me the problem I was having with the
> twothreads executable), or are they an undesired consequence (i.e. the
> assertions make the executable to big)?

They're an undesired consequence :-(. In that case, to find out what's
going on, edit twothreads.c. At the beginning add:

#include <cyg/infra/diag.h>

and then further down replace *all three* calls to printf with diag_printf
instead. That should reduce the size requirements.

It would also help tell me whether rand() going wrong, or printf() if it
suddenly appears to start working :-).

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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