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]

twothreads.c not working correctly on ARM AEB1


Greetings,

I have been experimenting with an ARM evaluation board using ecos 1.2.1
under Redhat Linux 6.1 with quite a bit of success, until recently I had
a hard disk failure.   I replaced the drive and began restoring my
system, and I figured it was a good time to update to ecos 1.3.1.

I very carefully followed the steps on
http://sourceware.cygnus.com/ecos/tools/linux-arm-elf.html
to install and build the development tools.  This all went smoothly.

Next, I downloaded
ecos-1.3.1-1.i386.rpm
from
http://sourceware.cygnus.com/ecos/install-linux.html
and installed it.  Then I set my PATH and ECOS_REPOSITORY as instructed.

Next I configured and built ecos as outlined in
http://sourceware.cygnus.com/ecos/docs-1.3.1/tutorials/arm/ecos-tutorial.11.html#pgfId=2031450

I issued the following commands:

mkdir ecos-work
cd ecos-work
ecosconfig new aeb1
ecosconfig tree
make

This all seemed to work perfectly.  No reported errors.

 I compiled the example twothreads.c (found in
/opt/ecos/ecos-1.3.1/examples) as follows:
arm-elf-gcc -I/home/javelina/ecos-work/install/include twothreads.c
-L/home/javelina/ecos-work/install/lib -Ttarget.ld -nostdlib
Which worked ok.

However when I ran the resulting a.out I got:

>arm-elf-gdb -nw a.out
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=i586-pc-linux-gnu
--target=arm-elf"...
>(gdb) set remotebaud 38400
>(gdb) target remote /dev/ttyS1
Remote debugging using /dev/ttyS1
0x4019358 in ?? ()
>(gdb) load
Loading section .rom_vectors, size 0x60 lma 0xc000
Loading section .text, size 0xea18 lma 0xc060
Loading section .rodata, size 0x474 lma 0x1aa78
Loading section .data, size 0x300 lma 0x1aeec
Start address 0xc060 , load size 61932
Transfer rate: 27525 bits/sec, 305 bytes/write.
>(gdb) continue
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.

My debugging efforts so far include:
- Updating the gdb stubs to 1.3
- Redoing the entire install procedure again, looking for any install
messages I missed the first time.
- Restoring my old ecos 1.2.1 kernel and tools to verify that they still
work (they do).

Has anybody else had this problem?  Am I missing something obvious?

Any help is appreciated,

Louis LeGrand










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