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" ''