From 537a375f2ce6f432ede7614319792eadc8cdac51 Mon Sep 17 00:00:00 2001 From: occheung Date: Thu, 17 Sep 2020 13:19:23 +0800 Subject: [PATCH] nix: rewire configure-fpga command --- openocd/ethernet.cfg | 1 + openocd/fpga-config.cfg | 1 + shell.nix | 9 ++++----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/openocd/ethernet.cfg b/openocd/ethernet.cfg index 114240b..20828ae 100644 --- a/openocd/ethernet.cfg +++ b/openocd/ethernet.cfg @@ -2,4 +2,5 @@ init reset init halt flash write_image erase target/thumbv7em-none-eabihf/debug/examples/ethernet +reset run shutdown \ No newline at end of file diff --git a/openocd/fpga-config.cfg b/openocd/fpga-config.cfg index aece27b..67ed6d9 100644 --- a/openocd/fpga-config.cfg +++ b/openocd/fpga-config.cfg @@ -2,4 +2,5 @@ init reset init halt flash write_image erase target/thumbv7em-none-eabihf/debug/examples/fpga_config +reset run shutdown \ No newline at end of file diff --git a/shell.nix b/shell.nix index e2dd593..f71086c 100644 --- a/shell.nix +++ b/shell.nix @@ -40,14 +40,13 @@ let ''; flashFPGAConfig = writeShellScriptBin "flash-fpga-config" '' - set-gdb-config-file "fpga_config" && cargo run --example fpga_config + openocd-flash fpga-config ''; configureFPGA = writeShellScriptBin "configure-fpga" '' - nc -zv localhost 3333 \ - && compile-migen-script \ - && flash-fpga-config \ - || echo "Please run OpenOcd first." + compile-migen-script \ + && cargo build --example fpga_config \ + && flash-fpga-config ''; verifyFPGAConfig = writeShellScriptBin "verify-fpga-config" ''