2020-11-14 03:17:18 +08:00
|
|
|
TARGET := zc706
|
2021-10-08 17:07:12 +08:00
|
|
|
GWARGS := -V nist_clock
|
2020-05-14 15:30:50 +08:00
|
|
|
|
2021-10-08 21:06:23 +08:00
|
|
|
all: runtime
|
2020-05-01 10:07:38 +08:00
|
|
|
|
2021-10-08 21:06:23 +08:00
|
|
|
runtime: ../build/runtime.bin
|
|
|
|
|
|
|
|
satman: ../build/satman.bin
|
|
|
|
|
|
|
|
.PHONY: all runtime_target satman_target
|
2020-05-01 10:07:38 +08:00
|
|
|
|
2023-10-09 18:27:58 +08:00
|
|
|
manifests = libboard_artiq/Cargo.toml libc/Cargo.toml libdyld/Cargo.toml libio/Cargo.toml libksupport/Cargo.toml runtime/Cargo.toml satman/Cargo.toml
|
|
|
|
|
|
|
|
$(manifests): %.toml: %.toml.tpl
|
|
|
|
sed s+@@ZYNQ_RS@@+$(ZYNQ_RS)+g $< > $@
|
|
|
|
|
|
|
|
manifests: $(manifests)
|
|
|
|
|
2021-10-08 16:25:13 +08:00
|
|
|
../build/pl.rs ../build/rustc-cfg ../build/mem.rs: gateware/*
|
2020-05-07 13:52:40 +08:00
|
|
|
mkdir -p ../build
|
2021-10-08 16:25:13 +08:00
|
|
|
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg -m ../build/mem.rs $(GWARGS)
|
2020-08-04 13:15:26 +08:00
|
|
|
|
2023-10-09 18:27:58 +08:00
|
|
|
../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(manifests) $(shell find . -type f -not -name Cargo.toml -print)
|
2020-11-14 03:17:18 +08:00
|
|
|
cd runtime && \
|
|
|
|
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
|
|
|
cargo xbuild --release \
|
|
|
|
--target-dir ../../build/firmware \
|
|
|
|
--no-default-features --features=target_$(TARGET)
|
2020-09-09 17:01:14 +08:00
|
|
|
|
2020-09-09 18:12:39 +08:00
|
|
|
../build/runtime.bin: ../build/firmware/armv7-none-eabihf/release/runtime
|
2020-09-01 09:39:21 +08:00
|
|
|
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin
|
2021-10-08 16:25:13 +08:00
|
|
|
|
2023-10-09 18:27:58 +08:00
|
|
|
../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg ../build/mem.rs $(manifests) $(shell find . -type f -not -name Cargo.toml -print)
|
2021-10-08 16:25:13 +08:00
|
|
|
cd satman && \
|
|
|
|
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
|
|
|
|
cargo xbuild --release \
|
|
|
|
--target-dir ../../build/firmware \
|
|
|
|
--no-default-features --features=target_$(TARGET)
|
|
|
|
|
|
|
|
../build/satman.bin: ../build/firmware/armv7-none-eabihf/release/satman
|
2023-10-09 18:27:58 +08:00
|
|
|
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin
|