650 likes | 663 Views
Download Image to EVB Board and Flash Programming. Nov, 2008. 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. Introduction.
E N D
Download Image to EVB Board and Flash Programming Nov, 2008 www.andestech.com
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
Introduction • This document describes how to download image and program/replace Andes’ Leopard NOR Flash code Confidential
Diagram and Download Path Ethernet/TCPIP UART EVB Board SD Card ICE Confidential
Download Image via SD Card www.andestech.com
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
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
Step 1~3 con’t Confidential
Step 4 Confidential
Step 5 Confidential
Step 6-1 execute image on sdram Confidential
Step 6-2 burn image into Flash Confidential
Program NOR Flash via AICE(Automatic Mode) www.andestech.com
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
Files Functionality • flash.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
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
Step 1 Con’t Confidential
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
Step2 Con’t Invoke Andes toolchain console Confidential
Step2 Con’t Confidential
Step 2 con’t program has done Confidential
Step 3 Confidential
Program NOR Flash via AICE(Manual Mode) www.andestech.com
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 0x2000000 • (gdb) set $r0=0x2000000 • (gdb) set $r1=0x80400000 • (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
Files introduction • flash.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
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
Step 1 Con’t Confidential
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
Step2 Con’t Invoke Andes toolchain console Confidential
Step2 Con’t Confidential
Step 3 Set target endian as little Confidential
Step 4 Connect with iceman Confidential
Step 5 Execute init-board-leopard.gdb script to Init SDRAM & NOR Flash Confidential
Step 6 Copy flash-writer program to SDRAM address 0x500000 Confidential
Step 7 Copy boot code to SDRAM address 0x2000000 Confidential
Step 8 set source address Confidential
Step 9 Set destination address Confidential
Step 10 Set the length which it will be programmed into flash Confidential
Step 11 Modify the program counter register to 0x500000 Confidential
Step 12 Start to execute flash.bin program Confidential
Program NOR Flash via Diagnostic program www.andestech.com
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 0x500000 0x80400000 0x100000” to start to program flash Confidential
Step 1 Confidential
Step 2 Select “97” to copy file to SDRAM Confidential
Step 3 Type “c” to select the drive Confidential
Step 4 Type the file name which will be copied to SDRAM Confidential
Step 5 Specify the destination address Confidential
Step 6 Type “55” to go into CLI mode Confidential
Step 7 Type burn command to write file to flash 0x500000 => Source address 0x80400000=>Destination address 0x100000 => Length Confidential
Download Image via Kermit www.andestech.com