Browse Source

projects/riscv_usb: Update Makefile with new bootcode targets

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 5 years ago
parent
commit
92c03a9355
1 changed files with 4 additions and 3 deletions
  1. 4 3
      projects/riscv_usb/Makefile

+ 4 - 3
projects/riscv_usb/Makefile

@@ -23,6 +23,7 @@ PROJ_TOP_SRC := rtl/top.v
 PROJ_TOP_MOD := top
 
 # Target config
+BOOT_CODE ?= app
 BOARD ?= icebreaker
 DEVICE = up5k
 PACKAGE = sg48
@@ -37,8 +38,8 @@ ifeq ($(BOOT_CODE),dfu)
 YOSYS_READ_ARGS += -DDFU=1
 endif
 
-fw/boot.hex:
-	make -C fw boot.hex
+fw/boot_$(BOOT_CODE).hex:
+	make -C fw boot_$(BOOT_CODE).hex
 
-$(BUILD_TMP)/boot.hex: fw/boot.hex
+$(BUILD_TMP)/boot.hex: fw/boot_$(BOOT_CODE).hex
 	cp $< $@