forked from M-Labs/artiq-zynq
parent
92ae487143
commit
2439ba1f88
@ -1,3 +1,8 @@ |
||||
result |
||||
examples/*.elf |
||||
__pycache__ |
||||
|
||||
src/runtime/src/pl.rs |
||||
src/szl/src/payload.bin |
||||
src/szl/src/payload.bin.lzma |
||||
src/target |
||||
|
@ -0,0 +1,23 @@ |
||||
Configure Nix channels: |
||||
`` |
||||
nix-channel --add https://nixbld.m-labs.hk/channel/custom/artiq/fast-beta/artiq-fast |
||||
nix-channel --update |
||||
`` |
||||
|
||||
Pure build with Nix: |
||||
`` |
||||
nix-build -A zc706-jtag |
||||
./remote_run.sh |
||||
`` |
||||
|
||||
Impure incremental build: |
||||
`` |
||||
nix-shell |
||||
cd src |
||||
./zc706.py -g # build gateware |
||||
make # build firmware |
||||
cd .. |
||||
./remote_run.sh -i |
||||
`` |
||||
|
||||
The impure build process can also be used on non-Nix systems. |
@ -1 +0,0 @@ |
||||
"199qfs7fbbj8kxkyb0dcns6hdq9hvlppk7l3pnz204j9zkd7dkcp" |
@ -0,0 +1,28 @@ |
||||
let |
||||
mozillaOverlay = import (builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"); |
||||
pkgs = import <nixpkgs> { overlays = [ mozillaOverlay ]; }; |
||||
artiq-fast = <artiq-fast>; |
||||
rustPlatform = (import ./rustPlatform.nix { inherit pkgs; }); |
||||
artiqpkgs = import "${artiq-fast}/default.nix" { inherit pkgs; }; |
||||
vivado = import "${artiq-fast}/vivado.nix" { inherit pkgs; }; |
||||
in |
||||
pkgs.stdenv.mkDerivation { |
||||
name = "artiq-zynq-env"; |
||||
buildInputs = [ |
||||
pkgs.gnumake |
||||
rustPlatform.rust.rustc |
||||
rustPlatform.rust.cargo |
||||
pkgs.clang_9 |
||||
pkgs.cacert |
||||
pkgs.cargo-xbuild |
||||
|
||||
pkgs.openssh pkgs.rsync |
||||
|
||||
(pkgs.python3.withPackages(ps: (with artiqpkgs; [ migen migen-axi misoc artiq ]))) |
||||
vivado |
||||
pkgs.llvm_9 |
||||
pkgs.lld_9 |
||||
]; |
||||
|
||||
XARGO_RUST_SRC = "${rustPlatform.rust.rustc.src}/src"; |
||||
} |
@ -0,0 +1,23 @@ |
||||
all: target/armv7-none-eabihf/release/szl |
||||
|
||||
clean: |
||||
rm -f runtime/src/pl.rs
|
||||
rm -f szl/src/payload.bin
|
||||
rm -f szl/src/payload.bin.lzma
|
||||
rm -rf target
|
||||
|
||||
.PHONY: all clean |
||||
|
||||
|
||||
runtime/src/pl.rs: zc706.py |
||||
python zc706.py -r runtime/src/pl.rs
|
||||
|
||||
target/armv7-none-eabihf/release/runtime: .cargo/* armv7-none-eabihf.json Cargo.lock Cargo.toml libdyld/* libdyld/src/* runtime/* runtime/src/* runtime/src/pl.rs |
||||
cargo xbuild --release -p runtime
|
||||
|
||||
szl/src/payload.bin.lzma: target/armv7-none-eabihf/release/runtime |
||||
llvm-objcopy -O binary target/armv7-none-eabihf/release/runtime szl/src/payload.bin
|
||||
lzma --keep -f szl/src/payload.bin
|
||||
|
||||
target/armv7-none-eabihf/release/szl: .cargo/* armv7-none-eabihf.json Cargo.lock Cargo.toml szl/* szl/src/* szl/src/payload.bin.lzma |
||||
cargo xbuild --release -p szl
|
Loading…
Reference in new issue