mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-22 20:36:06 +08:00
Merge pull request #83 from flixr/find_openocd
pick up openocd from the path
This commit is contained in:
+9
-3
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user