]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
do not protect mdc sector at end of programming
authorhadaq <hadaq>
Wed, 2 Sep 2009 16:03:33 +0000 (16:03 +0000)
committerhadaq <hadaq>
Wed, 2 Sep 2009 16:03:33 +0000 (16:03 +0000)
trbrich/trbflash.c

index ab7d75ec8eeb50c7f70bc37fb259057ccc309ff0..efb1f2a5d92ac1cf70d29052c4642791e0045bb7 100644 (file)
@@ -61,6 +61,8 @@ static const char FlashTypeStr[][16] = {"INVALID", "ADCM1", "ADCM2", "MDC"};
 
 static FlashType flashType = FLASH_INVALID; 
 
+#define VERSION_NUMBER "2.00 20090902"
+
 /* ------ Local Functions ----------------------------------------------- */
 
 static void atexit0()
@@ -837,6 +839,7 @@ void usage(const char *progName)
          progName);
   printf("Options:\n");
   printf("  -h    give this help\n");
+  printf("  -V    Version number\n");
   printf("\nCommands:\n");
   printf("   program <trbaddress> <bit-file>  -> "
          "program bit-file to flash-memory\n");
@@ -858,7 +861,7 @@ int main(int argc, char ** argv)
   logFile = stderr;
 
   /* Parse Arguments */
-  while ((i = getopt(argc, argv, "+hd:")) != -1) {
+  while ((i = getopt(argc, argv, "+hd:V")) != -1) {
     switch (i) {
     case '?':
       usage(basename(argv[0]));
@@ -869,6 +872,10 @@ int main(int argc, char ** argv)
     case 'd':
       trb_debug = strtoul(optarg, NULL, 0);
       break;
+    case 'V':
+      printf("trbflash %s\n", VERSION_NUMBER);
+      exit(EXIT_SUCCESS);
+      break;
     default:
       usage(basename(argv[0]));
       exit(EXIT_FAILURE);