Prise en main Atmel AT91SAM9X35-EK

Mettre le dip switch SW1-1 (NAND Flash access) à ON (SW1-2 à OFF, JP9 OUVERT et JP5 CLOSE).

Séquence de démarrage

Relier un cable USB/RS232 sur J11 (DEBUG).

On obtient un port série virtuel /dev/ttyUSB0 pour la console de débugage.

Avec picocom : $ picocom -b 115200 /dev/ttyUSB0

RomBOOT
Start AT91Bootstrap...
Init DDR... Done!
Loading 1-Wire info...
Enumerate all roms:
Rom#0x0: 0xd5 0x0 0x0 0x3 0x21 0x85 0x0 0x2d 
Rom#0x1: 0x3b 0x0 0x0 0x3 0x8 0x15 0x4a 0x2d 
Rom#0x2: 0x55 0x0 0x0 0x1 0x2 0xb3 0xca 0x23 
Done, 0x3 1-wire chips found!

Board name: SAM9x5-EK [B0]; Vendor name: FLEX
Board name: SAM9X35-CM [B1]; Vendor name: EMBEST
Board name: SAM9x5-DM [B0]; Vendor name: FLEX
sn: 0x4010426;   rev: 0x8421
Downloading image...
chip id: 0x2cda
Copy 0x50000 bytes from 0x40000 to 0x26f00000
Done!


U-Boot 2010.06 (Jun 23 2011 - 10:51:37)

DRAM:  128 MiB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xdde1)
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x200000, size 0x250000
atmel_nand : one bit error on data. (data byte : bd, in page offset : 159, bit offset : 0x2)
atmel_nand : error corrected
 2424832 bytes read: OK
## Booting kernel from Legacy Image at 22000000 ...
   Image Name:   Angstrom/2.6.39/at91sam9x5ek
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2351680 Bytes = 2.2 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39 (nferre@RFOLXTS02.rfo.atmel.com) (gcc version 4.5.3 20110223 (prerelease) (GCC) ) #1 Thu Jun 23 09:29:18 CEST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9X5-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) root=/dev/mtdblock1 rw rootfstype=ubifs ubi.mtd=1 root=ubi0:root
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
...

starting pid 150, tty '/dev/console': '/sbin/getty -L 115200 ttyS0 vt100'

SAM9 login: root
login[150]: root login on 'ttyS0'
running /etc/profile.local
root@SAM9:~

Test

# cat /proc/version 
Linux version 2.6.39 (nferre@RFOLXTS02.rfo.atmel.com) (gcc version 4.5.3 20110223 (prerelease) (GCC) ) #1 Thu Jun 23 09:29:18 CEST 2011

# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:root               217.7M     28.4M    189.3M  13% /
devtmpfs                 61.1M     52.0K     61.0M   0% /dev
none                     61.1M     88.0K     61.0M   0% /tmp
none                     61.1M         0     61.1M   0% /var/log
none                     61.1M     16.0K     61.1M   0% /var/run
none                     61.1M         0     61.1M   0% /var/lock
none                     61.1M         0     61.1M   0% /var/tmp
tmpfs                    61.1M     52.0K     61.0M   0% /dev

# free -m
              total         used         free       shared      buffers
  Mem:       125108        39684        85424            0            0
 Swap:            0            0            0
Total:       125108        39684        85424

# cat /proc/cpuinfo 
Processor   : ARM926EJ-S rev 5 (v5l)
BogoMIPS    : 199.06
Features    : swp half thumb fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part    : 0x926
CPU revision    : 5

Hardware    : Atmel AT91SAM9X5-EK

# ifconfig
eth0      Link encap:Ethernet  HWaddr EA:2A:B9:3E:B5:6A  
          inet addr:192.168.52.16  Bcast:192.168.52.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:139 errors:1 dropped:30 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9753 (9.5 KiB)  TX bytes:1372 (1.3 KiB)
          Interrupt:24 Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# netstat -at 
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN

Remarque : l’écan tactile n’est pas calibré mais fonctionnel. On peut visualiser une vidéo d’Atmel sur l’écran LCD (application /usr/bin/atmel-qml -qws).

Flashage

Version : Angstrom-x11-at91sam9-image-eglibc-ipk-v20110624-at91sam9x5ek.rootfs

Mettre le dip switch SW1-1 (NAND Flash access) à OFF puis à ON.

$ sam-ba /dev/ttyACM0 AT91SAM9X35-EK at91sam9x5ek_demo_linux_nandflash.tcl
# cat /proc/version
Linux version 2.6.39 (nferre@RFOLXTS02.rfo.atmel.com) (gcc version 4.5.3 20110223 (prerelease) (GCC) ) #1 Fri Nov 18 12:49:36 CET 2011

# free -m
             total       used       free     shared    buffers     cached
Mem:           122         57         65          0          0         26
-/+ buffers/cache:         31         91
Swap:            0          0          0

# cat /proc/cpuinfo 
Processor   : ARM926EJ-S rev 5 (v5l)
BogoMIPS    : 199.06
Features    : swp half thumb fastmult edsp java 
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part    : 0x926
CPU revision    : 5

Hardware    : Atmel AT91SAM9X5-EK

# ifconfig 
eth0      Link encap:Ethernet  HWaddr D2:D6:07:11:13:5B  
          inet addr:192.168.52.23  Bcast:192.168.52.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:174 errors:1 dropped:26 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18656 (18.2 KiB)  TX bytes:6947 (6.7 KiB)
          Interrupt:24 Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# netstat -tan
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

Retour au sommaire