| 1 |
.\" Process this file with |
| 2 |
.\" groff -man -Tascii foo.1 |
| 3 |
.\" |
| 4 |
. |
| 5 |
.TH cc-tool 1 "March 01 2013" "cc-tool 0.26+" "USER COMMANDS" |
| 6 |
. |
| 7 |
.SH NAME |
| 8 |
cc-tool \- control Texas Instruments CC Debugger |
| 9 |
. |
| 10 |
.SH SYNOPSIS |
| 11 |
.B cc-tool |
| 12 |
[options] |
| 13 |
. |
| 14 |
.SH DESCRIPTION |
| 15 |
.B cc-tool |
| 16 |
provides support of Texas Instruments CC Debugger and several evaluation boards to program TI 8051-based System-On-Chip devices |
| 17 |
. |
| 18 |
.SH SUPPORTED DEVICES |
| 19 |
.B CC Debugger |
| 20 |
(VID: 0x0451 PID: 0x16a2) |
| 21 |
.br |
| 22 |
.B SmartRF04 Evaluation Board |
| 23 |
(VID: 0x11a0 PID: 0xdb20) |
| 24 |
.br |
| 25 |
.B SmartRF04 Evaluation Board (Chinese) |
| 26 |
(VID: 0x11a0 PID: 0xeb20) |
| 27 |
.br |
| 28 |
.B SmartRF05 Evaluation Board |
| 29 |
(VID: 0x0451 PID: 0x16a0) |
| 30 |
. |
| 31 |
.SH SUPPORTED TARGETS |
| 32 |
CC2540 CC2541 CC2543 CC2544 CC2545 CC2530 CC2531 CC2533 CC2430 CC2431 CC2510 CC2511 CC1110 CC1111 |
| 33 |
. |
| 34 |
.SH OPTIONS |
| 35 |
.TP |
| 36 |
.B \-h, \-\-help |
| 37 |
print help message |
| 38 |
. |
| 39 |
.TP |
| 40 |
.B \-d, \-\-device bus_number:device_number |
| 41 |
set programmer device usb address. |
| 42 |
The option should be used only if several CC Debugger devices connected to the system simultaneously. |
| 43 |
(you can use lsusb utility to enumerate devices connected to the system) |
| 44 |
. |
| 45 |
.TP |
| 46 |
.B \-f, \-\-fast |
| 47 |
set fast debug interface speed (by default: slow) |
| 48 |
. |
| 49 |
.TP |
| 50 |
.B \-i, \-\-read-info-page [file_name] |
| 51 |
read target info page (if target supports any). If no file-name specified data will be send to standard output. |
| 52 |
. |
| 53 |
.TP |
| 54 |
.B \-r, \-\-read file_name |
| 55 |
read flash memory and save to the specified file |
| 56 |
. |
| 57 |
.TP |
| 58 |
.B \-a, \-\-read-mac-address |
| 59 |
read target's mac address(es) (if target supports any). |
| 60 |
. |
| 61 |
.TP |
| 62 |
.B \-b, \-\-write-mac-address xx:xx:xx:xx:xx:xx[:xx:xx] |
| 63 |
write target's secondary mac address (if target supports any). |
| 64 |
mac address should be specified in hex notation, MSB first. The length of the address must be 6 or 8 bytes depending on target. |
| 65 |
. |
| 66 |
.TP |
| 67 |
.B \-p, \-\-preserve-mac-address |
| 68 |
before erasing target (secondary) mac address is read out and will be written back after flash programming. |
| 69 |
. |
| 70 |
.TP |
| 71 |
.B \-e, \-\-erase |
| 72 |
erase flash memory completely and reset lock bits |
| 73 |
. |
| 74 |
.TP |
| 75 |
.B \-w, \-\-write file_name[,offset] |
| 76 |
write specified file into flash memory. Optional offset value (in decimal) is an absolute target flash |
| 77 |
address and supported only for binary files. Option |
| 78 |
.I --write |
| 79 |
may be specified several times to build composite flash image from several hex and/or binary files, |
| 80 |
apply binary patches etc. Files will be merged in the order they appear in the command line. |
| 81 |
. |
| 82 |
.TP |
| 83 |
.B \-v, \-\-verify [method] |
| 84 |
verify flash after writing. Method can be |
| 85 |
.I crc |
| 86 |
(default) or |
| 87 |
.I read. |
| 88 |
Method |
| 89 |
.I read |
| 90 |
means that after writing all modified flash content is read back and compared to input flash image. |
| 91 |
Method |
| 92 |
.I crc |
| 93 |
means that after writing is completed target is configured to calculate |
| 94 |
CRC-16 over own flash and send results back so it ca be compared to crc of the input flash image. |
| 95 |
Method crc is much faster against read out all flash data. |
| 96 |
. |
| 97 |
.TP |
| 98 |
.B \-t, \-\-test |
| 99 |
search for programmer and target and print various information of them. |
| 100 |
. |
| 101 |
.TP |
| 102 |
.B \-l, \-\-lock lock_data |
| 103 |
specify lock data as hex string or list of lock qualifiers. |
| 104 |
Hex data must be exactly 1 byte (2 hex digits) or 16 bytes (32 hex digits), LSB first, depending on target. |
| 105 |
Lock qualifiers correspond to lock bit of target (see target datasheet). Not all targets support all qualifiers. |
| 106 |
Qualifiers are: |
| 107 |
.RS 10 |
| 108 |
.I debug |
| 109 |
- debug lock bit |
| 110 |
.RE |
| 111 |
.RS 10 |
| 112 |
.I boot |
| 113 |
- boot lock bit |
| 114 |
(for targets CC111x, CC243x, CC251x) |
| 115 |
.RE |
| 116 |
.RS 10 |
| 117 |
.I pages[:n[,k[,x-y]]] |
| 118 |
- specify what pages to lock (starting with 0), if target support per-page lock. |
| 119 |
(for targets CC253x, CC254x) |
| 120 |
.RE |
| 121 |
.RS 10 |
| 122 |
.I flash[:a] |
| 123 |
- specify the size in KB of the upper flash area to lock if target support per-flash-area-size lock |
| 124 |
(for targets CC111x, CC243x, CC251x) |
| 125 |
.RE |
| 126 |
Qualifier list is delimited by semicolon (See example section). |
| 127 |
.TP |
| 128 |
.B \-\-log [log_file] |
| 129 |
create log file with all operations performed. Useful for debugging cc-tool itself. |
| 130 |
Warning: if write operations is performed log file will also contain the written image! |
| 131 |
. |
| 132 |
.TP |
| 133 |
.B \-\-reset |
| 134 |
perform target reset. There's no need to use this option along with others because reset is performed anyway when needed |
| 135 |
. |
| 136 |
.TP |
| 137 |
.B \-n, \-\-name target_name |
| 138 |
specify target name e.g. CC2530 etc. If specified target does not match |
| 139 |
detected one no further actions are performed. This option is not required. |
| 140 |
. |
| 141 |
.TP |
| 142 |
.B \-s, \-\-flash-size specify target flash size |
| 143 |
specify target flash size in kilobytes. This option is required for any actions with MAC address when target is CC2430 |
| 144 |
. |
| 145 |
.SH SUPPORTED FILE FORMATS |
| 146 |
Supported image file formats are Intel hex or binary. Format will be determined automatically by file extension (hex or bin) |
| 147 |
or my be specified explicitly by adding |
| 148 |
.I ,bin |
| 149 |
or |
| 150 |
.I ,hex |
| 151 |
after file name. See EXAMPLES section. |
| 152 |
. |
| 153 |
.SH EXAMPLES |
| 154 |
.TP |
| 155 |
Read entire flash into binary file image.xxx |
| 156 |
.B cc-tool |
| 157 |
-r image.xxx,bin |
| 158 |
.TP |
| 159 |
Erase flash, write intel hex file image.hex and verify flash using default method |
| 160 |
.B cc-tool |
| 161 |
-v -e -w image.hex |
| 162 |
.TP |
| 163 |
Merge file image.hex and patch.bin (at offset 80), write resulting image, verify flash using read method |
| 164 |
.B cc-tool |
| 165 |
-v read -w image.hex --write patch.bin,80 |
| 166 |
.TP |
| 167 |
Set debug lock bit |
| 168 |
.B cc-tool |
| 169 |
--lock debug |
| 170 |
.TP |
| 171 |
Set debug lock bit and lock pages 0,1,2,3,4 |
| 172 |
.B cc-tool |
| 173 |
--lock debug;pages:0-4 |
| 174 |
.TP |
| 175 |
Set debug lock bit, boot lock bit, and set lock size 8K |
| 176 |
.B cc-tool |
| 177 |
--lock debug;boot;flash:8 |
| 178 |
. |
| 179 |
.SH EXIT STATUS |
| 180 |
.B cc-tool |
| 181 |
returns a zero exist status if all action were performed successfully. |
| 182 |
Non zero is returned in case of failure. |
| 183 |
. |
| 184 |
.SH AUTHOR |
| 185 |
George Stark (george-u (at) yandex.com) |
| 186 |
. |