From dfdb41a87527eed1177e206a424740096de147e5 Mon Sep 17 00:00:00 2001 From: Byron Lathi Date: Mon, 14 Aug 2023 23:44:51 -0700 Subject: [PATCH] Automatically copy rom image and warn about rebuild --- sw/bios/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sw/bios/Makefile b/sw/bios/Makefile index 2b3d72f..8ada355 100644 --- a/sw/bios/Makefile +++ b/sw/bios/Makefile @@ -21,7 +21,16 @@ all: $(HEX) $(HEX): $(BIN) objcopy --input-target=binary --output-target=verilog $(BIN) $(HEX) - cmp $(HEX) $(FPGA_IMG) + cmp $(HEX) $(FPGA_IMG); \ + RETVAL=$$?; \ + if [ $$RETVAL -eq 0 ]; then \ + echo "SAME"; \ + else \ + echo "NOT SAME"; \ + cp bios.hex ../../hw/efinix_fpga/init_hex.mem; \ + echo "Update ROM or rebuild FPGA image!"; \ + fi + $(BIN): $(OBJS)