diff --git a/default.nix b/default.nix index d83c909..74a99e3 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ let pkgs = import { overlays = [ (import "${zynq-rs}/nix/mozilla-overlay.nix") ]; }; rustPlatform = (import "${zynq-rs}/nix/rust-platform.nix" { inherit pkgs; }); cargo-xbuild = (import zynq-rs).cargo-xbuild; - rust-pitaya-szl = (import zynq-rs).rust-pitaya-szl; + redpitaya-szl = (import zynq-rs).redpitaya-szl; mkbootimage = import "${zynq-rs}/nix/mkbootimage.nix" { inherit pkgs; }; artiqpkgs = import { inherit pkgs; }; vivado = import { inherit pkgs; }; @@ -12,7 +12,7 @@ in rec { name = "rust-pitaya-firmware"; src = ./src; - cargoSha256 = "097f4y54cc5m0pib08ypzwbf221knj5a079izixkhhz66g5fmgsq"; + cargoSha256 = "173013gdlk8mljps6lar892zqgxrmxa7fkv8is3wgvgf7dnifjzs"; nativeBuildInputs = [ pkgs.gnumake @@ -29,7 +29,7 @@ in rec { installPhase = '' mkdir -p $out $out/nix-support - cp ../build/runtime.bin $out/firmware.bin + cp ../build/firmware.bin $out/firmware.bin cp ../build/firmware/armv7-none-eabihf/release/firmware $out/firmware.elf echo file binary-dist $out/firmware.bin >> $out/nix-support/hydra-build-products echo file binary-dist $out/firmware.elf >> $out/nix-support/hydra-build-products @@ -46,7 +46,7 @@ in rec { ]; } '' - python ${./src/gateware}/zc706.py -g build + python ${./src/gateware}/rust-pitaya.py -g build mkdir -p $out $out/nix-support cp build/top.bit $out echo file binary-dist $out/top.bit >> $out/nix-support/hydra-build-products @@ -56,7 +56,7 @@ in rec { rust-pitaya-jtag = pkgs.runCommand "rust-pitaya-jtag" {} '' mkdir $out - ln -s ${rust-pitaya-szl}/szl.elf $out + ln -s ${redpitaya-szl}/szl.elf $out ln -s ${rust-pitaya-firmware}/firmware.bin $out ln -s ${rust-pitaya-gateware}/top.bit $out ''; @@ -69,15 +69,15 @@ in rec { # can't write software (mkbootimage will segfault). bifdir=`mktemp -d` cd $bifdir - ln -s ${rust-pitaya-szl}/szl.elf szl.elf - ln -s ${rust-pitaya-firmware}/runtime.elf runtime.elf + ln -s ${redpitaya-szl}/szl.elf szl.elf + ln -s ${rust-pitaya-firmware}/firmware.elf firmware.elf ln -s ${rust-pitaya-gateware}/top.bit top.bit cat > boot.bif << EOF the_ROM_image: { [bootloader]szl.elf top.bit - runtime.elf + firmware.elf } EOF mkdir $out $out/nix-support diff --git a/local_run.sh b/local_run.sh index 81ed04a..e836f34 100755 --- a/local_run.sh +++ b/local_run.sh @@ -39,10 +39,10 @@ if [ $impure -eq 1 ]; then if [ $load_bitstream -eq 1 ]; then load_bitstream_cmd="-g $build_dir/gateware/top.bit" fi - artiq_netboot $load_bitstream_cmd -f $build_dir/runtime.bin -b $board_host + artiq_netboot $load_bitstream_cmd -f $build_dir/firmware.bin -b $board_host else if [ $load_bitstream -eq 1 ]; then load_bitstream_cmd="-g $result_dir/top.bit" fi - artiq_netboot $load_bitstream_cmd -f $result_dir/runtime.bin -b $board_host + artiq_netboot $load_bitstream_cmd -f $result_dir/firmware.bin -b $board_host fi diff --git a/remote_run.sh b/remote_run.sh index e8e8017..3cfcff5 100755 --- a/remote_run.sh +++ b/remote_run.sh @@ -17,7 +17,7 @@ pure_dir="result" impure_dir="build" sshopts="" load_bitstream=1 -board_host="192.168.1.52" +board_host="192.168.1.55" while getopts "h:id:o:l" opt; do case "$opt" in @@ -51,14 +51,14 @@ if [ $impure -eq 1 ]; then if [ $load_bitstream -eq 1 ]; then load_bitstream_cmd="-g build/gateware/top.bit" fi - firmware="build/runtime.bin" + firmware="build/firmware.bin" else if [ $load_bitstream -eq 1 ]; then load_bitstream_cmd="-g $pure_dir/top.bit" fi - firmware="$pure_dir/runtime.bin" + firmware="$pure_dir/firmware.bin" fi echo "Programming board..." -ssh $sshopts $target_host "cd $target_folder; openocd -f zc706.cfg -c'load_image szl.elf; resume 0; exit'" +ssh $sshopts $target_host "cd $target_folder; openocd -f redpitaya.cfg -c'load_image szl.elf; resume 0; exit'" sleep 5 artiq_netboot $load_bitstream_cmd -f $firmware -b $board_host diff --git a/src/Cargo.lock b/src/Cargo.lock index 18bbcb3..d96d126 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -26,14 +26,14 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "compiler_builtins" -version = "0.1.36" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd0782e0a7da7598164153173e5a5d4d9b1da094473c98dce0ff91406112369" +checksum = "e3fcd8aba10d17504c87ef12d4f62ef404c6a4703d16682a9eb5543e6cf24455" [[package]] name = "core_io" version = "0.1.20200410" -source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#6266d280951c3fe5d4963a4b1ca45ce369d6b773" +source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#80d12d57802b9b78aa45b821a147f71444d401f0" dependencies = [ "memchr", ]