From bc18d18a95d476b7d32bb5244a33fffaa637893f Mon Sep 17 00:00:00 2001 From: gatecat Date: Sat, 17 Dec 2022 10:37:15 +0000 Subject: ecp5: Only write bitstream if --textcfg passed Signed-off-by: gatecat --- ecp5/main.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ecp5/main.cc b/ecp5/main.cc index f143d583..6abea4a9 100644 --- a/ecp5/main.cc +++ b/ecp5/main.cc @@ -111,11 +111,10 @@ void ECP5CommandHandler::customBitstream(Context *ctx) log_error("bitstream generation is not available in out-of-context mode (use --write to create a post-PnR JSON " "design)\n"); - std::string textcfg; - if (vm.count("textcfg")) - textcfg = vm["textcfg"].as(); - - write_bitstream(ctx, basecfg, textcfg); + if (vm.count("textcfg")) { + std::string textcfg = vm["textcfg"].as(); + write_bitstream(ctx, basecfg, textcfg); + } } static std::string speedString(ArchArgs::SpeedGrade speed) -- cgit v1.2.3