comparison packages/redboot/current/doc/redboot.edb7xxx @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents
children
comparison
equal deleted inserted replaced
114:5ad2b71d525e 115:6ed91473a1cd
1 RedBoot for the EDB7xxx
2 =======================
3
4 Target
5 ------
6
7 This document describes using RedBoot with the Cirrus Logic ARM-based
8 EDB7xxx evaluation boards.
9
10 Installation on the Target Board
11 --------------------------------
12
13 Copy the two '.srec' files to /tftpboot or where-ever they have to be for
14 your tftp server.
15
16 Briefly, we use whatever boot flash image you have in place already (CygMon
17 or an eCos stub ROM) along with GDB, to execute a RAM based version of
18 RedBoot. That is used, in its command-line mode, to fetch a ROM-based boot
19 image of RedBoot and write it into the flash memory. "Fetching" the image
20 means tftp from a server; the image must be in S-Record format. We then
21 reset the target, thus running the newly-installed boot image of RedBoot.
22 That in turn is used, in its command-line mode, to fetch a RAM-based boot
23 image of RedBoot and write it into a different area of the flash memory, in
24 order to make it easier to do the first part (running a RAM-based RedBoot
25 in order to update the boot block) again in future.
26
27 1. Program RedBoot image into FLASH:
28
29 Using the 'dl_edb7xxx' tool (or it's Windows equivalent), program the
30 file 'edb7212_redboot_ROM.bin' into the flash.
31
32 2. Execute RedBoot from ROM, and initialize the flash filing system.
33 Notes: the key here is the "-o" option which keeps minicom from
34 sending junk.
35
36 % minicom -o ttyS0
37
38 RedBoot(tm) debug environment - built 08:36:10, Aug 15 2000
39 Copyright (C) 2000, Red Hat, Inc.
40
41 RAM: 0x00000000-0x00fd7000
42 FLASH: 0xe0000000 - 0xe1000000, 128 blocks of 0x00020000 bytes ea.
43 IP: 192.168.1.23, Default server: 192.168.1.101
44 show tcp = 0x0001ed58
45 RedBoot>
46
47 RedBoot> fi in
48 About to initialize [format] FLASH image system - are you sure (y/n)? y
49 *** Initialize FLASH Image System
50 Warning: device contents not erased, some blocks may not be usable
51 ... Erase from 0xe0fe0000-0xe1000000: .
52 ... Program from 0x00fa7000-0x00fa7400 at 0xe0fe0000: .
53
54 4. Install RAM based RedBoot for backup/update:
55 Similar considerations apply: redboot-ram.srec must be an S-record
56 version of RedBoot built for RAM startup.
57
58 RedBoot> lo -v edb7212_redboot.srec
59 Entry point: 0x00010044, address range: 0x00010000-0x0001ee88
60 RedBoot> fi cr RedBoot[backup] -f 0xe0020000 -b 0x10000 -l 0x20000
61 An image named 'RedBoot[backup]' exists - are you sure (y/n)? y
62 ... Erase from 0xe0020000-0xe0040000: .
63 ... Program from 0x00010000-0x00030000 at 0xe0020000: .
64 ... Erase from 0xe0fe0000-0xe1000000: .
65 ... Program from 0x00fa7000-0x00fc7000 at 0xe0fe0000: .
66 RedBoot> fi li
67 Name FLASH addr Mem addr Length Entry point
68 RedBoot 0xE0000000 0xE0000000 0x020000 0xE0000044
69 RedBoot[backup] 0xE0020000 0xE0020000 0x020000 0x00010044
70 RedBoot config 0xE0FC0000 0xE0FC0000 0x020000 0x00000000
71 FIS directory 0xE0FE0000 0xE0FE0000 0x020000 0x00000000
72 RedBoot>
73
74 You have now updated your board completely. Phew!
75
76
77
78 5. To update RedBoot with a new version of RedBoot, it is necessary to run
79 a RAM-based version of RedBoot which itself re-writes the ROM-based one,
80 because you can't re-write the code that is executing at the time.
81
82 RedBoot> fi lo RedBoot[backup]
83 RedBoot> g
84 +
85 RedBoot(tm) debug environment - built 07:45:57, Aug 7 2000
86 Copyright (C) 2000, Red Hat, Inc.
87
88 RAM: 0x00000000-0x00fd7000
89 FLASH: 0xe0000000 - 0xe1000000, 128 blocks of 0x00020000 bytes ea.
90 IP: 192.168.1.25, Default server: 192.168.1.101
91 show tcp = 0x00030d48
92 RedBoot>
93
94 .. continue with step 3, using whatever your new boot image is called
95 in the tftp-place, in .srec format.
96
97
98 You probably also want to set up then environment with your own IP
99 addresses and so on. Recall that this IP address is the one you use for
100 GDB to talk to the board, not the IP address which the eCos application
101 will take on (by bootp/dhcp or whatever means according to configury as
102 usual).
103
104 RedBoot> fconfig
105 Network debug at boot time: false
106 Use BOOTP for network configuration: false
107 Local IP address: 192.168.1.25
108 Default server IP address: 192.168.1.101
109 Network hardware address [MAC]: 0x08:0x88:0x12:0x34:0x56:0x79
110 GDB connection port: 1000
111 Run script at boot: false
112 RedBoot>
113
114
115 Building RedBoot
116 ----------------
117
118 To rebuild RedBoot from source, first cut out the attached configuration
119 export file "redboot.RAM" and save it somewhere, say /tmp/redboot.RAM
120
121 mkdir redboot
122 cd redboot
123 ecosconfig new edb7212 redboot
124 ecosconfig import /tmp/redboot.RAM
125 ecosconfig tree
126 make
127
128 To build the ROM version, in a different build/config directory, just
129 change the startup mode (at the end of the export file).
130
131 Here is the redboot.RAM configuration export:
132
133 =========================== redboot.RAM =====================================
134 cdl_savefile_version 1;
135 cdl_savefile_command cdl_savefile_version {};
136 cdl_savefile_command cdl_savefile_command {};
137 cdl_savefile_command cdl_configuration { description hardware template package };
138 cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value };
139 cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value };
140 cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value };
141 cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value };
142
143 cdl_configuration eCos {
144 description "" ;
145 hardware edb7212 ;
146 template redboot ;
147 package -hardware CYGPKG_HAL_ARM current ;
148 package -hardware CYGPKG_HAL_ARM_EDB7XXX current ;
149 package -hardware CYGPKG_DEVS_ETH_ARM_EDB7XXX current ;
150 package -hardware CYGPKG_IO_SERIAL_ARM_EDB7XXX current ;
151 package -template CYGPKG_HAL current ;
152 package -template CYGPKG_INFRA current ;
153 package -template CYGPKG_REDBOOT current ;
154 package CYGPKG_IO_ETH_DRIVERS current ;
155 package CYGPKG_IO_FLASH current ;
156 package CYGPKG_DEVS_FLASH_EDB7XXX current ;
157 };
158
159 cdl_option CYGBLD_BUILD_GDB_STUBS {
160 user_value 0
161 };
162
163 cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT {
164 user_value 0
165 };
166
167 cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS {
168 inferred_value 1
169 };
170
171 cdl_option CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT {
172 inferred_value 0
173 };
174
175 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
176 inferred_value 0 0
177 };
178
179 cdl_option CYGHWR_HAL_ARM_EDB7XXX_VARIANT {
180 user_value EP7212
181 };
182
183 cdl_option CYGHWR_HAL_ARM_EDB7XXX_PROCESSOR_CLOCK {
184 user_value 73728
185 };
186
187 cdl_option CYGBLD_BUILD_REDBOOT {
188 user_value 1
189 };
190
191 cdl_component CYG_HAL_STARTUP {
192 user_value RAM
193 };
194 =========================== redboot.RAM =====================================
195