summaryrefslogtreecommitdiff
path: root/doc/README.dk1c20
blob: 3c0e41bf7d6f5ee6f71dea0ef21b95c8140e050c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
			 Nios Development Kit
			   Cyclone Editions

		    Last Update: January 2, 2004
====================================================================

This file contains information regarding U-Boot and the Altera
Nios Development Kit, Cyclone Edition (DK-1C20). For general Nios
information see doc/README.nios.

For those interested in contributing ... see HELP WANTED section
in doc/README.nios.

Contents:

	1. Files
	2. Memory Organization
	3. Examples
	4. Programming U-Boot into FLASH with GERMS
	5. Active Serial Memory Interface (ASMI) Support

====================================================================

1. Files
=========
	board/altera/dk1c20/*
	include/configs/DK1C20.h

2. Memory Organization
=======================

	-The heap is placed below the monitor (U-Boot code).
	-Global data is placed below the heap.
	-The stack is placed below global data (&grows down).

3. Examples
============

The hello_world example works fine. The default load address
is 0x0100_0000 (the start of SDRAM).


4. Programming U-Boot into FLASH with GERMS
============================================
The current version of the DK-1C20 port with the default
configuration settings occupies about 81 KBytes of flash.
A minimal configuration occupies less than 60 KByte (asmi
and network support disabled).

To program U-Boot into the DK-1C20 flash using GERMS do the
following:

1. From the command line, download U-Boot using the nios-run:

	$ nios-run -r u-boot.srec

This takes about 45 seconds (GERMS is not very speedy here).
After u-boot is downloaded it will be executed. You should
see the following:

    U-Boot 1.0.0-pre (Oct  4 2003 - 07:39:24)

    CPU: Nios-32 Rev. 3.3 (0x3038)
    Reg file size: 256 LO_LIMIT/HI_LIMIT: 2/14
    Board: Altera Nios 1C20 Development Kit
    In:	   serial
    Out:   serial
    Err:   serial
    ==>


2. Quit nios-run and start your terminal application (e.g. start
Hyperterminal or minicom).

3. Download the u-boot code to RAM. When using Hyperterminal, do the
following:

   a.  From the u-boot command prompt start a binary download to SRAM:

    ==> loadb 800000

    b. Download u-boot.bin using kermit.

4. From the U-Boot command prompt, erase flash 0x40000 to 0x5ffff:

    ==> erase 1:4-5

5. Copy the binary image from SRAM to flash:

    ==> cp.b 800000 40000 10000

U-Boot will now automatically start when the board is powered on or
reset using the Standard-32 configuration. To start U-Boot with the
Safe-32 configuration, enter the following GERMS command:

    + g 40000

5. Active Serial Memory Interface (ASMI) Support
================================================
ASMI is fully supported in U-Boot. Please note that ASMI is supported
only on Cyclone devices. Do not expect ASMI to work with Stratix or
APEX devices.

		 ************* IMPORTANT *************
	 ===================================================
	IN ORDER FOR THE NIOS ASMI TO OPERATE PROPERLY, THE
	CYCLONE DEVICE MUST BE CONFIGURED USING JTAG OR ASMI.

There are two techniques you can use to bootstrap the ASMI. The
first is to use the program_epcs utility that is part of Altera's SDK.
But I've found program_epcs to be slow and cumbersome at best.

An undocumented alternative is to use the Quartus device programing
interface:

    1. Select "Active Serial" mode.

    2. Choose the xxx.pof file. For example, for the standard_32
       configuration use the "standard_32.pof" file.

    3. Attach your ByteBlaster to J28. Make sure you have the
       cable attached properly -- the orientation of J28 is
       different than J24 (the JTAG header). On J28, pin 1 is on
       the bottom row, left-most pin.

    4. Press and hold the "Power-On Reset" switch (SW10). You will
       see the green "Loading" and red "Error" LEDs (LED3 and LED4)
       in the on state.

    5. While holding down the "Power-On Reset" switch, start the
       programming sequence. This only takes about 10 seconds.

    6. After programming is complete, release the "Power-On Reset"
       switch. The Cyclone device should now load its configuration
       from the EPCS4 (U59). The green "User" LED (LED 1) should be
       blinking if the device was successfully loaded via ASMI.

    7. Remove the ByteBlaster cable. The cable must be removed to
       allow the Nios ASMI access to the EPCS4 device.

After you have successfully programmed a configuration into the
EPCS4, the ASMI will be used to load the Cyclone configuration
unless the "Force Safe" switch (SW9) is pressed.

NOTE: To maximize the amount of space available for program use,
you can enable configuration compression in Quartus. With compression
enabled, the size of the standard_32 configuration data is
approximately 192 KBytes.

To use the U-Boot ASMI commands, try typing "help asmi" at the
command prompt. The command "asmi info" will show the current
status of the ASMI.