This is the mail archive of the ecos-discuss@sources.redhat.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]
Other format: [Raw text]

eb40a target submitted


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


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