summaryrefslogtreecommitdiffstats
path: root/tools/cpu/nios2/nios2gen.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/cpu/nios2/nios2gen.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/tools/cpu/nios2/nios2gen.c b/tools/cpu/nios2/nios2gen.c
index ad9631f5a8..fb271735ca 100644
--- a/tools/cpu/nios2/nios2gen.c
+++ b/tools/cpu/nios2/nios2gen.c
@@ -66,9 +66,25 @@ void read_include_file(struct ptf_item *pi, void *arg)
void usage()
{
- fprintf(stderr,
-"Please specify the name of a nios2gen PTF file that describes where to\n"
-"find the system description PTF from SOPC Builder on the command line.\n");
+printf(
+ "Usage: nios2gen [PTFFILE]\n"
+ "Generate BSP data based upon PTF file from SOPC Builder.\n"
+ "\n"
+ "Please specify the name of a nios2gen PTF file that describes where to\n"
+ "find the system description PTF from SOPC Builder on the command line.\n"
+);
+}
+
+void version()
+{
+printf(
+ "RTEMS/NIOS nios2gen\n"
+ " Copyright (c) 2006 Kolja Waschk rtemsdev/ixo.de\n"
+ "\n"
+ " The license and distribution terms for this file may be\n"
+ " found in the file LICENSE in this distribution or at\n"
+ " http://www.rtems.com/license/LICENSE.\n"
+);
}
/********************************************************/
@@ -87,6 +103,16 @@ int main(int argc, char *argv[])
return -1;
};
+ if ( !strcmp(argv[1], "--help") || !strcmp(argv[1],"-?") ) {
+ usage();
+ return 0;
+ };
+
+ if ( !strcmp(argv[1], "--version") ) {
+ version();
+ return 0;
+ };
+
cfg = ptf_parse_file(argv[1]);
if(cfg == NULL)
{