static FlashType flashType = FLASH_INVALID;
+#define VERSION_NUMBER "2.00 20090902"
+
/* ------ Local Functions ----------------------------------------------- */
static void atexit0()
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");
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]));
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);