Merge pull request #83 from flixr/find_openocd

pick up openocd from the path
This commit is contained in:
Felix Ruess
2011-11-14 06:39:04 -08:00
2 changed files with 19 additions and 5 deletions
+9 -3
View File
@@ -50,7 +50,6 @@ OBJCOPY = $(GCC_BIN_PREFIX)-objcopy
OBJDUMP = $(GCC_BIN_PREFIX)-objdump
NM = $(GCC_BIN_PREFIX)-nm
SIZE = $(GCC_BIN_PREFIX)-size
OOCD = $(TOOLCHAIN_DIR)/bin/openocd
#
# If we can't find the toolchain (in /opt/paparazzi/arm-multilib or ~/sat) then try picking up the compilers from the path
@@ -72,7 +71,15 @@ OBJCOPY = $(shell which $(GCC_PREFIX)-objcopy)
OBJDUMP = $(shell which $(GCC_PREFIX)-objdump)
NM = $(shell which $(GCC_PREFIX)-nm)
SIZE = $(shell which $(GCC_PREFIX)-size)
OOCD = $(shell which openocd)
endif
#first try to find OpenOCD in the path
OOCD = $(shell which openocd)
#if OpenOCD could not be found in the path, try the toolchain dir
ifeq ($(OOCD),)
ifneq ($(TOOLCHAIN),)
OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_DIR)/bin/openocd ; else echo "Warning: OpenOCD not found"; fi)
endif
endif
# Define some other programs and commands.
@@ -182,7 +189,6 @@ LPC21IAP = $(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap
# ---------------------------------------------------------------------------
# Flash-Programming support using openocd
OOCD = openocd
OOCD_INTERFACE = arm-usb-ocd
OOCD_TARGET = csc
+10 -2
View File
@@ -53,7 +53,6 @@ DMP = $(GCC_BIN_PREFIX)-objdump
NM = $(GCC_BIN_PREFIX)-nm
SIZE = $(GCC_BIN_PREFIX)-size
RM = rm
OOCD = $(TOOLCHAIN_DIR)/bin/openocd
# If we can't find the toolchain then try picking up the compilers from the path
else
@@ -63,10 +62,19 @@ CP = $(shell which arm-none-eabi-objcopy)
DMP = $(shell which arm-none-eabi-objdump)
NM = $(shell which arm-none-eabi-nm)
SIZE = $(shell which arm-none-eabi-size)
OOCD = $(shell which openocd)
GCC_LIB_DIR=$(shell dirname `which arm-none-eabi-gcc`)/../arm-none-eabi/lib
endif
#first try to find OpenOCD in the path
OOCD = $(shell which openocd)
#if OpenOCD could not be found in the path, try the toolchain dir
ifeq ($(OOCD),)
ifneq ($(TOOLCHAIN),)
OOCD = $(shell if test -e $(TOOLCHAIN_DIR)/bin/openocd ; then echo $(TOOLCHAIN_DIR)/bin/openocd ; else echo "Warning: OpenOCD not found"; fi)
endif
endif
LOADER=/home/poine/work/stm32/stm32loader-a3c51c26ad6c/stm32loader.py
ifndef $(TARGET).OOCD_INTERFACE