forked from M-Labs/artiq-zynq
added explicit runtime/satman targets for makefile
Reviewed-on: M-Labs/artiq-zynq#144 Co-authored-by: mwojcik <mw@m-labs.hk> Co-committed-by: mwojcik <mw@m-labs.hk>
This commit is contained in:
parent
d04a7decfe
commit
219c075931
@ -45,7 +45,7 @@ Note: if you are using Nix channels the first time, you need to be aware of this
|
||||
Pure build with Nix and execution on a remote JTAG server:
|
||||
|
||||
```shell
|
||||
nix-build -A zc706-nist_clock-jtag # or zc706-nist_qc2-jtag or zc706-nist_clock_satellite-jtag
|
||||
nix-build -A zc706-nist_clock-jtag # or zc706-nist_qc2-jtag or zc706-nist_clock_satellite-jtag etc.
|
||||
./remote_run.sh
|
||||
```
|
||||
|
||||
@ -54,8 +54,8 @@ Impure incremental build and execution on a remote JTAG server:
|
||||
```shell
|
||||
nix-shell
|
||||
cd src
|
||||
gateware/zc706.py -g ../build/gateware # build gateware
|
||||
make # build firmware
|
||||
gateware/zc706.py -g ../build/gateware -v <variant> # build gateware
|
||||
make GWARGS="-v <variant>" <runtime/satman> # build firmware
|
||||
cd ..
|
||||
./remote_run.sh -i
|
||||
```
|
||||
@ -64,6 +64,8 @@ Notes:
|
||||
|
||||
- This is developed with Nixpkgs 21.05, and the ``nixbld.m-labs.hk`` binary substituter can also be used here (see the ARTIQ manual for the public key and instructions).
|
||||
- The impure build process is also compatible with non-Nix systems.
|
||||
- When calling make, you need to specify both the variant and firmware type.
|
||||
- Firmware type must be either ``runtime`` for DRTIO-less or DRTIO master variants, or ``satman`` for DRTIO satellite.
|
||||
- If the board is connected to the local machine, use the ``local_run.sh`` script.
|
||||
- To update ``zynq-rs``, update the cargo files as per usual for Rust projects, but also keep ``zynq-rs.nix`` in sync.
|
||||
|
||||
|
@ -35,7 +35,7 @@ let
|
||||
export XARGO_RUST_SRC="${rustPlatform.rust.rustc}/lib/rustlib/src/rust/library"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_9.clang-unwrapped.lib}/lib/clang/9.0.1/include"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}" ../build/${fwtype}.bin
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}" ${fwtype}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
12
src/Makefile
12
src/Makefile
@ -1,15 +1,19 @@
|
||||
TARGET := zc706
|
||||
GWARGS := -V nist_clock
|
||||
|
||||
all: ../build/runtime.bin
|
||||
all: runtime
|
||||
|
||||
.PHONY: all
|
||||
runtime: ../build/runtime.bin
|
||||
|
||||
satman: ../build/satman.bin
|
||||
|
||||
.PHONY: all runtime_target satman_target
|
||||
|
||||
../build/pl.rs ../build/rustc-cfg ../build/mem.rs: gateware/*
|
||||
mkdir -p ../build
|
||||
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg -m ../build/mem.rs $(GWARGS)
|
||||
|
||||
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -print)
|
||||
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -type f -print)
|
||||
cd runtime && \
|
||||
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
||||
cargo xbuild --release \
|
||||
@ -19,7 +23,7 @@ all: ../build/runtime.bin
|
||||
../build/runtime.bin: ../build/firmware/armv7-none-eabihf/release/runtime
|
||||
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin
|
||||
|
||||
../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -print)
|
||||
../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(shell find . -type f -print)
|
||||
cd satman && \
|
||||
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
||||
cargo xbuild --release \
|
||||
|
Loading…
Reference in New Issue
Block a user