diff --git a/src/Makefile b/src/Makefile index 393676e..11c69b3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,11 +1,10 @@ TARGET := zc706 GWARGS := -V simple +SATMAN_GWARGS := -m ../build/mem.rs -V satellite all: runtime -runtime: ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin - -satman: ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin +runtime: ../build/runtime.bin .PHONY: all @@ -14,7 +13,7 @@ satman: ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin mkdir -p ../build python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(GWARGS) -../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg $(shell find . -print) +../build/firmware/armv7-none-eabihf/release/runtime: ../build/pl.rs ../build/rustc-cfg cd runtime && \ XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \ cargo xbuild --release \ @@ -24,13 +23,16 @@ satman: ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.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 +satman_cfg: + mkdir -p ../build + python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(SATMAN_GWARGS) -../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg $(shell find . -print) +satmanout: satman_cfg 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 - llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin +satman: satmanout + llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin \ No newline at end of file