Compare commits
No commits in common. "26225719a11c42308283e7b9997bdd4b31b508a0" and "5a2770b82590ef17c06f52159d2c7be1867fcf74" have entirely different histories.
26225719a1
...
5a2770b825
12
Makefile
12
Makefile
|
@ -1,5 +1,9 @@
|
|||
fpga_config: main.rs
|
||||
openocd -f openocd/openocd.cfg -f openocd/main.cfg
|
||||
fpga_config: fpga_config.rs
|
||||
openocd -f openocd/openocd.cfg -f openocd/fpga-config.cfg
|
||||
|
||||
fpga_config.rs: top.bin
|
||||
cargo build --example fpga_config
|
||||
|
||||
top.bin:
|
||||
python3 migen/fpga_config.py
|
||||
|
||||
main.rs: top.bin
|
||||
cargo build --release
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
reset init
|
||||
halt
|
||||
flash write_image erase target/thumbv7em-none-eabihf/debug/examples/ethernet
|
||||
reset run
|
||||
shutdown
|
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
reset init
|
||||
halt
|
||||
flash write_image erase target/thumbv7em-none-eabihf/debug/examples/fpga_config
|
||||
reset run
|
||||
shutdown
|
|
@ -1,6 +0,0 @@
|
|||
init
|
||||
reset init
|
||||
halt
|
||||
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
||||
reset run
|
||||
shutdown
|
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
reset init
|
||||
halt
|
||||
flash write_image erase target/thumbv7em-none-eabihf/debug/examples/mqtt_client
|
||||
reset run
|
||||
shutdown
|
29
shell.nix
29
shell.nix
|
@ -30,6 +30,30 @@ let
|
|||
fi
|
||||
'';
|
||||
|
||||
runEthernetServer = writeShellScriptBin "run-ethernet-server" ''
|
||||
set-gdb-config-file && cargo run --example ethernet
|
||||
'';
|
||||
|
||||
compileMigenScript = writeShellScriptBin "compile-migen-script" ''
|
||||
python3 migen/fpga_config.py
|
||||
echo "Compiled fpga_config.py to top.bin"
|
||||
'';
|
||||
|
||||
flashFPGAConfig = writeShellScriptBin "flash-fpga-config" ''
|
||||
openocd-flash fpga-config
|
||||
'';
|
||||
|
||||
configureFPGA = writeShellScriptBin "configure-fpga" ''
|
||||
compile-migen-script \
|
||||
&& cargo build --example fpga_config \
|
||||
&& flash-fpga-config
|
||||
'';
|
||||
|
||||
resetFlash = writeShellScriptBin "reset-flash" ''
|
||||
gdb -batch -x gdb_config/reset.gdb
|
||||
echo "Reset is complete, please reset the openocd server."
|
||||
'';
|
||||
|
||||
openocdFlash = writeShellScriptBin "openocd-flash" ''
|
||||
openocd -f openocd/openocd.cfg -f openocd/$1.cfg
|
||||
'';
|
||||
|
@ -55,6 +79,11 @@ in
|
|||
runOpenOcd
|
||||
runOpenOcdBlock
|
||||
setGDBConfigFile
|
||||
runEthernetServer
|
||||
compileMigenScript
|
||||
flashFPGAConfig
|
||||
configureFPGA
|
||||
resetFlash
|
||||
openocdFlash
|
||||
publishMqtt
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue