This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: twothreads.c not working correctly on ARM AEB1
- To: javelina <javelina at home dot com>, eCos discussion <ecos-discuss at sourceware dot cygnus dot com>
- Subject: Re: [ECOS] twothreads.c not working correctly on ARM AEB1
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Fri, 16 Jun 2000 05:14:22 +0100
- Organization: Red Hat UK Ltd.
- References: <3945AF98.2C962EAD@home.com> <39464D44.A31E032@redhat.co.uk> <3949A6A1.E2B8765C@home.com>
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