From fda6fc8371777bf57a4c0736d04176a26ee94369 Mon Sep 17 00:00:00 2001 From: peabody124 Date: Wed, 18 Aug 2010 14:29:53 +0000 Subject: [PATCH] Merge branch 'mac_support' git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1324 ebee16cc-31ac-478f-84a7-5cbb03baadba --- Makefile | 14 ++++++++++++-- flight/AHRS/Makefile | 7 ++++++- flight/OpenPilot/Makefile | 7 ++++++- flight/Project/OpenOCD/floss-jtag.ahrs.osx.cfg | 15 +++++++++++++++ .../Project/OpenOCD/floss-jtag.openpilot.osx.cfg | 15 +++++++++++++++ 5 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 flight/Project/OpenOCD/floss-jtag.ahrs.osx.cfg create mode 100644 flight/Project/OpenOCD/floss-jtag.openpilot.osx.cfg diff --git a/Makefile b/Makefile index 1ebf077a3..331086fe9 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,16 @@ TOOLS_DIR=$(ROOT_DIR)/tools BUILD_DIR=$(ROOT_DIR)/build DL_DIR=$(ROOT_DIR)/downloads +# We almost need to consider autoconf/automake instead of this +# I don't know if windows supports uname :-( +UNAME := $(shell uname) +ifeq ($(UNAME), Linux) + QT_SPEC=linux-g++ +endif +ifeq ($(UNAME), Darwin) + QT_SPEC=macx-g++ +endif + # Set up misc host tools RM=rm @@ -182,7 +192,7 @@ gcs: openpilotgcs openpilotgcs: #uavobjects mkdir -p $(BUILD_DIR)/$@ ( cd $(BUILD_DIR)/$@ ; \ - $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs.pro -spec linux-g++ -r CONFIG+=debug ; \ + $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+=debug ; \ make -w ; \ ) @@ -190,7 +200,7 @@ openpilotgcs: #uavobjects uavobjgenerator: mkdir -p $(BUILD_DIR)/$@ ( cd $(BUILD_DIR)/$@ ; \ - $(QMAKE) $(ROOT_DIR)/ground/src/libs/uavobjgenerator/uavobjgenerator.pro -spec linux-g++ -r CONFIG+=debug ; \ + $(QMAKE) $(ROOT_DIR)/ground/src/libs/uavobjgenerator/uavobjgenerator.pro -spec $(QT_SPEC) -r CONFIG+=debug ; \ make -w ; \ ) diff --git a/flight/AHRS/Makefile b/flight/AHRS/Makefile index 2b20c56fe..6cad71d40 100644 --- a/flight/AHRS/Makefile +++ b/flight/AHRS/Makefile @@ -293,7 +293,12 @@ OOCD_EXE=openocd # debug level OOCD_CL=-d0 # interface and board/target settings (using the OOCD target-library here) -OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.cfg -f ../Project/OpenOCD/stm32.cfg +UNAME := $(shell uname) +ifeq ($(UNAME), Darwin) + OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.osx.cfg -f ../Project/OpenOCD/stm32.cfg +else + OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.ahrs.cfg -f ../Project/OpenOCD/stm32.cfg +endif # initialize OOCD_CL+=-c init # show the targets diff --git a/flight/OpenPilot/Makefile b/flight/OpenPilot/Makefile index 95906e2bf..6d2a9fc74 100644 --- a/flight/OpenPilot/Makefile +++ b/flight/OpenPilot/Makefile @@ -443,7 +443,12 @@ OOCD_EXE=openocd # debug level OOCD_CL=-d0 # interface and board/target settings (using the OOCD target-library here) -OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.cfg -f ../Project/OpenOCD/stm32.cfg +UNAME := $(shell uname) +ifeq ($(UNAME), Darwin) + OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.osx.cfg -f ../Project/OpenOCD/stm32.cfg +else + OOCD_CL+=-f ../Project/OpenOCD/floss-jtag.openpilot.cfg -f ../Project/OpenOCD/stm32.cfg +endif # initialize OOCD_CL+=-c init # show the targets diff --git a/flight/Project/OpenOCD/floss-jtag.ahrs.osx.cfg b/flight/Project/OpenOCD/floss-jtag.ahrs.osx.cfg new file mode 100644 index 000000000..d61d776b0 --- /dev/null +++ b/flight/Project/OpenOCD/floss-jtag.ahrs.osx.cfg @@ -0,0 +1,15 @@ +# +# Floss JTAG OpenPilot +# + +interface ft2232 +ft2232_vid_pid 0x0403 0x6010 +ft2232_device_desc "Dual RS232-HS" +#ft2232_bus_addr "002:088" +#ft2232_serial "1234567890" +ft2232_layout "usbjtag" +ft2232_latency 2 + +gdb_port 3333 +tcl_port 6666 +telnet_port 4444 diff --git a/flight/Project/OpenOCD/floss-jtag.openpilot.osx.cfg b/flight/Project/OpenOCD/floss-jtag.openpilot.osx.cfg new file mode 100644 index 000000000..cd5f8a28e --- /dev/null +++ b/flight/Project/OpenOCD/floss-jtag.openpilot.osx.cfg @@ -0,0 +1,15 @@ +# +# Floss JTAG OpenPilot +# + +interface ft2232 +ft2232_vid_pid 0x0403 0x6010 +#ft2232_device_desc "Dual RS232-HS" +#ft2232_bus_addr "002:088" +#ft2232_serial "1234567890" +ft2232_layout "usbjtag" +ft2232_latency 2 + +gdb_port 3333 +tcl_port 6666 +telnet_port 4444