-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from SymbiFlow/cmdline_tools_improve
Improvements to command line tools
- Loading branch information
Showing
8 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ ecppll | |
libtrellis.dylib | ||
*~ | ||
ecpmulti | ||
generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
#include "Chip.hpp" | ||
#include "Database.hpp" | ||
#include "Tile.hpp" | ||
#include "version.hpp" | ||
#include <iostream> | ||
#include <boost/program_options.hpp> | ||
#include <stdexcept> | ||
|
@@ -78,6 +79,7 @@ int main(int argc, char *argv[]) | |
if (vm.count("help")) { | ||
help: | ||
cerr << "Project Trellis - Open Source Tools for ECP5 FPGAs" << endl; | ||
cerr << "Version " << git_describe_str << endl; | ||
cerr << "ecpmulti: ECP5 multiboot bitstream assembler" << endl; | ||
cerr << endl; | ||
cerr << "Copyright (C) 2019 Jens Andersen <[email protected]>" << endl; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#include "Bitstream.hpp" | ||
#include "Chip.hpp" | ||
#include "Database.hpp" | ||
#include "version.hpp" | ||
#include <iostream> | ||
#include <boost/program_options.hpp> | ||
#include <stdexcept> | ||
|
@@ -49,18 +50,24 @@ int main(int argc, char *argv[]) | |
po::store(parsed, vm); | ||
po::notify(vm); | ||
} | ||
catch (po::required_option &e) { | ||
cerr << "Error: input file is mandatory." << endl << endl; | ||
goto help; | ||
} | ||
catch (std::exception &e) { | ||
cerr << e.what() << endl << endl; | ||
cerr << "Error: " << e.what() << endl << endl; | ||
goto help; | ||
} | ||
|
||
if (vm.count("help")) { | ||
help: | ||
cerr << "Project Trellis - Open Source Tools for ECP5 FPGAs" << endl; | ||
cerr << "Version " << git_describe_str << endl; | ||
cerr << "ecppack: ECP5 bitstream packer" << endl; | ||
cerr << endl; | ||
cerr << "Copyright (C) 2018 David Shah <[email protected]>" << endl; | ||
cerr << endl; | ||
cerr << "Usage: ecppack input.config [output.bit] [options]" << endl; | ||
cerr << options << endl; | ||
return vm.count("help") ? 0 : 1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
#include "Bitstream.hpp" | ||
#include "Chip.hpp" | ||
#include "Database.hpp" | ||
#include "version.hpp" | ||
#include <iostream> | ||
#include <boost/optional.hpp> | ||
#include <boost/program_options.hpp> | ||
|
@@ -36,18 +37,24 @@ int main(int argc, char *argv[]) | |
po::store(parsed, vm); | ||
po::notify(vm); | ||
} | ||
catch (po::required_option &e) { | ||
cerr << "Error: input file is mandatory." << endl << endl; | ||
goto help; | ||
} | ||
catch (std::exception &e) { | ||
cerr << e.what() << endl << endl; | ||
cerr << "Error: " << e.what() << endl << endl; | ||
goto help; | ||
} | ||
|
||
if (vm.count("help")) { | ||
help: | ||
cerr << "Project Trellis - Open Source Tools for ECP5 FPGAs" << endl; | ||
cerr << "Version " << git_describe_str << endl; | ||
cerr << "ecpunpack: ECP5 bitstream to text config converter" << endl; | ||
cerr << endl; | ||
cerr << "Copyright (C) 2018 David Shah <[email protected]>" << endl; | ||
cerr << endl; | ||
cerr << "Usage: ecpunpack input.bit [output.config] [options]" << endl; | ||
cerr << options << endl; | ||
return vm.count("help") ? 0 : 1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#include <string> | ||
std::string git_describe_str = "@CURRENT_GIT_VERSION@"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#ifndef VERSION_H | ||
#define VERSION_H | ||
#include <string> | ||
extern const std::string git_describe_str; | ||
#endif |