[En-Nut-Discussion] Porting NUT/OS on the AT91SAM9xe512

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Sep 28 14:11:24 CEST 2010


Hello hushxixi,

> First,I say that I use the NUT/OS version is 4.9.9. I want to say
>  something about porting NUT/OS on the AT91SAM9260 and AT91SAM9xe512。
>  first question: 
> I use the AT91SAM9260 board that is made by myself.
>  The two HY57V561620FTP-H are used for SDRAM. Uploading a
>  binary(include NUT/OS) to the AT91SAM9260 SDRAM via SAM-BA works
>  normally. 
> I use the AT91SAM9XE-ek board that is got from ATMEL
>  company. The two 48LC16M16A2 are used for SDRAM. Uploading a
>  binary(include NUT/OS) to the AT91SAM9XE-ek(AT91SAM9xe512)SDRAM via
>  SAM-BA doesn't work. 
> In the ChangeLog file( 2010-08-02),you say
>  "arch/arm/init/crtat91sam9260_ram.S: Uploading a binary to the
>   AT91SAM9260-EK SDRAM via SAM-BA doesn't work...." . 

Sorry, I don't find that entry in the svn. Can you point me where you
have found this comment? Who wrote it?

Sorry, I don't have an AT91SAM9xxx -EK board for testing, just an
ethernut5

> The problem is
>  tha same with  my AT91SAM9XE-ek board from ATMEL company. Is there a
>  problem with ATMEL's board,you think? 

No, I don't think so, but perhaps a problem in the init code that I
don't see right now. As I don't have that board it's quite hard to debug
your problem as there might be lots of reasons...

Have you just tried to step through the code with the jtag debugger? At
what point of the init code does the program crash?

> second question: I want to run
>  NUT/OS in internal flash on the AT91SAM9XE-ek(AT91SAM9xe512), How to
>  use SAM-BA to load program to the  AT91SAM9XE-ek(AT91SAM9xe512)? 

If you want to load the program from the internal flash of the
AT91SAM9XE-ek you have to write your own startup code / linker script.

Two main things have to be modified:

- add sd-ram init code
- change base address for the linker
- add copy code, that copies the bss and data segment into ram

> third
>  question: You said thar you can achieve to run NUT / OS in SDRAM and
>  internal flash on ETHERNUT 5. 

No, not from internal flash.
I can run Nut/OS from the SD-RAM and from Dataflash as well as NAND
Flash by using AT91Bootstrap or better AT91Bootstrap in combination with
U-Boot.

In this case the Nut/OS code is linked to run from ram and will be
loaded by AT91Bootstrap from the NAND- or Dataflash into sdram before
starting it there.

In this case AT91Bootstrap is responsible for initializing the SDRam.

> I want to know which linker script /
>  startup code are used for you? Where can I download? Any help will be
>  appreciated. Best Regards, hushxixi.

For the Ethernut5 you'll find everything you need in the linux board
support package for the ethernut5 which is available free for download
from http://www.embedded-it.de/en/bsp/ethernut5_bsp.php

Please notice that the used AT91Bootstrap code is implemented to run on
the Ethernut5. In other words the SDRam initialisation is adapted to the
ethernut5 ram parameters. If you use other RAM devices this might have
to be modified.

In the above mentioned bsp you'll find a step by step description how to
program the AT91Bootstrap and the u-boot into the internal flash and
dataflash of the ethernut5 and how to start the linux kernel and also a
NutOS program using TFTP.

Regards,

Ole Reinhardt

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list