makefile: satman support, separated from runtime

This commit is contained in:
mwojcik 2021-08-24 13:57:10 +02:00
parent b585eaaa37
commit 37eb4669fb

View File

@ -1,11 +1,10 @@
TARGET := zc706 TARGET := zc706
GWARGS := -V simple GWARGS := -V simple
SATMAN_GWARGS := -m ../build/mem.rs -V satellite
all: runtime all: runtime
runtime: ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin runtime: ../build/runtime.bin
satman: ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin
.PHONY: all .PHONY: all
@ -14,7 +13,7 @@ satman: ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin
mkdir -p ../build mkdir -p ../build
python gateware/$(TARGET).py -r ../build/pl.rs -c ../build/rustc-cfg $(GWARGS) 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 && \ cd runtime && \
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \ XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
cargo xbuild --release \ 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 ../build/runtime.bin: ../build/firmware/armv7-none-eabihf/release/runtime
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/runtime ../build/runtime.bin 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 && \ cd satman && \
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \ XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
cargo xbuild --release \ cargo xbuild --release \
--target-dir ../../build/firmware \ --target-dir ../../build/firmware \
--no-default-features --features=target_$(TARGET) --no-default-features --features=target_$(TARGET)
../build/satman.bin: ../build/firmware/armv7-none-eabihf/release/satman satman: satmanout
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin