summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-01-04 09:41:46 -0800
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-01-04 09:41:46 -0800
commit9bf66e496f4d77128d1c1edd3f435dd6ae1c010a (patch)
treef427add60dbe3fabcafc60157476a0e42772413c
parent093255eb95393d945d4e321d1dfa614669f8834b (diff)
Look for OpenOCD in RISCV_OPENOCD_PATH
The README states that OpenOCD should be pointed to by RISCV_OPENOCD_PATH, not RISCV_PATH. Fix the makefile to look in the right place. Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a25ecc7..491a3dd 100644
--- a/Makefile
+++ b/Makefile
@@ -131,17 +131,21 @@ RISCV_GXX := $(CROSS_COMPILE)-g++
RISCV_OBJDUMP := $(CROSS_COMPILE)-objdump
RISCV_GDB := $(CROSS_COMPILE)-gdb
RISCV_AR := $(CROSS_COMPILE)-ar
-RISCV_OPENOCD := openocd
else
RISCV_GCC := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gcc)
RISCV_GXX := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-g++)
RISCV_OBJDUMP := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-objdump)
RISCV_GDB := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gdb)
RISCV_AR := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-ar)
-RISCV_OPENOCD := $(abspath $(RISCV_PATH)/bin/openocd)
PATH := $(abspath $(RISCV_PATH)/bin):$(PATH)
endif
+ifeq ($(RISCV_OPENOCD_PATH),)
+RISCV_OPENOCD := openocd
+else
+RISCV_OPENOCD := $(abspath $(RISCV_OPENOCD_PATH)/bin/openocd)
+endif
+
#############################################################
# Compiles an instance of the MEE targeted at $(BOARD)
#############################################################