DRTIO port - scripts #135

Merged
sb10q merged 5 commits from mwojcik/artiq-zynq:drtio_scripts into master 2021-10-08 16:25:13 +08:00
Showing only changes of commit e5c892d9d3 - Show all commits

View File

@ -5,6 +5,8 @@ all: runtime
runtime: ../build/runtime.bin
satman: ../build/satman.bin
Review

What are these *_target things for?
Also (assuming they are necessary at all), if there are no *_target files produced those rules should be PHONY.

What are these ``*_target`` things for? Also (assuming they are necessary at all), if there are no ``*_target`` files produced those rules should be ``PHONY``.
Review

I was aiming for clearer reference of the targets in nix-scripts, or when called manually. But it's unnecessary after all, it can be called straight up with the output file rule.

I was aiming for clearer reference of the targets in nix-scripts, or when called manually. But it's unnecessary after all, it can be called straight up with the output file rule.
Review

OK, I see. Yes the manual command is a bit unwieldy, I suggest adding them back but listed as PHONY. I will merge this now, please send a new PR.

OK, I see. Yes the manual command is a bit unwieldy, I suggest adding them back but listed as PHONY. I will merge this now, please send a new PR.
.PHONY: all
@ -22,12 +24,12 @@ runtime: ../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
mwojcik marked this conversation as resolved Outdated
Outdated
Review

Why the deviation from the runtime Make rules?

Why the deviation from the runtime Make rules?

You mean in the name of the rule? Fair point, no particular reason for it, I'll revert it.

You mean in the name of the rule? Fair point, no particular reason for it, I'll revert it.
Outdated
Review

The name of the rule needs to match the output file, otherwise Make keeps evaluating it every time it is invoked with that target.

The name of the rule needs to match the output file, otherwise Make keeps evaluating it every time it is invoked with that target.
satmanout: ../build/pl.rs ../build/rustc-cfg
../build/firmware/armv7-none-eabihf/release/satman: ../build/pl.rs ../build/rustc-cfg
cd satman && \
XBUILD_SYSROOT_PATH=`pwd`/../../build/sysroot \
cargo xbuild --release \
--target-dir ../../build/firmware \
--no-default-features --features=target_$(TARGET)
satman: satmanout
../build/satman.bin: ../build/firmware/armv7-none-eabihf/release/satman
llvm-objcopy -O binary ../build/firmware/armv7-none-eabihf/release/satman ../build/satman.bin