public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eb40a target submitted
@ 2002-07-22 10:37 Tim Drury
  2002-07-22 11:03 ` Gary Thomas
  2002-07-22 19:30 ` Tim Drury
  0 siblings, 2 replies; 10+ messages in thread
From: Tim Drury @ 2002-07-22 10:37 UTC (permalink / raw)
  To: ecos-discuss


I created the patch for the Atmel eb40a target and posted it
to the ecos-patches mailing list.  There are a few notes regarding
its use.

1. It must be applied on top of Thomas Koeller's eb40 patch.
It makes a couple changes to his patch and adds the eb40a
target.  His patch can be found in the ecos-patches list in an
email dated June 26, 2002.

2. When building the tests, the resulting elf image is not runnable
by redboot.  It has to be converted to srecs first.  Here is how
I built the tests:

ecosconfig target eb40a
ecosconfig tree
make ; make all
<cd into the directory containing a test image>
arm-elf-objcopy -O srec basic basic.srec

You can then upload via ymodem the basic.srec image to
the eb40a and issue the 'g' command to run it.

A few things I love to see here: a) what is the proper way to
make the process create srecs instead of elf images?
b) can we have each test end by returning to redboot so the
target board doesn't have to be reset after each run?
c) can we automate this in Linux?

CAVEAT: I only ran about 25% of all the tests simply because
my hands were starting to hurt after manually converting, uploading,
and running all the test cases.  I chose what I thought would be the
most rigorous tests.  Let me know if any of the tests you run fail.

3) The eb40a board is not supposed to come with on-board SRAM,
but for some reason mine did.  Since it isn't supposed to have SRAM
the bootstrap program (angel) burned into flash doesn't turn the 
SRAM chip select (CS1) on, so you have to do this when you launch 
gdb.  Here is what I do to upload redboot into RAM:

arm-elf-gdb -nw redboot.elf
tar rdi s=/dev/ttyS0
set $ps=0xd3
set *0xffe00004=0x02002121  (to turn on CS1)
lo
c
<ctrl-z to stop gdb and free the serial port>

Then to upload the ROMRAM version of redboot and burn it into the
flash, I run the following:

minicom -o
<may need to hit return to see redboot prompt>
load -m ymodem -b 0x02040000
<upload the ROMRAM version redboot.srec via ymodem>
fis write -f 0x01100000 -b 0x02040000 -l 0xe000

Now the ROMRAM version of redboot is burned into the upper half
of flash (notice the flash address above is different than the eb40
instructions since the flash on the eb40a is much larger).  Change the
jumper to map the upper half of flash to 0x01000000 and press the
reset button on the eb40a.  Viola! you should see the redboot prompt
from the ROMRAM version.  Now you can upload tests, code, etc.
via redboot.

Building redboot for the eb40a is the same for building the redboot for
the eb40, but I'll reiterate it here.  Be sure ECOS_RESPOSITORY points
to the packages directory.

from a clean working directory do:

ecosconfig target eb40a redboot
ecosconfig import 
$ECOS_REPOSITORY/hal/arm/at91/eb40a/current/misc/redboot_XXX.ecm
ecosconfig tree
make

Let me know if you find any problems with this patch.

-tim drury


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: [ECOS] eb40a target submitted
@ 2002-07-22 15:20 GREGHOL
  0 siblings, 0 replies; 10+ messages in thread
From: GREGHOL @ 2002-07-22 15:20 UTC (permalink / raw)
  To: ecos-discuss

Well I reported the that the ~1meg elf file wouldn't
load for me either. Now it it works. :) I have no idea
why now since I havn't changed my tools other than get-
ting the 7-20 source image.
I'm using a EB40 (non A) with stock RAM and an EPI
Jeeni JTAG box over ethernet. Insight 5.1, gcc 3.02

Greg

>On Mon, 2002-07-22 at 12:13, Tim Drury wrote:
>> 
>> > >
>> > > 2. When building the tests, the resulting elf 
image is not runnable
>> > > by redboot.  It has to be converted to srecs 
first.  Here is how
>> > > I built the tests:
>> >
>> > What's the problem?  What errors are you getting?
>> >
>> > If arm-elf-objcopy can read the file, GDB should 
be able to as well,
>> > since they use the same library for reading ELF 
images.
>> 
>> It's not gdb reading it, it's redboot.  Redboot 
(ROMRAM) appears
>> to load the elf image, but 'g' does nothing.  
Looking at my (kick ass!)
>> logic analyzer, it's caught in a tight loop of 
running off in the sticks
>> then jumping back into the exception hander code in 
low memory.
>> I can look into this deeper if necessary.
>> 
>
>This sounds like a problem with the RedBoot ELF 
loader.  It works fine
>for me, so some investigation would be nice/warranted.
>

Greg


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-07-24 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-22 10:37 [ECOS] eb40a target submitted Tim Drury
2002-07-22 11:03 ` Gary Thomas
2002-07-22 11:14   ` Tim Drury
2002-07-22 11:24     ` Gary Thomas
2002-07-22 11:28       ` Mark Salter
2002-07-22 11:32         ` Gary Thomas
2002-07-22 19:30 ` Tim Drury
2002-07-23 10:40   ` James
2002-07-24  7:18     ` Tim Drury
2002-07-22 15:20 GREGHOL

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