comparison lwlink/main.c @ 344:55c1f9a321e9

Add S-record output support to lwlink Thanks to a patch from Joachim Ga?ler <achim@diegasslers.de>, lwlink now has output support for S-records. This is output only - it does not add input support for S-record files.
author William Astle <lost@l-w.ca>
date Thu, 09 Apr 2015 12:27:33 -0600
parents ce1fdc8d6568
children 4130ffdeb5c8
comparison
equal deleted inserted replaced
343:98f3e016cfd8 344:55c1f9a321e9
79 outformat = OUTPUT_RAW; 79 outformat = OUTPUT_RAW;
80 else if (!strcasecmp(arg, "lwex0") || !strcasecmp(arg, "lwex")) 80 else if (!strcasecmp(arg, "lwex0") || !strcasecmp(arg, "lwex"))
81 outformat = OUTPUT_LWEX0; 81 outformat = OUTPUT_LWEX0;
82 else if (!strcasecmp(arg, "os9")) 82 else if (!strcasecmp(arg, "os9"))
83 outformat = OUTPUT_OS9; 83 outformat = OUTPUT_OS9;
84 else if (!strcasecmp(arg, "srec"))
85 outformat = OUTPUT_SREC;
84 else 86 else
85 { 87 {
86 fprintf(stderr, "Invalid output format: %s\n", arg); 88 fprintf(stderr, "Invalid output format: %s\n", arg);
87 exit(1); 89 exit(1);
88 } 90 }
128 { "output", 'o', "FILE", 0, 130 { "output", 'o', "FILE", 0,
129 "Output to FILE"}, 131 "Output to FILE"},
130 { "debug", 'd', 0, 0, 132 { "debug", 'd', 0, 0,
131 "Set debug mode"}, 133 "Set debug mode"},
132 { "format", 'f', "TYPE", 0, 134 { "format", 'f', "TYPE", 0,
133 "Select output format: decb, raw, lwex, os9"}, 135 "Select output format: decb, raw, lwex, os9, srec"},
134 { "decb", 'b', 0, 0, 136 { "decb", 'b', 0, 0,
135 "Generate DECB .bin format output, equivalent of --format=decb"}, 137 "Generate DECB .bin format output, equivalent of --format=decb"},
136 { "raw", 'r', 0, 0, 138 { "raw", 'r', 0, 0,
137 "Generate raw binary format output, equivalent of --format=raw"}, 139 "Generate raw binary format output, equivalent of --format=raw"},
138 { "script", 's', "FILE", 0, 140 { "script", 's', "FILE", 0,