aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2022-03-16 14:41:18 +0000
committerGitHub <noreply@github.com>2022-03-16 14:41:18 +0000
commitc278a29a383a0f1c754676e80848678474c62105 (patch)
tree410b2e22c50b4aaa76343a14062c6bed3cdd3e6b
parentc9fd41c529caafde70beda4db3dc53684eedbccc (diff)
parentc898587b87c5501fb0278990fb2bd5b2bb339fb1 (diff)
downloadnextpnr-c278a29a383a0f1c754676e80848678474c62105.tar.gz
nextpnr-c278a29a383a0f1c754676e80848678474c62105.tar.bz2
nextpnr-c278a29a383a0f1c754676e80848678474c62105.zip
Merge pull request #950 from yrabbit/start
gowin: don't crash if no arguments are set
-rw-r--r--gowin/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gowin/main.cc b/gowin/main.cc
index 19c1d02c..a45a49d4 100644
--- a/gowin/main.cc
+++ b/gowin/main.cc
@@ -56,6 +56,10 @@ po::options_description GowinCommandHandler::getArchOptions()
std::unique_ptr<Context> GowinCommandHandler::createContext(dict<std::string, Property> &values)
{
+ if (!vm.count("device")) {
+ log_error("The device must be specified\n");
+ }
+
std::regex devicere = std::regex("GW1N([SZ]?)[A-Z]*-(LV|UV|UX)([0-9])(C?).*");
std::smatch match;
std::string device = vm["device"].as<std::string>();