]>
git.zerfleddert.de Git - proxmark3-svn/blob - client/flasher.c
d6a51f3e9bcc694790163b2f58ce5a6c4ea7cc1f
6 unsigned int current_command
= CMD_UNKNOWN
;
8 extern struct partition partitions
[];
10 static void usage(char **argv
)
12 fprintf(stderr
, "Usage: %s areas image [image [image]]\n", argv
[0]);
13 fprintf(stderr
, " areas is a comma-separated list of areas to flash, with no spaces\n");
14 fprintf(stderr
, " Known areas are:");
16 for (int i
= 0; partitions
[i
].name
!= NULL
; ++i
) {
17 fprintf(stderr
, " %s", partitions
[i
].name
);
20 fprintf(stderr
, "\n");
21 fprintf(stderr
, " image is the path to the corresponding image\n\n");
22 fprintf(stderr
, "Example: %s os,fpga path/to/osimage.elf path/to/fpgaimage.elf\n", argv
[0]);
25 int main(int argc
, char **argv
)
32 /* Count area arguments */
33 int areas
= 0, offset
=-1, length
=0;
34 while (find_next_area(argv
[1], &offset
, &length
)) areas
++;
36 if (areas
!= argc
- 2) {
43 fprintf(stderr
,"Waiting for Proxmark to appear on USB... ");
44 while (!OpenProxmark(0)) { sleep(1); }
45 fprintf(stderr
,"Found.\n");
49 UsbCommand c
= {CMD_HARDWARE_RESET
};
54 fprintf(stderr
,"Have a nice day!\n");