blob: 3c0e41bf7d6f5ee6f71dea0ef21b95c8140e050c [file] [log] [blame]
wdenk60164a82003-10-08 23:26:14 +00001
2 Nios Development Kit
3 Cyclone Editions
4
wdenkad276f22004-01-04 16:28:35 +00005 Last Update: January 2, 2004
wdenk60164a82003-10-08 23:26:14 +00006====================================================================
7
8This file contains information regarding U-Boot and the Altera
9Nios Development Kit, Cyclone Edition (DK-1C20). For general Nios
10information see doc/README.nios.
11
12For those interested in contributing ... see HELP WANTED section
13in doc/README.nios.
14
wdenkad276f22004-01-04 16:28:35 +000015Contents:
wdenk60164a82003-10-08 23:26:14 +000016
wdenkad276f22004-01-04 16:28:35 +000017 1. Files
18 2. Memory Organization
19 3. Examples
20 4. Programming U-Boot into FLASH with GERMS
21 5. Active Serial Memory Interface (ASMI) Support
22
23====================================================================
24
251. Files
26=========
wdenkc0bc2e12004-02-09 23:12:24 +000027 board/altera/dk1c20/*
wdenk60164a82003-10-08 23:26:14 +000028 include/configs/DK1C20.h
29
wdenkad276f22004-01-04 16:28:35 +0000302. Memory Organization
31=======================
wdenk60164a82003-10-08 23:26:14 +000032
wdenkad276f22004-01-04 16:28:35 +000033 -The heap is placed below the monitor (U-Boot code).
34 -Global data is placed below the heap.
35 -The stack is placed below global data (&grows down).
wdenk60164a82003-10-08 23:26:14 +000036
wdenkad276f22004-01-04 16:28:35 +0000373. Examples
38============
wdenk60164a82003-10-08 23:26:14 +000039
wdenkad276f22004-01-04 16:28:35 +000040The hello_world example works fine. The default load address
41is 0x0100_0000 (the start of SDRAM).
wdenk60164a82003-10-08 23:26:14 +000042
43
wdenkad276f22004-01-04 16:28:35 +0000444. Programming U-Boot into FLASH with GERMS
45============================================
46The current version of the DK-1C20 port with the default
47configuration settings occupies about 81 KBytes of flash.
48A minimal configuration occupies less than 60 KByte (asmi
49and network support disabled).
wdenk3da587e2003-10-19 23:22:11 +000050
wdenk60164a82003-10-08 23:26:14 +000051To program U-Boot into the DK-1C20 flash using GERMS do the
52following:
53
541. From the command line, download U-Boot using the nios-run:
55
56 $ nios-run -r u-boot.srec
57
58This takes about 45 seconds (GERMS is not very speedy here).
59After u-boot is downloaded it will be executed. You should
60see the following:
61
62 U-Boot 1.0.0-pre (Oct 4 2003 - 07:39:24)
63
wdenkad276f22004-01-04 16:28:35 +000064 CPU: Nios-32 Rev. 3.3 (0x3038)
wdenk60164a82003-10-08 23:26:14 +000065 Reg file size: 256 LO_LIMIT/HI_LIMIT: 2/14
66 Board: Altera Nios 1C20 Development Kit
wdenkad276f22004-01-04 16:28:35 +000067 In: serial
wdenk60164a82003-10-08 23:26:14 +000068 Out: serial
69 Err: serial
70 ==>
71
72
732. Quit nios-run and start your terminal application (e.g. start
74Hyperterminal or minicom).
75
wdenkc0bc2e12004-02-09 23:12:24 +0000763. Download the u-boot code to RAM. When using Hyperterminal, do the
wdenk60164a82003-10-08 23:26:14 +000077following:
78
wdenkad276f22004-01-04 16:28:35 +000079 a. From the u-boot command prompt start a binary download to SRAM:
wdenk60164a82003-10-08 23:26:14 +000080
81 ==> loadb 800000
82
wdenkad276f22004-01-04 16:28:35 +000083 b. Download u-boot.bin using kermit.
wdenk60164a82003-10-08 23:26:14 +000084
wdenkc0bc2e12004-02-09 23:12:24 +0000854. From the U-Boot command prompt, erase flash 0x40000 to 0x5ffff:
86
87 ==> erase 1:4-5
88
wdenk60164a82003-10-08 23:26:14 +0000895. Copy the binary image from SRAM to flash:
90
91 ==> cp.b 800000 40000 10000
92
93U-Boot will now automatically start when the board is powered on or
94reset using the Standard-32 configuration. To start U-Boot with the
95Safe-32 configuration, enter the following GERMS command:
96
97 + g 40000
wdenkad276f22004-01-04 16:28:35 +000098
995. Active Serial Memory Interface (ASMI) Support
100================================================
101ASMI is fully supported in U-Boot. Please note that ASMI is supported
102only on Cyclone devices. Do not expect ASMI to work with Stratix or
103APEX devices.
104
105 ************* IMPORTANT *************
106 ===================================================
107 IN ORDER FOR THE NIOS ASMI TO OPERATE PROPERLY, THE
108 CYCLONE DEVICE MUST BE CONFIGURED USING JTAG OR ASMI.
109
110There are two techniques you can use to bootstrap the ASMI. The
111first is to use the program_epcs utility that is part of Altera's SDK.
112But I've found program_epcs to be slow and cumbersome at best.
113
114An undocumented alternative is to use the Quartus device programing
115interface:
116
117 1. Select "Active Serial" mode.
118
119 2. Choose the xxx.pof file. For example, for the standard_32
120 configuration use the "standard_32.pof" file.
121
122 3. Attach your ByteBlaster to J28. Make sure you have the
123 cable attached properly -- the orientation of J28 is
124 different than J24 (the JTAG header). On J28, pin 1 is on
125 the bottom row, left-most pin.
126
127 4. Press and hold the "Power-On Reset" switch (SW10). You will
128 see the green "Loading" and red "Error" LEDs (LED3 and LED4)
129 in the on state.
130
131 5. While holding down the "Power-On Reset" switch, start the
132 programming sequence. This only takes about 10 seconds.
133
134 6. After programming is complete, release the "Power-On Reset"
135 switch. The Cyclone device should now load its configuration
136 from the EPCS4 (U59). The green "User" LED (LED 1) should be
137 blinking if the device was successfully loaded via ASMI.
138
139 7. Remove the ByteBlaster cable. The cable must be removed to
140 allow the Nios ASMI access to the EPCS4 device.
141
142After you have successfully programmed a configuration into the
143EPCS4, the ASMI will be used to load the Cyclone configuration
144unless the "Force Safe" switch (SW9) is pressed.
145
146NOTE: To maximize the amount of space available for program use,
147you can enable configuration compression in Quartus. With compression
148enabled, the size of the standard_32 configuration data is
149approximately 192 KBytes.
150
151To use the U-Boot ASMI commands, try typing "help asmi" at the
152command prompt. The command "asmi info" will show the current
153status of the ASMI.