From db199c80c3b3b2cfaf6bc86fcf98987e47985c03 Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 14 Mar 2019 13:55:43 -0700 Subject: Use TARGET_TAGS in Makefile Signed-off-by: Nathaniel Graff --- scripts/standalone.mk | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') 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) -- cgit v1.2.1-18-gbd029 From 7083079297ea072a5a76b07ab53785372442d01f Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 14 Mar 2019 15:01:02 -0700 Subject: list-targets accepts TARGET_REQUIRE_TAGS as filter make list-targets TARGET_REQUIRE_TAGS="tag1 tag2 tag3" will list only the BSPs with all of the requested tags. Signed-off-by: Nathaniel Graff --- scripts/filter-targets | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/filter-targets (limited to 'scripts') diff --git a/scripts/filter-targets b/scripts/filter-targets new file mode 100755 index 0000000..580a433 --- /dev/null +++ b/scripts/filter-targets @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e +set -o pipefail + +unset tag +unset bsp_dir +unset all_settings + +bsp_dir="$1" +shift 1 + +all_settings=`find ${bsp_dir} -name settings.mk` + +while [[ "$1" != "" ]] +do + all_settings=`grep -le "TARGET_TAGS.*=.*$1.*" ${all_settings}` + shift 1 +done + +echo ${all_settings} -- cgit v1.2.1-18-gbd029