diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-15 19:35:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-15 19:35:26 +0000 |
commit | 30c143eb5445f47edb351ba54c84ff8285dc27a9 (patch) | |
tree | c02276d630c017ac15e3794ce3ea25be78937da1 /scripts/standalone.mk | |
parent | 5857568d9db5b626fea43a414a17809afdc9f80b (diff) | |
parent | 5dd316a7fff887877c229be395db74dd62634586 (diff) |
Merge pull request #207 from sifive/tags
Proposal: TARGET_TAGS is used to configure the build and to filter list-targets
Diffstat (limited to 'scripts/standalone.mk')
-rw-r--r-- | scripts/standalone.mk | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/standalone.mk b/scripts/standalone.mk index c9da448..fd7486b 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -121,10 +121,7 @@ all: software .PHONY: software software: $(PROGRAM_ELF) -ifneq ($(COREIP_MEM_WIDTH),) -software: $(PROGRAM_HEX) -endif -ifneq ($(SEGGER_JLINK_OB),) +ifneq ($(filter jlink rtl,$(TARGET_TAGS)),) software: $(PROGRAM_HEX) endif @@ -149,14 +146,17 @@ $(PROGRAM_ELF): \ $(RISCV_SIZE) $@ -ifneq ($(SEGGER_JLINK_OB),) # If we're using Segger J-Link OB, use objcopy to create an Intel hex file for programming +ifneq ($(filter jlink,$(TARGET_TAGS)),) $(PROGRAM_HEX): \ $(RISCV_OBJCOPY) \ $(PROGRAM_ELF) $< -O ihex $(PROGRAM_ELF) $@ -else -# Use elf2hex if we're not using Segger J-Link OB (i.e. for coreip-rtl targets) +endif + +# Use elf2hex if we're creating a hex file for RTL simulation +ifneq ($(filter rtl,$(TARGET_TAGS)),) +.PHONY: software $(PROGRAM_HEX): \ scripts/elf2hex/install/bin/$(CROSS_COMPILE)-elf2hex \ $(PROGRAM_ELF) |