annotate loadtools/loadtool.help @ 777:0cffc53991f9

simagent: bugfix in hex string arg parsing function
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 12 Mar 2021 23:58:15 +0000
parents e78c7ab3b0e6
children 74024eb17e04
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 This is the help file for fc-loadtool. See lthelp.c for the code
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 that parses and displays it. The parsing code is the only
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 documentation for the format of this help file - if you are going to
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 edit this help text, read the parsing code first.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 === main
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 This utility allows you to perform the following operations
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 on your Calypso GSM device:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 * Peek and poke registers
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 * Dump any part of memory
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 * Read and program flash
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 See the following help topics for more information:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 help peekpoke Register peek and poke commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 help flash Flash operation commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 help all List of all implemented commands
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 help exit Controlling the cleanup on exit
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 === all
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 abbr Read an ABB register
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 abbw Write an ABB register
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 baud Switch the serial comm with loadagent to a different baud rate
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 crc32 Get CRC-32 of a memory area on the target
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 dieid Read the Calypso die ID
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 dump Dump a target memory region in hex and ASCII
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 dump2bin Dump a target memory region to a file in binary format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 dump2srec Dump a target memory region to a file in S-record format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 exec Execute a command script
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 exit Exit from loadtool and clean up the target device state
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 flash Flash operations
410
e3d976e1f814 loadtools/loadtool.help: update for FC devices having flash2
Mychaela Falconia <falcon@freecalypso.org>
parents: 228
diff changeset
33 flash2 Operations on the 2nd flash bank (FC and Pirelli devices only)
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 quit Alias for exit
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 r8 Read an 8-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 r16 Read a 16-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 r32 Read a 32-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 w8 Write an 8-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 w16 Write a 16-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 w32 Write a 32-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 To get help on any command, type help and the command keyword.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 === abbr
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 === abbw
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 abbr pg reg Read ABB register <reg> on page <pg>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 abbw pg reg val Write <val> into register <reg> on page <pg>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 The <pg> and <reg> arguments default to decimal unless prefixed with 0x;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 the <val> argument to abbw is always hexadecimal.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 === baud
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 baud Display the current baud rate
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 baud <rate> Switch the baud rate to <rate> (number in bps)
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 The supported baud rates are:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 Standard: 19200, 38400, 57600, 115200
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 Calypso special: 203125, 406250, 812500
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 The baud command coordinates the necessary simultaneous switching of the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 baud rate on both the host and the target (loadagent). Loadagent always
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 supports all of the listed rates and will switch happily, but in the case
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 of the higher non-standard baud rates fc-loadtool has no way of knowing
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 ahead of time whether or not the requested baud rate is supported by your
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 usb2serial adapter or whatever other serial port hardware and driver
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 you are using. If the baud rate switch fails, the communication link with
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 the target will be broken and fc-loadtool will exit ungracefully.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 === crc32
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 crc32 hex-start hex-len
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 The first argument is the starting target memory address in hex; the second
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 argument is the length of the area to CRC, also in hex. The command will be
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 sent to loadagent; CRC-32 of the requested range will be computed on the target
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 and displayed in hex.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 === dieid
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 dieid Display the Calypso die ID
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 dieid <filename> Display the Calypso die ID, and also save it in the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 named file
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 The Calypso die ID resides in 4 16-bit registers at target addresses
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 0xFFFEF010 through 0xFFFEF016. It is displayed on the terminal and optionally
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 saved to a file in this simple form:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 FFFEF010: xxxx
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 FFFEF012: xxxx
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 FFFEF014: xxxx
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 FFFEF016: xxxx
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 === dump
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 dump hex-start hex-len
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 The first argument is the starting target memory address in hex; the second
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 argument is the length of the area to dump, also in hex. The dump will be
621
f44770a652eb loadtool.help: additional details documented for dump commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 576
diff changeset
97 displayed on the terminal in hex and ASCII. As an implementation limit, both
f44770a652eb loadtool.help: additional details documented for dump commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 576
diff changeset
98 the starting target memory address and the length of the area to dump need to
f44770a652eb loadtool.help: additional details documented for dump commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 576
diff changeset
99 be aligned to 16 bytes.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 === dump2bin
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 === dump2srec
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 dump2bin hex-start hex-len outfile
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 dump2srec hex-start hex-len outfile
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 The first argument is the starting target memory address in hex; the second
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 argument is the length of the area to dump, also in hex; the third argument
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 is the name of the output file to be created/written. The dump will be saved
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 in binary or S-records as per the chosen command, always in the native byte
643
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
110 order of the Calypso ARM7 target (little-endian).
621
f44770a652eb loadtool.help: additional details documented for dump commands
Mychaela Falconia <falcon@freecalypso.org>
parents: 576
diff changeset
111
643
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
112 The 128 byte alignment requirement of previous versions has been lifted; you
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
113 can now dump as little as one byte without any alignment restrictions. In the
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
114 case of dump2srec the output file will be written with 32 bytes of payload per
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
115 S3 record, with the last record carrying from 1 to 32 bytes of payload as
cd031e2501fa loadtool.help: dump2bin and dump2srec improvements
Mychaela Falconia <falcon@freecalypso.org>
parents: 632
diff changeset
116 needed.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 === exec
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 exec <script-file>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
228
ccf5edab9d5f loadtool.help: exec command description updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 54
diff changeset
121 Read and execute commands from the named file. If the execution of a script
ccf5edab9d5f loadtool.help: exec command description updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 54
diff changeset
122 command encounters an error, the following commands are not executed, i.e.,
ccf5edab9d5f loadtool.help: exec command description updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 54
diff changeset
123 stop on first error.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 === exit
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 === quit
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 exit Clean up the target in the default manner and exit
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 exit bare Exit loadtool without doing anything to the target
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 exit iota-off Exit loadtool and command an ABB power-off on the target
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 exit jump0 Exit loadtool and command the target to reboot via jump to 0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 The default method of cleaning up the target device state upon exit is set
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 in the hardware parameters file selected with the -h or -H command line
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
134 option; it is the exit-mode setting. On most targets the default exit mode is
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
135 iota-off.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 If you do an exit bare without powering the target device off in some other
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 way, the device will still be running loadagent, which is probably not what you
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 want. However, it is the proper exit mode if you have powered off or reset the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 target device by brute force (yanking the battery).
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 === flash
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 === flash2
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 The primary end use of fc-loadtool is for reading and writing the NOR flash
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
145 memories of the supported GSM devices. Most Calypso phones and modems have
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
146 only one flash bank (as in chip select), and are manipulated with the flash
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
147 command. FreeCalypso development boards and the Pirelli DP-L10 phone have two
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
148 flash banks (as in chip selects) of 8 MiB each; they are manipulated with the
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
149 flash and flash2 commands.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
151 The following flash operations are available:
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 flash blankchk Blank-check a region of flash
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 flash dump2bin Dump flash content to a file in binary format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 flash dump2srec Dump flash content to a file in S-record format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 flash erase Erase a region of flash
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
157 flash geom Display geometry details of detected flash chip
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
158 flash id Perform flash chip autodetection sequence
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 flash info Display flash configuration info
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 flash program-bin Program flash with a binary file
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 flash program-m0 Program flash with an image in TI's *.m0 format
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 flash program-srec Program flash with an image in standard S-record format
675
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
163 flash e-program-bin Combined erase and program-bin
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
164 flash e-program-m0 Combined erase and program-m0
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
165 flash e-program-srec Combined erase and program-srec
714
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
166 flash prot-reg Read Intel flash OTP protection register
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 flash quickprog Program a few flash words from the command line
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 flash reset Reset flash chip to read array mode
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 flash sectors Display the list of flash sector addresses and sizes
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
170 flash status Intel-style flash only: read Status Register
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
171 flash unlock Intel-style flash only: unlock flash sectors
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
172
714
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
173 Additional operations for Compal targets only:
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
174
714
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
175 flash compal-imei Read IMEI from OTP protection register
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
176 flash erase-program-boot Erase and reprogram the boot sector
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 Substitute flash2 instead of flash when operating on the 2nd flash chip select
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 of Pirelli-style flash memory configurations. Prepend help before a command to
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
180 get usage information, e.g., help flash program-bin.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 === flash:blankchk
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 flash[2] blankchk hex-start-offset hex-length
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 Blank-checks an area of flash starting at the specified hex offset (from the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 base address of the flash bank) and extending for the specified hex length.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 Reports whether the checked region is blank or not. Flash must be blank (FF in
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 all bytes) before it can be programmed.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189
714
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
190 === flash:compal-imei
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
191 flash compal-imei Display the Compal phone's IMEI
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
192 flash compal-imei <filename> Display the Compal phone's IMEI, and also
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
193 save it in the named file
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
194
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
195 Compal phones have their factory IMEI stored in the flash chip's OTP protection
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
196 register. This command reads the Intel flash protection register, checks its
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
197 content for an IMEI formatted in Compal's particular way, and if a valid-looking
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
198 IMEI is found, it is displayed on the terminal. The extracted IMEI can also be
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
199 saved into a text file.
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
200
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 === flash:dump2bin
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 flash[2] dump2bin outfile [offset [length]]
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 Read device flash content and save it to a file. If only a filename is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 specified, the full flash bank is dumped; one can optionally specify a starting
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 offset and an explicit length, both in hex.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
208 This command was originally nothing more than a user-friendly front-end to the
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
209 plain dump2bin command (see help dump2bin), but in the current version it first
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
210 performs the flash chip autodetection operation if it hasn't been done already
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
211 (needed in order to determine the size of the flash bank) and resets the flash
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
212 to read array mode.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 === flash:dump2srec
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 flash[2] dump2srec outfile [offset [length]]
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 Read device flash content and save it to a file. If only a filename is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 specified, the full flash bank is dumped; one can optionally specify a starting
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 offset and an explicit length, both in hex.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
221 This command was originally nothing more than a user-friendly front-end to the
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
222 plain dump2srec command (see help dump2srec), but in the current version it
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
223 first performs the flash chip autodetection operation if it hasn't been done
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
224 already (needed in order to determine the size of the flash bank) and resets
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
225 the flash to read array mode.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 === flash:erase
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 flash[2] erase hex-start-offset hex-length
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 Erases an area of flash starting at the specified hex offset (from the base
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 address of the flash bank) and extending for the specified hex length.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 Flash memory can only be erased (turning 0 bits back to 1s) in units of
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
234 sectors, as set in stone by the design of the flash chip in use. Loadtool will
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
235 autodetect the flash chip in use and will only operate on those flash chip types
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
236 which it knows about; if a known chip is found, loadtool knows its sector layout
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
237 and enforces that both arguments to the flash[2] erase command lie on sector
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
238 boundaries.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 === flash:erase-program-boot
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 flash erase-program-boot binfile [length]
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 This operation is applicable to Compal targets only. This command erases and
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 reprograms flash sector 0 (the boot sector) with minimized vulnerability to
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 bricking by loading the new boot code into a scratchpad RAM area on the target,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 then commanding loadagent (running on the target) to erase and reprogram the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 dangerous flash sector without requiring further interaction with loadtool.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 (In contrast, loadtool's "regular" flash erase and program operations are
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 driven primarily by loadtool, with loadagent providing only low-level
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 functions.)
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 The new bits to be programmed are taken from the specified binary file. Byte 0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 of the file goes into byte 0 of the flash and so on, for the specified length.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 If no length argument is given, it defaults to the length of the file, which
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 must not exceed the length of flash sector 0: 64 KiB on the "basic" Compal
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 phones or 8 KiB on C155/156.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
258 === flash:geom
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
259 This command displays information about the detected flash chip: device name,
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
260 geometry details and the command set style (AMD or Intel). The displayed
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
261 geometry details include the total size of the flash bank, the total number of
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
262 sectors, the number of regions with different sector sizes and the sector size
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
263 and the number of sectors in each region.
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
264
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
265 === flash:id
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
266 This command explicitly invokes the same flash chip autodetection operation
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
267 that is performed the first time each flash bank is accessed with any flash or
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
268 flash2 command.
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
269
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 === flash:info
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
271 This command displays the global flash configuration settings that have been
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
272 selected at fc-loadtool invokation time (hardware parameters associated with
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
273 the target set via -h or -H): the global single-4M, single-8M or dual-8M
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
274 setting and flash bank base addresses.
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
275
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
276 In previous versions this command performed flash ID checks and displayed
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
277 geometry information; these functions have been moved to the new flash id and
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
278 flash geom commands.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 === flash:program-bin
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 flash[2] program-bin flash-offset binfile [file-offset [length]]
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 This command programs flash, using a binary file as the data source. One must
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 always specify the starting flash offset (from the base address of the flash
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 bank), but the starting file offset and length are optional, defaulting to the
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 whole file.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 The binary file must be in the native byte order of the Calypso ARM7 processor,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 which is little-endian. Images produced by flash[2] dump2bin are suitable.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 === flash:program-m0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 flash[2] program-m0 image.m0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293
632
ae4330d86029 loadtool.help: description of program-m0 updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 621
diff changeset
294 Calypso firmware images built with TI's TMS470 toolchain in TI's canonical
ae4330d86029 loadtool.help: description of program-m0 updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 621
diff changeset
295 manner come out in a hex format that is a variant of Motorola's SREC, in files
ae4330d86029 loadtool.help: description of program-m0 updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 621
diff changeset
296 ending with the .m0 suffix. We have nicknamed this format "moko-style m0"
ae4330d86029 loadtool.help: description of program-m0 updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 621
diff changeset
297 after its most famous user; this command programs the flash with an image in
ae4330d86029 loadtool.help: description of program-m0 updated
Mychaela Falconia <falcon@freecalypso.org>
parents: 621
diff changeset
298 this moko-style m0 format.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 Because each S-record contains an address, no addresses or offsets need to be
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 specified in the flash[2] program-m0 command, only the image file.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
675
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
303 This command does NOT include a built-in flash erase step - see
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
304 help flash e-program-m0 for the more complete version.
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
305
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 === flash:program-srec
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 flash[2] program-srec image.srec
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 This command programs the flash with an image in the standard S-record format,
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 in the native little-endian byte order of the Calypso ARM7 processor. It is
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 the opposite byte order from that used by TI's *.m0 files -
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 see help flash program-m0. Images produced by flash[2] dump2srec are suitable
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 for flash[2] program-srec.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 Because each S-record contains an address, no addresses or offsets need to be
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 specified in the flash[2] program-srec command, only the image file.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317
675
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
318 === flash:e-program-bin
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
319 flash[2] e-program-bin flash-offset binfile [file-offset [length]]
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
320
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
321 This command is an extension of flash[2] program-bin: it first erases the range
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
322 of sectors that contains the range of flash words to be programmed, then
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
323 executes the program-bin operation. All arguments are exactly the same as for
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
324 flash[2] program-bin - see help flash program-bin. The range of sectors that
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
325 will be erased will be the minimal set that contains the area of flash to be
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
326 programmed. This command is intended for automated (no thinking required)
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
327 flashing of firmware release images that are delivered in binary format; only
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
328 flash-offset and binfile arguments will be given in this case.
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
329
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
330 === flash:e-program-m0
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
331 flash[2] e-program-m0 image.m0
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
332
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
333 This command reads in the specified S-record image in moko-style m0 format,
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
334 builds a map of potentially discontiguous flash regions into which the image
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
335 deposits bits, erases the set of flash sectors which need to be erased before
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
336 programming these regions, then programs the new image bits into flash. This
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
337 command is intended for automated (no thinking required) flashing of firmware
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
338 release images that are delivered in moko-style m0 format.
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
339
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
340 === flash:e-program-srec
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
341 flash[2] e-program-srec image.srec
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
342
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
343 This command works like flash[2] e-program-m0, but takes in an S-record image
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
344 in little-endian byte order, which is the opposite byte order from that used by
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
345 TI's *.m0 files. This command is provided only for the sake of symmetry - no
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
346 practical use case is envisioned.
8b1e86dcc3ac loadtool.help: new flash e-program-* commands documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 643
diff changeset
347
714
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
348 === flash:prot-reg
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
349 This command is only applicable to Intel-style flash chips. These flash chips
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
350 have an OTP (one time programmable, then physically immutable afterward) area
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
351 called "protection register"; this command reads the flash chip's protection
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
352 register and displays its content as in lock word, factory words and user words.
e78c7ab3b0e6 loadtool.help: flash prot-reg and flash compal-imei additions documented
Mychaela Falconia <falcon@freecalypso.org>
parents: 675
diff changeset
353
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 === flash:quickprog
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 flash[2] quickprog hex-offset hex-data-string
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 This command is intended only for developers; it provides raw access to
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 loadagent's basic flash write primitive. Read the source code for more
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 information.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 === flash:reset
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
362 Intel-style flash memory chips have two "stable" or "quiescent" states: reading
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
363 array data and reading the status register (SR). After an erase or program
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
364 operation the flash chip is "parked" in the Read SR state; the flash reset
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
365 command switches it back to reading array data.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
367 This command works for AMD-style flash as well, but it is normally not needed,
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
368 as AMD-style flash chips automatically return to the read-array-data state
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
369 after every erase or program operation.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 === flash:sectors
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
372 This command displays the list of sector offsets and sizes for the detected
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
373 flash chip. This command is deprecated except for debugging of loadtool
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
374 internals; the new flash geom command displays the same information in a much
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
375 more compact form.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 === flash:status
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
378 This command is only applicable to Intel-style flash chips. It reads the flash
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
379 chip's Status Register, which can be used to diagnose errors incurred by
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
380 previous erase or program operations.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 === flash:unlock
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 flash unlock hex-start-offset hex-length
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384
518
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
385 This command is only applicable to Intel-style flash chips. These flash chips
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
386 power up with each sector (erase block) in the "locked" state; each sector
372757bb62e4 loadtools/loadtool.help updated for new flash handling architecture
Mychaela Falconia <falcon@freecalypso.org>
parents: 410
diff changeset
387 needs to be unlocked before it can be erased or programmed.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 This command is normally not needed, as the flash erase command unlocks each
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 sector before erasing it. However, if you are going to perform program
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 operations in some sectors without erasing them, you will need to unlock them
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 explicitly first.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 This command operates only on sector boundaries just like flash erase.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 === r8
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 === r16
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 === r32
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 === w8
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 === w16
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 === w32
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 === peekpoke
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 The register peek and poke commands are:
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 r8 addr Read an 8-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 r16 addr Read a 16-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 r32 addr Read a 32-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 w8 addr data Write an 8-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 w16 addr data Write a 16-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 w32 addr data Write a 32-bit register or memory location
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 All addresses and data values are in hex.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413