nix: rm verify, add mosquitto helper
This commit is contained in:
parent
c935236d68
commit
c0e0c381ec
14
shell.nix
14
shell.nix
|
@ -10,7 +10,7 @@ let
|
|||
|
||||
runOpenOcd = writeShellScriptBin "run-openocd" ''
|
||||
openocd \
|
||||
-f board/st_nucleo_h743zi.cfg \
|
||||
-f openocd/openocd.cfg \
|
||||
-c init &
|
||||
sleep 1
|
||||
'';
|
||||
|
@ -49,12 +49,6 @@ let
|
|||
&& flash-fpga-config
|
||||
'';
|
||||
|
||||
verifyFPGAConfig = writeShellScriptBin "verify-fpga-config" ''
|
||||
gdb -x gdb_config/fpga_verify.gdb
|
||||
diff build/top.bin mem.bin
|
||||
rm mem.bin
|
||||
'';
|
||||
|
||||
resetFlash = writeShellScriptBin "reset-flash" ''
|
||||
gdb -batch -x gdb_config/reset.gdb
|
||||
echo "Reset is complete, please reset the openocd server."
|
||||
|
@ -64,6 +58,10 @@ let
|
|||
openocd -f openocd/openocd.cfg -f openocd/$1.cfg
|
||||
'';
|
||||
|
||||
publishMqtt = writeShellScriptBin "publish-mqtt" ''
|
||||
mosquitto_pub -h localhost -t $1 -m "$2" -d
|
||||
'';
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "nix-shell";
|
||||
|
@ -85,8 +83,8 @@ in
|
|||
compileMigenScript
|
||||
flashFPGAConfig
|
||||
configureFPGA
|
||||
verifyFPGAConfig
|
||||
resetFlash
|
||||
openocdFlash
|
||||
publishMqtt
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue