2024-04-03 14:39:33 +00:00
|
|
|
#include "config.hpp"
|
|
|
|
|
|
|
|
void Config::cli_parse(int argc, char **argv) {
|
|
|
|
CLI::App app;
|
2024-08-01 10:53:17 +00:00
|
|
|
app.add_option("-l,--listen", gdbsocket,
|
|
|
|
"Listen to debugger at this address");
|
|
|
|
app.add_flag("-g", do_debug, "Listen for gdb");
|
2024-04-03 14:39:33 +00:00
|
|
|
app.add_option("-m,--memory", memory_file, "Content of memory")
|
|
|
|
->check(CLI::ExistingFile);
|
|
|
|
app.add_flag("!--no-bin", memory_file_binary,
|
|
|
|
"Memory file is in text format");
|
2024-04-12 01:35:41 +00:00
|
|
|
app.add_option("--wav", wavefile, "output .vcd file path");
|
2024-07-09 12:42:01 +00:00
|
|
|
app.add_flag("-i", interactive, "Launch sdb for interactive session");
|
2024-04-03 14:39:33 +00:00
|
|
|
|
|
|
|
try {
|
|
|
|
app.parse(argc, argv);
|
|
|
|
} catch (const CLI::ParseError &e) {
|
|
|
|
exit((app).exit(e));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Config config;
|