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