comparison loadtools/loadtool.help @ 518:372757bb62e4

loadtools/loadtool.help updated for new flash handling architecture
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 01 Jun 2019 22:46:54 +0000
parents e3d976e1f814
children 34d544c0f639
comparison
equal deleted inserted replaced
517:809829dbc58a 518:372757bb62e4
121 exit iota-off Exit loadtool and command an ABB power-off on the target 121 exit iota-off Exit loadtool and command an ABB power-off on the target
122 exit jump0 Exit loadtool and command the target to reboot via jump to 0 122 exit jump0 Exit loadtool and command the target to reboot via jump to 0
123 123
124 The default method of cleaning up the target device state upon exit is set 124 The default method of cleaning up the target device state upon exit is set
125 in the hardware parameters file selected with the -h or -H command line 125 in the hardware parameters file selected with the -h or -H command line
126 option; it is the exit-mode setting. On the Pirelli phone the default exit 126 option; it is the exit-mode setting. On most targets the default exit mode is
127 mode is jump0: it causes the phone to reboot and enter the "charging boot" 127 iota-off.
128 mode, as the USB cable is connected and VBUS is present. On Compal phones the
129 default exit mode is iota-off.
130 128
131 If your device is a GTA02 and you are running fc-loadtool from inside the phone 129 If your device is a GTA02 and you are running fc-loadtool from inside the phone
132 (from the AP), the exit command will power off the modem from the AP. If you 130 (from the AP), the exit command will power off the modem from the AP. If you
133 are talking to GTA02 Calypso from an external host via the headset jack, there 131 are talking to GTA02 Calypso from an external host via the headset jack, there
134 is nothing that fc-loadtool can currently do to power the modem off (exit is 132 is nothing that fc-loadtool can currently do to power the modem off (exit is
140 target device by brute force (yanking the battery). 138 target device by brute force (yanking the battery).
141 139
142 === flash 140 === flash
143 === flash2 141 === flash2
144 The primary end use of fc-loadtool is for reading and writing the NOR flash 142 The primary end use of fc-loadtool is for reading and writing the NOR flash
145 memories of the supported GSM devices. Compal phones and the GTA0x GSM modem 143 memories of the supported GSM devices. Most Calypso phones and modems have
146 have only one flash bank (as in chip select), and are manipulated with the 144 only one flash bank (as in chip select), and are manipulated with the flash
147 flash command. FreeCalypso devices and the Pirelli DP-L10 phone have two flash 145 command. FreeCalypso development boards and the Pirelli DP-L10 phone have two
148 banks (as in chip selects) of 8 MiB each; they are manipulated with the flash 146 flash banks (as in chip selects) of 8 MiB each; they are manipulated with the
149 and flash2 commands. 147 flash and flash2 commands.
150 148
151 The following flash operations are available on all target devices: 149 The following flash operations are available:
152 150
153 flash blankchk Blank-check a region of flash 151 flash blankchk Blank-check a region of flash
154 flash dump2bin Dump flash content to a file in binary format 152 flash dump2bin Dump flash content to a file in binary format
155 flash dump2srec Dump flash content to a file in S-record format 153 flash dump2srec Dump flash content to a file in S-record format
156 flash erase Erase a region of flash 154 flash erase Erase a region of flash
155 flash geom Display geometry details of detected flash chip
156 flash id Perform flash chip autodetection sequence
157 flash info Display flash configuration info 157 flash info Display flash configuration info
158 flash program-bin Program flash with a binary file 158 flash program-bin Program flash with a binary file
159 flash program-m0 Program flash with an image in TI's *.m0 format 159 flash program-m0 Program flash with an image in TI's *.m0 format
160 flash program-srec Program flash with an image in standard S-record format 160 flash program-srec Program flash with an image in standard S-record format
161 flash quickprog Program a few flash words from the command line 161 flash quickprog Program a few flash words from the command line
162 flash reset Reset flash chip to read array mode 162 flash reset Reset flash chip to read array mode
163 flash sectors Display the list of flash sector addresses and sizes 163 flash sectors Display the list of flash sector addresses and sizes
164 flash status Intel-style flash only: read Status Register
165 flash unlock Intel-style flash only: unlock flash sectors
166
167 Additional operation for Compal targets only:
168
169 flash erase-program-boot Erase and reprogram the boot sector
164 170
165 Substitute flash2 instead of flash when operating on the 2nd flash chip select 171 Substitute flash2 instead of flash when operating on the 2nd flash chip select
166 of Pirelli-style flash memory configurations. Prepend help before a command to 172 of Pirelli-style flash memory configurations. Prepend help before a command to
167 get usage information, e.g., help flash program-bin. See help compal for some 173 get usage information, e.g., help flash program-bin.
168 additional info specific to Compal targets.
169
170 === compal
171 === compalflash
172 === flash:compal
173 Compal phones have Intel or Intel-style flash chips; other Calypso targets for
174 which loadtool was originally designed have AMD-style flash chips. The author
175 of the present software has a personal bias toward AMD-style flash, hence the
176 support for Intel-style flash is not as clean. Compal phones also have the
177 Calypso boot ROM disabled, and depend on flash-resident boot code instead.
178 This property makes them brickable.
179
180 The following additional loadtool commands apply only to Compal targets with
181 Intel-style flash:
182
183 flash erase-program-boot Erase and reprogram the boot sector
184 flash status Read Intel flash Status Register
185 flash unlock Unlock flash sectors
186 174
187 === flash:blankchk 175 === flash:blankchk
188 flash[2] blankchk hex-start-offset hex-length 176 flash[2] blankchk hex-start-offset hex-length
189 177
190 Blank-checks an area of flash starting at the specified hex offset (from the 178 Blank-checks an area of flash starting at the specified hex offset (from the
197 185
198 Read device flash content and save it to a file. If only a filename is 186 Read device flash content and save it to a file. If only a filename is
199 specified, the full flash bank is dumped; one can optionally specify a starting 187 specified, the full flash bank is dumped; one can optionally specify a starting
200 offset and an explicit length, both in hex. 188 offset and an explicit length, both in hex.
201 189
202 This command is merely a user-friendly front-end to the plain dump2bin command; 190 This command was originally nothing more than a user-friendly front-end to the
203 see help dump2bin. 191 plain dump2bin command (see help dump2bin), but in the current version it first
192 performs the flash chip autodetection operation if it hasn't been done already
193 (needed in order to determine the size of the flash bank) and resets the flash
194 to read array mode.
204 195
205 === flash:dump2srec 196 === flash:dump2srec
206 flash[2] dump2srec outfile [offset [length]] 197 flash[2] dump2srec outfile [offset [length]]
207 198
208 Read device flash content and save it to a file. If only a filename is 199 Read device flash content and save it to a file. If only a filename is
209 specified, the full flash bank is dumped; one can optionally specify a starting 200 specified, the full flash bank is dumped; one can optionally specify a starting
210 offset and an explicit length, both in hex. 201 offset and an explicit length, both in hex.
211 202
212 This command is merely a user-friendly front-end to the plain dump2srec command; 203 This command was originally nothing more than a user-friendly front-end to the
213 see help dump2srec. 204 plain dump2srec command (see help dump2srec), but in the current version it
205 first performs the flash chip autodetection operation if it hasn't been done
206 already (needed in order to determine the size of the flash bank) and resets
207 the flash to read array mode.
214 208
215 === flash:erase 209 === flash:erase
216 flash[2] erase hex-start-offset hex-length 210 flash[2] erase hex-start-offset hex-length
217 211
218 Erases an area of flash starting at the specified hex offset (from the base 212 Erases an area of flash starting at the specified hex offset (from the base
219 address of the flash bank) and extending for the specified hex length. 213 address of the flash bank) and extending for the specified hex length.
220 214
221 Flash memory can only be erased (turning 0 bits back to 1s) in units of 215 Flash memory can only be erased (turning 0 bits back to 1s) in units of
222 sectors, as set in stone by the design of the flash chip in use. Loadtool 216 sectors, as set in stone by the design of the flash chip in use. Loadtool will
223 knows the sector layout of the flash chip in your device from CFI or from the 217 autodetect the flash chip in use and will only operate on those flash chip types
224 hardware parameters file (you can display it with the flash[2] sectors 218 which it knows about; if a known chip is found, loadtool knows its sector layout
225 command), and enforces that both arguments to the flash[2] erase command lie 219 and enforces that both arguments to the flash[2] erase command lie on sector
226 on sector boundaries. 220 boundaries.
227 221
228 === flash:erase-program-boot 222 === flash:erase-program-boot
229 flash erase-program-boot binfile [length] 223 flash erase-program-boot binfile [length]
230 224
231 This operation is applicable to Compal targets only. This command erases and 225 This operation is applicable to Compal targets only. This command erases and
241 of the file goes into byte 0 of the flash and so on, for the specified length. 235 of the file goes into byte 0 of the flash and so on, for the specified length.
242 If no length argument is given, it defaults to the length of the file, which 236 If no length argument is given, it defaults to the length of the file, which
243 must not exceed the length of flash sector 0: 64 KiB on the "basic" Compal 237 must not exceed the length of flash sector 0: 64 KiB on the "basic" Compal
244 phones or 8 KiB on C155/156. 238 phones or 8 KiB on C155/156.
245 239
240 === flash:geom
241 This command displays information about the detected flash chip: device name,
242 geometry details and the command set style (AMD or Intel). The displayed
243 geometry details include the total size of the flash bank, the total number of
244 sectors, the number of regions with different sector sizes and the sector size
245 and the number of sectors in each region.
246
247 === flash:id
248 This command explicitly invokes the same flash chip autodetection operation
249 that is performed the first time each flash bank is accessed with any flash or
250 flash2 command.
251
246 === flash:info 252 === flash:info
247 This command displays summary information about the flash memory configuration 253 This command displays the global flash configuration settings that have been
248 of the Calypso target device loadtool thinks it's talking to. 254 selected at fc-loadtool invokation time (hardware parameters associated with
255 the target set via -h or -H): the global single-4M, single-8M or dual-8M
256 setting and flash bank base addresses.
257
258 In previous versions this command performed flash ID checks and displayed
259 geometry information; these functions have been moved to the new flash id and
260 flash geom commands.
249 261
250 === flash:program-bin 262 === flash:program-bin
251 flash[2] program-bin flash-offset binfile [file-offset [length]] 263 flash[2] program-bin flash-offset binfile [file-offset [length]]
252 264
253 This command programs flash, using a binary file as the data source. One must 265 This command programs flash, using a binary file as the data source. One must
294 This command is intended only for developers; it provides raw access to 306 This command is intended only for developers; it provides raw access to
295 loadagent's basic flash write primitive. Read the source code for more 307 loadagent's basic flash write primitive. Read the source code for more
296 information. 308 information.
297 309
298 === flash:reset 310 === flash:reset
299 Intel-style flash memory chips (found in Compal phones) have two "stable" or 311 Intel-style flash memory chips have two "stable" or "quiescent" states: reading
300 "quiescent" states: reading array data and reading the status register (SR). 312 array data and reading the status register (SR). After an erase or program
301 After an erase or program operation the flash chip is "parked" in the Read SR 313 operation the flash chip is "parked" in the Read SR state; the flash reset
302 state; the flash reset command switches it back to reading array data. 314 command switches it back to reading array data.
303 315
304 This command works for AMD-style flash as well (found in Openmoko and Pirelli 316 This command works for AMD-style flash as well, but it is normally not needed,
305 phones), but it is normally not needed, as AMD-style flash chips automatically 317 as AMD-style flash chips automatically return to the read-array-data state
306 return to the read-array-data state after every erase or program operation. 318 after every erase or program operation.
307 319
308 === flash:sectors 320 === flash:sectors
309 This command displays the list of sector offsets and sizes for the flash chip 321 This command displays the list of sector offsets and sizes for the detected
310 in the Calypso target device loadtool thinks it's talking to. 322 flash chip. This command is deprecated except for debugging of loadtool
323 internals; the new flash geom command displays the same information in a much
324 more compact form.
311 325
312 === flash:status 326 === flash:status
313 This command is only applicable to Intel-style flash as found in Compal phones. 327 This command is only applicable to Intel-style flash chips. It reads the flash
314 It reads the flash chip's Status Register, which can be used to diagnose errors 328 chip's Status Register, which can be used to diagnose errors incurred by
315 incurred by previous erase or program operations. 329 previous erase or program operations.
316 330
317 === flash:unlock 331 === flash:unlock
318 flash unlock hex-start-offset hex-length 332 flash unlock hex-start-offset hex-length
319 333
320 This command is only applicable to Intel-style flash as found in Compal phones. 334 This command is only applicable to Intel-style flash chips. These flash chips
321 These flash chips power up with each sector (erase block) in the "locked" state; 335 power up with each sector (erase block) in the "locked" state; each sector
322 each sector needs to be unlocked before it can be erased or programmed. 336 needs to be unlocked before it can be erased or programmed.
323 337
324 This command is normally not needed, as the flash erase command unlocks each 338 This command is normally not needed, as the flash erase command unlocks each
325 sector before erasing it. However, if you are going to perform program 339 sector before erasing it. However, if you are going to perform program
326 operations in some sectors without erasing them, you will need to unlock them 340 operations in some sectors without erasing them, you will need to unlock them
327 explicitly first. 341 explicitly first.