Presentation is loading. Please wait.

Presentation is loading. Please wait.

Download Image to EVB Board and Flash Programming

Similar presentations


Presentation on theme: "Download Image to EVB Board and Flash Programming"— Presentation transcript:

1 Download Image to EVB Board and Flash Programming
Nov, 2008

2 Download Image via SD card Program NOR Flash via AICE (automatic Mode)
Outline Introduction Download Image via SD card Program NOR Flash via AICE (automatic Mode) Program NOR Flash via AICE (manual Mode) Download Image via Kermit Download Image via networking Confidential

3 Introduction This document describes how to download image and program/replace Andes’ Leopard NOR Flash code Confidential

4 Diagram and Download Path
Ethernet/TCPIP UART EVB Board SD Card ICE Confidential

5 Download Image via SD Card

6 Brief Download Procedure –via SD card
Copy correct image into SD card Inserts SD card into EVB board Type 97 to enter CopyImageFromCard mode Type c, type correct image name Type sdram address which will be the address is copy from image Either execute image or burn into flash Confidential

7 Copy correct image into SD card Inserts SD card into EVB board
Step 1~3 Copy correct image into SD card Inserts SD card into EVB board Turn on DC-IN switch Push power on button down Push reset button down Push sw5 buton down Led should display “67” $97 Confidential

8 Step 1~3 con’t Confidential

9 Step 4 Confidential

10 Step 5 Confidential

11 Step 6-1 execute image on sdram
Confidential

12 Step 6-2 burn image into Flash
Confidential

13 Program NOR Flash via AICE (Automatic Mode)

14 Brief Programming Procedure –via gdb script
$ iceman –p 1234 $ nds32-elf-gdb –x run_loader.txt $ nds32-elf-gdb –x no_loader.txt (Note 1: Step 2 suits running on EVB board with boot code) (Note 2: Step 3 suits running on EVB board without boot code) (Note 3: The figure on Leopard LED shows 08 after flash programming done) Confidential

15 Files Functionality flash.bin init-board-leopard.gdb rominit.bin
A program that reads SDRAM data according to the specified address and length and writes the data to NOR flash specified address init-board-leopard.gdb A script that can initialize SDRAM controller and change NOR flash to R/W mode rominit.bin An andes diagnostic boot code no_loader.txt A gdb command script suits running on EVB board without bootcode run_loader.txt A gdb command script suits running on EVB board with bootcode Confidential

16 Push power on button down Push reset button down
Step 1 Turn on DC-IN switch Push power on button down Push reset button down Plug AICE USB cable into PC’s USB port Click ICEMan icon on the desktop Type following command in ICEMan console iceman –p 1234 Confidential

17 Step 1 Con’t Confidential

18 Step 2 Select a toolchain to invoke gdb
[開始] -> [程式集] -> [AndesTech] -> [AndeSight] -> [ToolChains] -> [nds32-elf-903-s-32gpr] Copy following 5 files to workspace folder init-board-leopard.gdb flash.bin rominit.bin run_loader.txt no_loader.txt Invoke an Andes toolchain console and go to workspace folder Type following command in toolchain console to invoke gdb nds32-elf-gdb –x run_loader.txt Confidential

19 Invoke Andes toolchain console
Step2 Con’t Invoke Andes toolchain console Confidential

20 Step2 Con’t Confidential

21 Step 2 con’t program has done
Confidential

22 Step 3 Confidential

23 Program NOR Flash via AICE (Manual Mode)

24 Brief Programming Procedure
$ iceman –p 1234 $ nds32-elf-gdb (gdb) set endian little (gdb) target remote :1234 (gdb) source init-board-leopard.gdb (gdb) restore flash.bin binary 0x500000 (gdb) restore rominit.bin binary 0x (gdb) set $r0=0x (gdb) set $r1=0x (gdb) set $r2=0x80000 (gdb) set $pc=0x500000 (gdb) continue (Note 1: If there is bootcode on target board, skip step 5) (Note 2: The figure on Leopard LED shows 08 after flash programming done) Confidential

25 Files introduction flash.bin init-board-leopard.gdb rominit.bin
A program that reads SDRAM data according to the specified address and length and writes the data to NOR flash specified address init-board-leopard.gdb A script that can initialize SDRAM controller and change NOR flash to R/W mode rominit.bin An andes diagnostic boot code Confidential

26 Push power on button down Wait for LED’s figure shows 99
Step 1 Turn on DC-IN switch Push power on button down Wait for LED’s figure shows 99 Plug AICE USB cable into PC’s USB port Click ICEMan icon on the desktop Type following command in ICEMan console iceman –p 1234 Confidential

27 Step 1 Con’t Confidential

28 Select a toolchain to invoke gdb
Step 2 Select a toolchain to invoke gdb [開始] -> [程式集] -> [AndesTech] -> [AndeSight] -> [ToolChains] -> [nds32-elf-903-s-32gpr] Copy following 3 files to workspace folder init-board-leopard.gdb flash.bin rominit.bin Type following command in toolchain console to invoke gdb nds32-elf-gdb Confidential

29 Invoke Andes toolchain console
Step2 Con’t Invoke Andes toolchain console Confidential

30 Step2 Con’t Confidential

31 Set target endian as little
Step 3 Set target endian as little Confidential

32 Step 4 Connect with iceman Confidential

33 Step 5 Execute init-board-leopard.gdb script to Init SDRAM & NOR Flash
Confidential

34 Copy flash-writer program to SDRAM address 0x500000
Step 6 Copy flash-writer program to SDRAM address 0x500000 Confidential

35 Copy boot code to SDRAM address 0x2000000
Step 7 Copy boot code to SDRAM address 0x Confidential

36 Step 8 set source address Confidential

37 Set destination address
Step 9 Set destination address Confidential

38 Set the length which it will be programmed into flash
Step 10 Set the length which it will be programmed into flash Confidential

39 Modify the program counter register to 0x500000
Step 11 Modify the program counter register to 0x500000 Confidential

40 Start to execute flash.bin program
Step 12 Start to execute flash.bin program Confidential

41 Program NOR Flash via Diagnostic program

42 Brief Programming Procedure
Turn on DC-IN swtich, push PWR ON button down, push GPIO 1 button down, and then terminal will enter diagnostic program. Insert SD card, assume it contains rominit.bin file, to leopard. And then type “97” in command line Type “c” Type file name “rominit.bin” Type “0x500000” to specify the program to be loaded address Type “55” to enter CLI mode Type “burn 0x x x100000” to start to program flash Confidential

43 Step 1 Confidential

44 Select “97” to copy file to SDRAM
Step 2 Select “97” to copy file to SDRAM Confidential

45 Type “c” to select the drive
Step 3 Type “c” to select the drive Confidential

46 Type the file name which will be copied to SDRAM
Step 4 Type the file name which will be copied to SDRAM Confidential

47 Specify the destination address
Step 5 Specify the destination address Confidential

48 Type “55” to go into CLI mode
Step 6 Type “55” to go into CLI mode Confidential

49 Type burn command to write file to flash
Step 7 Type burn command to write file to flash 0x => Source address 0x => Destination address 0x => Length Confidential

50 Download Image via Kermit

51 Brief Download Procedure
Open Windows “Hyper terminal” program Setup Baud rate: 38400,8,n,1,n Turn on EVB board, Leopard, and enter “ANDES diagnostic program” Type “55” to enter CLI mode Type “loadb 0x ” to specify the location where image to be loaded Push “transfer” and load correct image through kermit protocol in “super terminal” program Select transfer protocol and in Window Hyper terminal [Transfer] -> [Transfer file] Select “Kermit” as transfer protocol Select the file to be trensfered Push “transfer” button to start transfer file (Note 1: The function just works on Windows “Hyper terminal”) Confidential

52 Step 1,2 Confidential

53 Step 4,5,6 Confidential

54 Step 7 Confidential

55 Step 7 Con’t Confidential

56 Download Image via Networking

57 Brief Download Procedure
Setup correct tftp server and relating IP address setting TeraTerm setting-Baud rate: 38400,8,n,1,n Turn on EVB board, Leopard, and enter “ANDES diagnostic program” Type “96” to enter NDS boot EVB board Setup corresponding IP address and relating EVB board retrieve image from tftp server Either execute image or burn into flash Confidential

58 Step 1 tftp server enable and work
Confidential

59 Step 1 con’t IP address and relating setting
Confidential

60 Step 1~4 Confidential

61 Step 1~4 con’t Andesboot Memory Layout
Andesboot will be copied to 0x in memory The bootpImage will be downloaded to 0x 0x 0x 0x AndesBoot 0x 0x 0x AndesBoot BootpImage 0x Confidential

62 Step 5,6,7-1 Confidential *** Using default environment
NDS32>printenv printenvbootdelay=3 baudrate=38400 ethaddr=00:41:71:99:00:00 ipaddr= serverip= netmask= NDS32>setenv ipaddr NDS32>setenv serverip setenv serverip NDS32>tftpboot 0x leopard.img tftpboot 0x leopard.imgADDR: 00:41:71:99:00:00 ADDR: 00:41:71:99:00:00 ARP broadcast 1 eth addr: 00:15:58:b9:8d:67 TFTP from server ; our IP address is Filename ‘leopard.img'. Load address: 0x Loading: ### done Bytes transferred = (895d20 hex) NDS32>go 0x go 0x ## Starting application at 0x Uncompressing Linux done, booting the kernel. Linux version andes (gcc version 3.4.4) #4 Wed Nov 7 16:54:46 CST 2007 CPU: Andes N12id(wb) revision 12 ICache:32kb enabled, DCache:32kb enabled Machine: Andes AG101 Confidential

63 Step 5,6,7-1 con’t Confidential Ignoring unrecognised tag 0x00000000
On node 0 totalpages: 16384 zone(0): pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: initrd=0x800000,8M root=/dev/ram0 rw console=ttyS0,38400n8 rootfstype=ext2 init=/sbin/init -s IRQ timer at interrupt number 0x13 clock Calibrating delay loop BogoMIPS Memory: 64MB = 64MB total Memory: 55072KB available (1130K code, 263K data, 48K init) Dentry cache hash table entries: 8192 (order: 4, bytes) Inode cache hash table entries: 4096 (order: 3, bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 4096 (order: 2, bytes) Page-cache hash table entries: (order: 4, bytes) POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd Journalled Block Device driver loaded devfs: v1.12c ( ) Richard Gooch devfs: boot_options: 0x0 pty: 256 Unix98 ptys configured Serial driver version 5.05c ( ) with no serial options enabled ttyS00 at 0xf (irq = 7) is a UART ttyS01 at 0xf (irq = 11) is a UART ttyS02 at 0xf (irq = 10) is a UART Faraday FTMAC100 Driver,(Linux Kernel 2.4) 10/18/02 - by Faraday eth0: device at 0xf IRQ:25 NOWAIT:0 RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize loop: loaded (max 8 devices) Faraday CPE SD controller Driver (DMA mode) make node with 'mknod cpesda b 6 0' NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 4096 bind 8192) NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 6144 blocks [1 disk] into ram disk... done. Freeing initrd memory: 8192K VFS: Mounted root (ext2 filesystem). Freeing init memory: 48K Thu Nov 1 14:00:00 UTC x7 / $ Confidential

64 Thank You Confidential


Download ppt "Download Image to EVB Board and Flash Programming"

Similar presentations


Ads by Google