comparison loadtools/loadtool.help @ 421:4f8a9b2229e9

loadtool.help: updates for Compal target support
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 19 Jun 2014 00:23:28 +0000
parents 02cb0206aa47
children
comparison
equal deleted inserted replaced
420:57c681499f48 421:4f8a9b2229e9
17 help flash Flash operation commands 17 help flash Flash operation commands
18 help all List of all implemented commands 18 help all List of all implemented commands
19 help exit Controlling the cleanup on exit 19 help exit Controlling the cleanup on exit
20 20
21 === all 21 === all
22 abbr Read an ABB register
23 abbw Write an ABB register
22 baud Switch the serial comm with loadagent to a different baud rate 24 baud Switch the serial comm with loadagent to a different baud rate
23 crc32 Get CRC-32 of a memory area on the target 25 crc32 Get CRC-32 of a memory area on the target
24 dieid Read the Calypso die ID 26 dieid Read the Calypso die ID
25 dump Dump a target memory region in hex and ASCII 27 dump Dump a target memory region in hex and ASCII
26 dump2bin Dump a target memory region to a file in binary format 28 dump2bin Dump a target memory region to a file in binary format
37 w16 Write a 16-bit register or memory location 39 w16 Write a 16-bit register or memory location
38 w32 Write a 32-bit register or memory location 40 w32 Write a 32-bit register or memory location
39 41
40 To get help on any command, type help and the command keyword. 42 To get help on any command, type help and the command keyword.
41 43
44 === abbr
45 === abbw
46 abbr pg reg Read ABB register <reg> on page <pg>
47 abbw pg reg val Write <val> into register <reg> on page <pg>
48
49 The <pg> and <reg> arguments default to decimal unless prefixed with 0x;
50 the <val> argument to abbw is always hexadecimal.
51
42 === baud 52 === baud
43 baud Display the current baud rate 53 baud Display the current baud rate
44 baud <rate> Switch the baud rate to <rate> (number in bps) 54 baud <rate> Switch the baud rate to <rate> (number in bps)
45 55
46 The supported baud rates are: 56 The supported baud rates are:
107 117
108 === exit 118 === exit
109 === quit 119 === quit
110 exit Clean up the target in the default manner and exit 120 exit Clean up the target in the default manner and exit
111 exit bare Exit loadtool without doing anything to the target 121 exit bare Exit loadtool without doing anything to the target
122 exit iota-off Exit loadtool and command an ABB power-off on the target
112 exit jump0 Exit loadtool and command the target to reboot via jump to 0 123 exit jump0 Exit loadtool and command the target to reboot via jump to 0
113 124
114 The default method of cleaning up the target device state upon exit is set 125 The default method of cleaning up the target device state upon exit is set
115 in the hardware parameters file selected with the -h or -H command line 126 in the hardware parameters file selected with the -h or -H command line
116 option; it is the exit-mode setting. On the Pirelli phone the default exit 127 option; it is the exit-mode setting. On the Pirelli phone the default exit
117 mode is jump0: it causes the phone to reboot and enter the "charging boot" 128 mode is jump0: it causes the phone to reboot and enter the "charging boot"
118 mode, as the USB cable is connected and VBUS is present. 129 mode, as the USB cable is connected and VBUS is present. On Compal phones the
130 default exit mode is iota-off.
119 131
120 If your device is a GTA02 and you are running fc-loadtool from inside the phone 132 If your device is a GTA02 and you are running fc-loadtool from inside the phone
121 (from the AP), the exit command will power off the modem from the AP. If you 133 (from the AP), the exit command will power off the modem from the AP. If you
122 are talking to GTA02 Calypso from an external host via the headset jack, there 134 are talking to GTA02 Calypso from an external host via the headset jack, there
123 is nothing that fc-loadtool can currently do to power the modem off (exit is 135 is nothing that fc-loadtool can currently do to power the modem off (exit is
129 target device by brute force (yanking the battery). 141 target device by brute force (yanking the battery).
130 142
131 === flash 143 === flash
132 === flash2 144 === flash2
133 The primary end use of fc-loadtool is for reading and writing the NOR flash 145 The primary end use of fc-loadtool is for reading and writing the NOR flash
134 memories of the supported GSM devices. The GTA0x GSM modem has only one 4 MiB 146 memories of the supported GSM devices. Compal phones and the GTA0x GSM modem
135 flash bank (as in chip select), and is manipulated with the flash command. 147 have only one flash bank (as in chip select), and are manipulated with the
136 The Pirelli phone has two flash banks (as in chip selects) of 8 MiB each; they 148 flash command. The Pirelli phone has two flash banks (as in chip selects) of
137 are manipulated with the flash and flash2 commands. 149 8 MiB each; they are manipulated with the flash and flash2 commands.
138 150
139 The following flash operations are available: 151 The following flash operations are available on all target devices:
140 152
141 flash blankchk Blank-check a region of flash 153 flash blankchk Blank-check a region of flash
142 flash dump2bin Dump flash content to a file in binary format 154 flash dump2bin Dump flash content to a file in binary format
143 flash dump2srec Dump flash content to a file in S-record format 155 flash dump2srec Dump flash content to a file in S-record format
144 flash erase Erase a region of flash 156 flash erase Erase a region of flash
145 flash info Display flash configuration info 157 flash info Display flash configuration info
146 flash program-bin Program flash with a binary file 158 flash program-bin Program flash with a binary file
147 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
148 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
149 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
150 flash sectors Display the list of flash sector addresses and sizes 163 flash sectors Display the list of flash sector addresses and sizes
151 164
152 Substitute flash2 instead of flash when operating on the 2nd flash chip select 165 Substitute flash2 instead of flash when operating on the 2nd flash chip select
153 of Pirelli-style flash memory configurations. Prepend help before a command to 166 of Pirelli-style flash memory configurations. Prepend help before a command to
154 get usage information, e.g., help flash program-bin. 167 get usage information, e.g., help flash program-bin. See help compal for some
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
155 186
156 === flash:blankchk 187 === flash:blankchk
157 flash[2] blankchk hex-start-offset hex-length 188 flash[2] blankchk hex-start-offset hex-length
158 189
159 Blank-checks an area of flash starting at the specified hex offset (from the 190 Blank-checks an area of flash starting at the specified hex offset (from the
187 Erases an area of flash starting at the specified hex offset (from the base 218 Erases an area of flash starting at the specified hex offset (from the base
188 address of the flash bank) and extending for the specified hex length. 219 address of the flash bank) and extending for the specified hex length.
189 220
190 Flash memory can only be erased (turning 0 bits back to 1s) in units of 221 Flash memory can only be erased (turning 0 bits back to 1s) in units of
191 sectors, as set in stone by the design of the flash chip in use. Loadtool 222 sectors, as set in stone by the design of the flash chip in use. Loadtool
192 knows the sector layout of the flash chip in your device from the hardware 223 knows the sector layout of the flash chip in your device from CFI or from the
193 parameters file (you can display it with the flash[2] sectors command), and 224 hardware parameters file (you can display it with the flash[2] sectors
194 enforces that both arguments to the flash[2] erase command lie on sector 225 command), and enforces that both arguments to the flash[2] erase command lie
195 boundaries. 226 on sector boundaries.
227
228 === flash:erase-program-boot
229 flash erase-program-boot binfile [length]
230
231 This operation is applicable to Compal targets only. This command erases and
232 reprograms flash sector 0 (the boot sector) with minimized vulnerability to
233 bricking by loading the new boot code into a scratchpad RAM area on the target,
234 then commanding loadagent (running on the target) to erase and reprogram the
235 dangerous flash sector without requiring further interaction with loadtool.
236 (In contrast, loadtool's "regular" flash erase and program operations are
237 driven primarily by loadtool, with loadagent providing only low-level
238 functions.)
239
240 The new bits to be programmed are taken from the specified binary file. Byte 0
241 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
243 must not exceed the length of flash sector 0: 64 KiB on the "basic" Compal
244 phones or 8 KiB on C155/156.
196 245
197 === flash:info 246 === flash:info
198 This command displays summary information about the flash memory configuration 247 This command displays summary information about the flash memory configuration
199 of the Calypso target device loadtool thinks it's talking to. 248 of the Calypso target device loadtool thinks it's talking to.
200 249
230 === flash:program-srec 279 === flash:program-srec
231 flash[2] program-srec image.srec 280 flash[2] program-srec image.srec
232 281
233 This command programs the flash with an image in the standard S-record format, 282 This command programs the flash with an image in the standard S-record format,
234 in the native little-endian byte order of the Calypso ARM7 processor. It is 283 in the native little-endian byte order of the Calypso ARM7 processor. It is
235 the opposite byte order from that used by TI's and Closedmoko's *.m0 files - 284 the opposite byte order from that used by TI's *.m0 files -
236 see help flash program-m0. Images produced by flash[2] dump2srec are suitable 285 see help flash program-m0. Images produced by flash[2] dump2srec are suitable
237 for flash[2] program-srec. 286 for flash[2] program-srec.
238 287
239 Because each S-record contains an address, no addresses or offsets need to be 288 Because each S-record contains an address, no addresses or offsets need to be
240 specified in the flash[2] program-srec command, only the image file. 289 specified in the flash[2] program-srec command, only the image file.
244 293
245 This command is intended only for developers; it provides raw access to 294 This command is intended only for developers; it provides raw access to
246 loadagent's basic flash write primitive. Read the source code for more 295 loadagent's basic flash write primitive. Read the source code for more
247 information. 296 information.
248 297
298 === flash:reset
299 Intel-style flash memory chips (found in Compal phones) have two "stable" or
300 "quiescent" states: reading array data and reading the status register (SR).
301 After an erase or program operation the flash chip is "parked" in the Read SR
302 state; the flash reset command switches it back to reading array data.
303
304 This command works for AMD-style flash as well (found in Openmoko and Pirelli
305 phones), but it is normally not needed, as AMD-style flash chips automatically
306 return to the read-array-data state after every erase or program operation.
307
249 === flash:sectors 308 === flash:sectors
250 This command displays the list of sector offsets and sizes for the flash chip 309 This command displays the list of sector offsets and sizes for the flash chip
251 in the Calypso target device loadtool thinks it's talking to. 310 in the Calypso target device loadtool thinks it's talking to.
311
312 === flash:status
313 This command is only applicable to Intel-style flash as found in Compal phones.
314 It reads the flash chip's Status Register, which can be used to diagnose errors
315 incurred by previous erase or program operations.
316
317 === flash:unlock
318 flash unlock hex-start-offset hex-length
319
320 This command is only applicable to Intel-style flash as found in Compal phones.
321 These flash chips power up with each sector (erase block) in the "locked" state;
322 each sector needs to be unlocked before it can be erased or programmed.
323
324 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
326 operations in some sectors without erasing them, you will need to unlock them
327 explicitly first.
328
329 This command operates only on sector boundaries just like flash erase.
252 330
253 === r8 331 === r8
254 === r16 332 === r16
255 === r32 333 === r32
256 === w8 334 === w8