blob: 5257f18b4bcd885f11f67391e75ba22c1601c290 [file] [log] [blame]
wdenke28cf632004-03-14 15:20:55 +00001
2 SSV ADNP/ESC1 Embedded Softcore Computing
3 Nios Softcore, Altera Cyclone FPGA
4
5 Last Update: February 27, 2004
6====================================================================
7
8This file contains information regarding U-Boot and the SSV Embedded
9Nios Softcore Computing platform ADNP/ESC1. For general Nios
10information see doc/README.nios.
11
12Most stuff of this file was borrowed and based on README.dk1s10,
13the Altera DK-1S10 related information file.
14
15For those interested in contributing ... see HELP WANTED section
16in doc/README.nios.
17
18Contents:
19
20 1. Files
21 2. Memory Organization
22 3. CPU Variations
23 4. Examples
24 5. Programming U-Boot into FLASH with GERMS
25 6. Autoboot
26 7. U-Boot environment convention and update philosophy
27
28====================================================================
29
301. Files
31=========
32 board/ssv/adnpesc1/*
33 include/configs/ADNPESC1.h
34 include/configs/ADNPESC1_base_32.h
35
36
372. Memory Organization
38=======================
39
40For the most part, you can put things pretty much anywhere.
41This is pretty flexible for Nios. So here we make some arbitrary
42choices & assume that the monitor is placed at the end of a memory
43resource. So you must make sure TEXT_BASE is chosen appropriately.
44This is very important if you plan to move your memory to another
45place as configured at this time!
wdenkc35ba4e2004-03-14 22:25:36 +000046
wdenke28cf632004-03-14 15:20:55 +000047 -The heap is placed below the monitor (U-Boot code).
48 -Global data is placed below the heap.
49 -The stack is placed below global data (&grows down).
50
51(see doc/README.adnpesc1_base32 too)
52
53
543. CPU Variations
55=================
56
57There are more than one NIOS CPU variation for the ADNP/ESC1 possible.
58U-Boot supports the following CPU configurations:
59
60 - SSV Basis 32 (make ADNPESC1_base_32_config)
61 - SSV Basis 32 at DNP evaluation base board 2
62 (make ADNPESC1_DNPEVA2_base_32_config)
63
64
654. Examples
66============
67
68The hello_world example works fine. To try out you have to change
69the default load address from 0x0100_0000 to 0x0204_0000 in
70examples/Makefile (the real SDRAM for default board configuration).
71
72
735. Programming U-Boot into FLASH with GERMS
74============================================
75
76The current version of the ADNP/ESC1 port with the default
77configuration settings occupies about 97 KBytes of flash.
78A minimal configuration occupies less than 70 KByte
79(network, SPI, POST and board command support disabled). You
80can save more memory by deactivating the Hu-Shell support and
81long command help (CFG_HUSH_PARSER, CFG_LONGHELP).
82
83To program U-Boot into the ADNP/ESC1 flash using GERMS do the
84following:
85
861. Download U-Boot to its target run space in SDRAM:
87
88 a. Close jumper RCM_EN# and push the reset button.
89
90 b. From the command line, download U-Boot using the
91 nios-run:
92
93 $ nios-run -r u-boot.srec
94
95 NOTE: In some cases this want fail. I don't know why,
96 but try again.
97
98This takes about 1 minute (GERMS is not very speedy here).
99After u-boot is downloaded it will be executed. You should
100see the following:
101
102 U-Boot 1.0.2 (Jan 30 2004 - 12:59:15)
103
104 CPU: Nios-32 Rev. 3.3 (0x3038)
105 Reg file size: 512 LO_LIMIT/HI_LIMIT: 1/30
106 Board: SSV DilNetPC ADNP/ESC1
107 Conf.: SSV Base 32 (nios_32)
108 In: serial
109 Out: serial
110 Err: serial
111 ADNPESC1 >
112
113
1142. Quit nios-run and start your terminal application (e.g. start
115 Hyperterminal or minicom).
116
1173. Download the u-boot code to RAM. When using Hyperterminal, do the
118 following:
119
120 a. From the u-boot command prompt start a binary download to SDRAM:
121
122 at the SSV Basis 32 to SDRAM:
123
124 ==> loadb 2000100
125
126 b. Download u-boot.bin using kermit.
127
1284. From the U-Boot command prompt, erase flash:
129
130 at the SSV Basis 32 from 0x1000000 to 0x103ffff:
131
132 ==> protect off 1:0-3
133 ==> erase 1:0-3
134
1355. Copy the binary image from SDRAM to flash:
136
137 at the SSV Basis 32 from SDRAM:
138
139 ==> cp.b 2000100 1000000 $filesize
140
141U-Boot will now automatically start when the board is powered on or
142reset using the SSV Basis 32 configuration without closed RCM jumper.
143To start U-Boot with closed RCM Jumper, enter the following GERMS
144command:
145
146 + g 1000000
147
148
1496. Autoboot
150===========
151
152U-Boot will try to boot a valid Nios application from Flash. For this
153it will use the deposited Hu-Shell script in environment variable
154'bootcmd' which is looking for a valid Nios application identifier
155string in Flash and go on at even its entry address. For more
156information see the next chapter.
157
158
1597. U-Boot environment convention and update philosophy
160======================================================
161
162U-Boot for the SSV ADNP/ESC1 target knows about many environment
163variables used to control the startup process, update process for
164raw Nios applications, and optionally file system image updates.
165In default configuration there are two Hu-Shell scripts to update
166the Nios application and/or the file system image:
167
1681. Update Nios application (ex. the uCLinux kernel):
169
170 run 'appl_update'
171
1722. Update optional file system image (ex. RomFS image used by uCLinux):
173
174 run 'fs_update'
175
176The Nios application can be any programm code generated in relation
177to the Nios application identifier -- the string "Nios" at offset
178address 0x0c. To use the scripts like described above in a secure way
179you have to check-up the next environment variables:
180
1811. update_allowed
182
183 - Update switch -- must be set to '1' (one) to allow any update
184 - default is '0' (zero)
185
186 NOTE: You should avoid to save this variable with non zero
Wolfgang Denka1be4762008-05-20 16:00:29 +0200187 value to Flash. Otherwise it would be allow any
wdenke28cf632004-03-14 15:20:55 +0000188 update process at any time!
189
1902. appl_entry_addr
191
192 - Nios application area start address (usually in Flash)
wdenkc35ba4e2004-03-14 22:25:36 +0000193 - this is the startup address for autoboot
wdenke28cf632004-03-14 15:20:55 +0000194 - each Nios application code we want to update will be copied
195 to this address
196 - default is CFG_ADNPESC1_NIOS_APPL_ENTRY
197
1983. appl_end_addr
199
200 - Nios application area end address (usually in Flash)
201 - will be used to unprotect/erase the Flash area while updating
202 - default is CFG_ADNPESC1_NIOS_APPL_END
203
2044. appl_ident_addr
205
206 - address of the Nios application identification string
207 - this is the address checked-up by autoboot
208 - default is CFG_ADNPESC1_NIOS_APPL_IDENT
209
2105. appl_ident_str
211
212 - the Nios application identification string itself
213 - default is CFG_ADNPESC1_NIOS_IDENTIFIER
214
2156. appl_name
216
217 - name of file we have to download/update
218 - default is ADNPESC1/base32/linux.bin
219
2207. fs_base_addr
221
222 - optionally file system area start address (usually in Flash)
223 - each file system we want to update will be copied to this address
224 - default is CFG_ADNPESC1_FILESYSTEM_BASE
225
2268. fs_end_addr
227
228 - optionally file system area end address (usually in Flash)
229 - will be used to unprotect/erase the Flash area while updating
230 - default is CFG_ADNPESC1_FILESYSTEM_END
231
2329. fs_name
233
234 - name of file we have to download/update
235 - default is ADNPESC1/base32/romfs.img