MINI2440: Remove the extraneous PLL config at startup
[u-boot-openmoko/mini2440.git] / doc / README.adnpesc1
blobded53210bd2211383a2d172990edff4f196175bd
2               SSV ADNP/ESC1 Embedded Softcore Computing
3                  Nios Softcore, Altera Cyclone FPGA
5                     Last Update: February 27, 2004
6 ====================================================================
8 This file contains information regarding U-Boot and the SSV Embedded
9 Nios Softcore Computing platform ADNP/ESC1. For general Nios
10 information see doc/README.nios.
12 Most stuff of this file was borrowed and based on README.dk1s10,
13 the Altera DK-1S10 related information file.
15 For those interested in contributing ... see HELP WANTED section
16 in doc/README.nios.
18 Contents:
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
28 ====================================================================
30 1. Files
31 =========
32         board/ssv/adnpesc1/*
33         include/configs/ADNPESC1.h
34         include/configs/ADNPESC1_base_32.h
37 2. Memory Organization
38 =======================
40 For the most part, you can put things pretty much anywhere.
41 This is pretty flexible for Nios. So here we make some arbitrary
42 choices & assume that the monitor is placed at the end of a memory
43 resource. So you must make sure TEXT_BASE is chosen appropriately.
44 This is very important if you plan to move your memory to another
45 place as configured at this time!
47         -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).
51 (see doc/README.adnpesc1_base32 too)
54 3. CPU Variations
55 =================
57 There are more than one NIOS CPU variation for the ADNP/ESC1 possible.
58 U-Boot supports the following CPU configurations:
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)
65 4. Examples
66 ============
68 The hello_world example works fine. To try out you have to change
69 the default load address from 0x0100_0000 to 0x0204_0000 in
70 examples/Makefile (the real SDRAM for default board configuration).
73 5. Programming U-Boot into FLASH with GERMS
74 ============================================
76 The current version of the ADNP/ESC1 port with the default
77 configuration settings occupies about 97 KBytes of flash.
78 A minimal configuration occupies less than 70 KByte
79 (network, SPI, POST and board command support disabled). You
80 can save more memory by deactivating the Hu-Shell support and
81 long command help (CFG_HUSH_PARSER, CFG_LONGHELP).
83 To program U-Boot into the ADNP/ESC1 flash using GERMS do the
84 following:
86 1. Download U-Boot to its target run space in SDRAM:
88    a. Close jumper RCM_EN# and push the reset button.
90    b. From the command line, download U-Boot using the
91       nios-run:
93         $ nios-run -r u-boot.srec
95       NOTE: In some cases this want fail. I don't know why,
96             but try again.
98 This takes about 1 minute (GERMS is not very speedy here).
99 After u-boot is downloaded it will be executed. You should
100 see the following:
102     U-Boot 1.0.2 (Jan 30 2004 - 12:59:15)
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 >
114 2. Quit nios-run and start your terminal application (e.g. start
115    Hyperterminal or minicom).
117 3. Download the u-boot code to RAM. When using Hyperterminal, do the
118    following:
120    a. From the u-boot command prompt start a binary download to SDRAM:
122       at the SSV Basis 32 to SDRAM:
124         ==> loadb 2000100
126    b. Download u-boot.bin using kermit.
128 4. From the U-Boot command prompt, erase flash:
130    at the SSV Basis 32 from 0x1000000 to 0x103ffff:
132         ==> protect off 1:0-3
133         ==> erase 1:0-3
135 5. Copy the binary image from SDRAM to flash:
137    at the SSV Basis 32 from SDRAM:
139         ==> cp.b 2000100 1000000 $filesize
141 U-Boot will now automatically start when the board is powered on or
142 reset using the SSV Basis 32 configuration without closed RCM jumper.
143 To start U-Boot with closed RCM Jumper, enter the following GERMS
144 command:
146     + g 1000000
149 6. Autoboot
150 ===========
152 U-Boot will try to boot a valid Nios application from Flash. For this
153 it will use the deposited Hu-Shell script in environment variable
154 'bootcmd' which is looking for a valid Nios application identifier
155 string in Flash and go on at even its entry address. For more
156 information see the next chapter.
159 7. U-Boot environment convention and update philosophy
160 ======================================================
162 U-Boot for the SSV ADNP/ESC1 target knows about many environment
163 variables used to control the startup process, update process for
164 raw Nios applications, and optionally file system image updates.
165 In default configuration there are two Hu-Shell scripts to update
166 the Nios application and/or the file system image:
168 1. Update Nios application (ex. the uCLinux kernel):
170         run 'appl_update'
172 2. Update optional file system image (ex. RomFS image used by uCLinux):
174         run 'fs_update'
176 The Nios application can be any programm code generated in relation
177 to the Nios application identifier -- the string "Nios" at offset
178 address 0x0c. To use the scripts like described above in a secure way
179 you have to check-up the next environment variables:
181 1. update_allowed
183         - Update switch -- must be set to '1' (one) to allow any update
184         - default is '0' (zero)
186           NOTE: You should avoid to save this variable with non zero
187                 value to Flash. Otherwise it would be allow any
188                 update process at any time!
190 2. appl_entry_addr
192         - Nios application area start address (usually in Flash)
193         - this is the startup address for autoboot
194         - each Nios application code we want to update will be copied
195           to this address
196         - default is CFG_ADNPESC1_NIOS_APPL_ENTRY
198 3. appl_end_addr
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
204 4. appl_ident_addr
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
210 5. appl_ident_str
212         - the Nios application identification string itself
213         - default is CFG_ADNPESC1_NIOS_IDENTIFIER
215 6. appl_name
217         - name of file we have to download/update
218         - default is ADNPESC1/base32/linux.bin
220 7. fs_base_addr
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
226 8. fs_end_addr
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
232 9. fs_name
234         - name of file we have to download/update
235         - default is ADNPESC1/base32/romfs.img