summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2016-12-20 16:12:17 -0800
committerGitHub <noreply@github.com>2016-12-20 16:12:17 -0800
commitfb9d92d4bcfae53f60d82c1bd2ca270e67e312e7 (patch)
tree7277bddf9932f0caac9779ae1959b16db9724528 /Makefile
parenta9d55db96cd553d988c30b8d78b3273331d101e7 (diff)
parentaa2cb1d59c971ad593ada22ce167379efcd818f6 (diff)
Merge pull request #32 from sifive/default-hifive1
Default to freedom-e300-hifive1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 272ca15..ab02199 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,9 @@ srcdir := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
srcdir := $(srcdir:/=)
wrkdir := $(CURDIR)/work
+DEFAULT_BOARD := freedom-e300-hifive1
+DEFAULT_PROGRAM := demo_gpio
+
#############################################################
# Prints help message
#############################################################
@@ -14,20 +17,20 @@ help :
@echo " tools:"
@echo " Install compilation & debugging tools"
@echo ""
- @echo " software [PROGRAM=demo_gpio BOARD=freedom-e300-arty]:"
+ @echo " software [PROGRAM=$(DEFAULT_PROGRAM) BOARD=$(DEFAULT_BOARD)]:"
@echo " Build a software program to load with the"
@echo " debugger."
@echo ""
- @echo " run_debug [PROGRAM=demo_gpio BOARD=freedom-e300-arty]:"
+ @echo " run_debug [PROGRAM=$(DEFAULT_PROGRAM) BOARD=$(DEFAULT_BOARD)]:"
@echo " Launch OpenOCD & GDB to load or debug "
@echo " running programs."
@echo ""
- @echo " upload [PROGRAM=demo_gpio BOARD=freedom-e300-arty]:"
+ @echo " upload [PROGRAM=$(DEFAULT_PROGRAM) BOARD=$(DEFAULT_BOARD)]:"
@echo " Launch OpenOCD to flash your program to the"
@echo " on-board Flash"
@echo ""
- @echo " run_openocd [BOARD=freedom-e300-arty]:"
- @echo " run_gdb [PROGRAM=demo_gpio BOARD=freedom-e300-arty]:"
+ @echo " run_openocd [BOARD=$(DEFAULT_BOARD)]:"
+ @echo " run_gdb [PROGRAM=$(DEFAULT_PROGRAM) BOARD=$(DEFAULT_BOARD)]:"
@echo " Launch OpenOCD or GDB seperately"
@echo ""
@echo " For more information, visit dev.sifive.com"
@@ -80,8 +83,8 @@ uninstall:
#############################################################
# This Section is for Software Compilation
#############################################################
-BOARD ?= freedom-e300-arty
-PROGRAM ?= demo_gpio
+BOARD ?= $(DEFAULT_BOARD)
+PROGRAM ?= $(DEFAULT_PROGRAM)
PROGRAM_DIR = $(srcdir)/software/$(PROGRAM)
PROGRAM_ELF = $(srcdir)/software/$(PROGRAM)/$(PROGRAM)