From 5132448fe810c127290ccfae9ba6f70b7c3884f6 Mon Sep 17 00:00:00 2001 From: Erik Gustavsson Date: Thu, 29 Nov 2012 18:50:25 +0100 Subject: [PATCH 01/11] Decrease zeroing yawBiasRate to reduce noise-induced random yaw drift. --- flight/Modules/Attitude/attitude.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flight/Modules/Attitude/attitude.c b/flight/Modules/Attitude/attitude.c index 7f43eb7a7..02c511500 100644 --- a/flight/Modules/Attitude/attitude.c +++ b/flight/Modules/Attitude/attitude.c @@ -218,14 +218,14 @@ static void AttitudeTask(void *parameters) // For first 7 seconds use accels to get gyro bias accelKp = 1; accelKi = 0.9; - yawBiasRate = 0.23; + yawBiasRate = 0.01; accel_filter_enabled = false; init = 0; } else if (zero_during_arming && (flightStatus.Armed == FLIGHTSTATUS_ARMED_ARMING)) { accelKp = 1; accelKi = 0.9; - yawBiasRate = 0.23; + yawBiasRate = 0.01; accel_filter_enabled = false; init = 0; } else if (init == 0) { From 8a83204715b9171faa093c79af7cc26f601bb7a8 Mon Sep 17 00:00:00 2001 From: Philippe Vanhaesendonck Date: Wed, 3 Apr 2013 18:29:31 +0200 Subject: [PATCH 02/11] Jira OP-678 -- remove sudo from debian post-install --- package/linux/deb_common/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/linux/deb_common/postinst b/package/linux/deb_common/postinst index df8022075..e58a3e1a3 100644 --- a/package/linux/deb_common/postinst +++ b/package/linux/deb_common/postinst @@ -20,7 +20,7 @@ set -e case "$1" in configure) - sudo udevadm control --reload-rules >&2 + /sbin/udevadm control --reload-rules >&2 ;; abort-upgrade|abort-remove|abort-deconfigure) From ecad4ec0f36d81e968a088b27b4325108b6795f1 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 16 Apr 2013 11:05:03 +0300 Subject: [PATCH 03/11] gcs: bump minimum Qt version to 4.8 (4.7 is not supported anymore) --- ground/openpilotgcs/openpilotgcs.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/openpilotgcs.pro b/ground/openpilotgcs/openpilotgcs.pro index 57a5f1ecf..de158d9eb 100644 --- a/ground/openpilotgcs/openpilotgcs.pro +++ b/ground/openpilotgcs/openpilotgcs.pro @@ -4,9 +4,9 @@ # #version check qt -contains(QT_VERSION, ^4\\.[0-5]\\..*) { +contains(QT_VERSION, ^4\\.[0-7]\\..*) { message("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}.") - error("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}. Use at least Qt 4.6!") + error("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}. Use at least Qt 4.8!") } include(openpilotgcs.pri) From 59f8a99ab7180a5e356a2d4a9db99d4aad135a87 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 16 Apr 2013 21:26:36 +0200 Subject: [PATCH 04/11] make: warn users about old ARM toolchain instead of cryptic 'no such file' error --- Makefile | 2 ++ make/tools.mk | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index ebf45b515..f0e7e9720 100644 --- a/Makefile +++ b/Makefile @@ -267,6 +267,7 @@ $(1): fw_$(1)_opfw fw_$(1): fw_$(1)_opfw fw_$(1)_%: uavobjects_flight + $(V1) $$(ARM_GCC_VERSION_CHECK_TEMPLATE) $(V1) $(MKDIR) -p $(BUILD_DIR)/fw_$(1)/dep $(V1) cd $(ROOT_DIR)/flight/targets/$(2) && \ $$(MAKE) -r --no-print-directory \ @@ -294,6 +295,7 @@ bl_$(1): bl_$(1)_bin bl_$(1)_bino: bl_$(1)_bin bl_$(1)_%: + $(V1) $$(ARM_GCC_VERSION_CHECK_TEMPLATE) $(V1) $(MKDIR) -p $(BUILD_DIR)/bl_$(1)/dep $(V1) cd $(ROOT_DIR)/flight/targets/Bootloaders/$(2) && \ $$(MAKE) -r --no-print-directory \ diff --git a/make/tools.mk b/make/tools.mk index c1d97e741..a483531a8 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -239,6 +239,15 @@ endif arm_sdk_version: $(V1) $(ARM_SDK_PREFIX)gcc --version | head -n1 +# Template to check ARM toolchain version before building targets +define ARM_GCC_VERSION_CHECK_TEMPLATE + if ! $(ARM_SDK_PREFIX)gcc --version --specs=nano.specs >/dev/null 2>&1; then \ + $(ECHO) $(MSG_NOTICE) Please install ARM toolchain 4.7+ using \'make arm_sdk_install\' && \ + $(ECHO) $(MSG_NOTICE) Older ARM SDKs do not support new \'--specs=nano.specs\' option && \ + exit 1; \ + fi +endef + ############################## # # Qt SDK From 61bb82ca153aa4a6f6704dad7f0d6fcb1af08a30 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Wed, 17 Apr 2013 19:08:02 +0200 Subject: [PATCH 05/11] gcs: find python in tools building with Qt-Creator This fix uses the same approach as OpenPilot toolchain system, but for build started from Qt-Creator. --- .../openpilotgcs/src/app/gcsversioninfo.pri | 26 +++++++++++++++++-- make/tools.mk | 1 + 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/src/app/gcsversioninfo.pri b/ground/openpilotgcs/src/app/gcsversioninfo.pri index 0dbf3e19e..42a695695 100644 --- a/ground/openpilotgcs/src/app/gcsversioninfo.pri +++ b/ground/openpilotgcs/src/app/gcsversioninfo.pri @@ -5,14 +5,36 @@ # the other dependencies evaluation. # +# We use python to extract git version info, but it may be installed locally. +# This expected python version should be kept in sync with make/tools.mk. +PYTHON_DIR = python-2.7.4 + # Since debug_and_release option is set, we need this !debug_and_release|build_pass { - ROOT_DIR = $$GCS_SOURCE_TREE/../.. + + ROOT_DIR = $$GCS_SOURCE_TREE/../.. + + # Search the python using environment override first + OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) + !isEmpty(OPENPILOT_TOOLS_DIR):exists($$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python*) { + PYTHON = $$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python + } else { + # If not found, search the predefined tools path + exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) { + PYTHON = $$ROOT_DIR/tools/$$PYTHON_DIR/python + } else { + # not found, hope it's in the path... + PYTHON = python + } + } + message(Using python interpreter: $$PYTHON) + + # Define other variables VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics VERSION_INFO_HEADER = $$VERSION_INFO_DIR/gcs_version_info.h VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py VERSION_INFO_TEMPLATE = $$ROOT_DIR/make/templates/gcs_version_info_template.h - VERSION_INFO_COMMAND = python \"$$VERSION_INFO_SCRIPT\" + VERSION_INFO_COMMAND = $$PYTHON \"$$VERSION_INFO_SCRIPT\" UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition # Create custom version_info target which generates a header diff --git a/make/tools.mk b/make/tools.mk index a483531a8..ccf59a4c2 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -68,6 +68,7 @@ else ifeq ($(UNAME), Windows) PYTHON_URL := http://wiki.openpilot.org/download/attachments/18612236/python-2.7.4-windows.tar.bz2 endif +# Changing PYTHON_DIR, also update it in ground\openpilotgcs\src\app\gcsversioninfo.pri ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_7-2013q1 QT_SDK_DIR := $(TOOLS_DIR)/qt-4.8.4 MINGW_DIR := $(TOOLS_DIR)/mingw-4.4.0 From f7236eb180681e8ce9c44ed48df366506412c449 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 18 Apr 2013 15:45:38 +0300 Subject: [PATCH 06/11] tools: add Linux 64bit native ARM toolchain --- make/tools.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index ccf59a4c2..adac4a631 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -52,15 +52,16 @@ endif ############################## ifeq ($(UNAME), Linux) - ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2 ifeq ($(ARCH), x86_64) - QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-4.8.4-linux-x64.tar.bz2 + ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux-amd64.tar.bz2 + QT_SDK_URL := "Plese use native Qt 4.8.x package" else - QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-4.8.4-linux.tar.bz2 + ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux-i686.tar.bz2 + QT_SDK_URL := "Plese use native Qt 4.8.x package" endif else ifeq ($(UNAME), Darwin) ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-mac.tar.bz2 - QT_SDK_URL := TODO/qt-4.8.4-mac.tar.bz2 + QT_SDK_URL := "Plese use native Qt 4.8.x package" else ifeq ($(UNAME), Windows) ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-windows.tar.bz2 QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-4.8.4-windows.tar.bz2 From b7de3c99d8de804ff79699e04b57e3ce85404a70 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 18 Apr 2013 16:03:05 +0200 Subject: [PATCH 07/11] tools: fix typo in comments --- make/tools.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index adac4a631..e15d2a69f 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -54,14 +54,14 @@ endif ifeq ($(UNAME), Linux) ifeq ($(ARCH), x86_64) ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux-amd64.tar.bz2 - QT_SDK_URL := "Plese use native Qt 4.8.x package" + QT_SDK_URL := "Please install native Qt 4.8.x SDK using package manager" else ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux-i686.tar.bz2 - QT_SDK_URL := "Plese use native Qt 4.8.x package" + QT_SDK_URL := "Please install native Qt 4.8.x SDK using package manager" endif else ifeq ($(UNAME), Darwin) ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-mac.tar.bz2 - QT_SDK_URL := "Plese use native Qt 4.8.x package" + QT_SDK_URL := "Please install native Qt 4.8.x SDK using package manager" else ifeq ($(UNAME), Windows) ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-windows.tar.bz2 QT_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-4.8.4-windows.tar.bz2 From 509a1b4fe16f0410e360038618416177e08fedc3 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 18 Apr 2013 17:37:12 +0300 Subject: [PATCH 08/11] make: fix *_program targets (were broken for firmware) --- make/apps-defs.mk | 6 ++++++ make/boot-defs.mk | 3 +++ make/common-defs.mk | 6 ------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/make/apps-defs.mk b/make/apps-defs.mk index 20bb858c0..08c6c8211 100644 --- a/make/apps-defs.mk +++ b/make/apps-defs.mk @@ -175,3 +175,9 @@ ifeq ($(MCU),cortex-m3) else ifeq ($(MCU),cortex-m4) LDFLAGS += $(addprefix -T,$(LINKER_SCRIPTS_APP)) endif + +# Add opfw target +$(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) + +# Add jtag targets (program and wipe) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_JTAG_CONFIG),$(OPENOCD_CONFIG))) diff --git a/make/boot-defs.mk b/make/boot-defs.mk index 1e8652be4..e6aaeb22e 100644 --- a/make/boot-defs.mk +++ b/make/boot-defs.mk @@ -126,3 +126,6 @@ ifeq ($(MCU),cortex-m3) else ifeq ($(MCU),cortex-m4) LDFLAGS += $(addprefix -T,$(LINKER_SCRIPTS_BL)) endif + +# Add jtag targets (program and wipe) +$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BL_BANK_BASE),$(BL_BANK_SIZE),$(OPENOCD_JTAG_CONFIG),$(OPENOCD_CONFIG))) diff --git a/make/common-defs.mk b/make/common-defs.mk index 9b927a9a8..6663c8ca2 100644 --- a/make/common-defs.mk +++ b/make/common-defs.mk @@ -225,12 +225,6 @@ $(eval $(call PARTIAL_COMPILE_ARM_TEMPLATE, SRCARM)) $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin -# Add opfw target -$(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) - -# Add jtag targets (program and wipe) -$(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BL_BANK_BASE),$(BL_BANK_SIZE),$(OPENOCD_JTAG_CONFIG),$(OPENOCD_CONFIG))) - .PHONY: elf lss sym hex bin bino opfw elf: $(OUTDIR)/$(TARGET).elf lss: $(OUTDIR)/$(TARGET).lss From f15249ff07d1dc60b07d80dc1ddaed376cc94f33 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 18 Apr 2013 17:50:34 +0300 Subject: [PATCH 09/11] make: fix bu_* targets --- make/apps-defs.mk | 3 --- make/common-defs.mk | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/make/apps-defs.mk b/make/apps-defs.mk index 08c6c8211..e8ff9a016 100644 --- a/make/apps-defs.mk +++ b/make/apps-defs.mk @@ -176,8 +176,5 @@ else ifeq ($(MCU),cortex-m4) LDFLAGS += $(addprefix -T,$(LINKER_SCRIPTS_APP)) endif -# Add opfw target -$(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) - # Add jtag targets (program and wipe) $(eval $(call JTAG_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(FW_BANK_BASE),$(FW_BANK_SIZE),$(OPENOCD_JTAG_CONFIG),$(OPENOCD_CONFIG))) diff --git a/make/common-defs.mk b/make/common-defs.mk index 6663c8ca2..97ee3a818 100644 --- a/make/common-defs.mk +++ b/make/common-defs.mk @@ -223,6 +223,9 @@ $(eval $(call PARTIAL_COMPILE_TEMPLATE, SRC)) # Compile: create assembler files from C source files. ARM only $(eval $(call PARTIAL_COMPILE_ARM_TEMPLATE, SRCARM)) +# Add opfw target +$(eval $(call OPFW_TEMPLATE,$(OUTDIR)/$(TARGET).bin,$(BOARD_TYPE),$(BOARD_REVISION))) + $(OUTDIR)/$(TARGET).bin.o: $(OUTDIR)/$(TARGET).bin .PHONY: elf lss sym hex bin bino opfw From 491e89b1654de5396d8a6871e0cc0d1f7b6feb45 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Fri, 19 Apr 2013 20:43:31 +0200 Subject: [PATCH 10/11] make: sort wildcard sources to make binaries identical on all platforms Thanks to Amedee for finding the cause of the difference and CorvusCorax for participating in the discussion. --- flight/PiOS/Common/Libraries/CMSIS2/library.mk | 2 +- flight/PiOS/Common/Libraries/FreeRTOS/library.mk | 2 +- flight/PiOS/Common/Libraries/dosfs/library.mk | 2 +- flight/PiOS/Common/Libraries/msheap/library.mk | 2 +- flight/PiOS/STM32F10x/library.mk | 10 +++++----- flight/PiOS/STM32F4xx/library.mk | 10 +++++----- flight/PiOS/posix/Libraries/FreeRTOS/library.mk | 2 +- flight/PiOS/posix/library.mk | 6 +++--- make/apps-defs.mk | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/flight/PiOS/Common/Libraries/CMSIS2/library.mk b/flight/PiOS/Common/Libraries/CMSIS2/library.mk index fd9410ad0..e7d8e8572 100644 --- a/flight/PiOS/Common/Libraries/CMSIS2/library.mk +++ b/flight/PiOS/Common/Libraries/CMSIS2/library.mk @@ -11,7 +11,7 @@ ifeq ($(USE_DSP_LIB), YES) CMSIS_DSPLIB := $(CMSIS2_DIR)DSP_Lib/Source # Compile all files into output directory - DSPLIB_SRC := $(wildcard $(CMSIS_DSPLIB)/*/*.c) + DSPLIB_SRC := $(sort $(wildcard $(CMSIS_DSPLIB)/*/*.c)) DSPLIB_SRCBASE := $(notdir $(basename $(DSPLIB_SRC))) $(foreach src, $(DSPLIB_SRC), $(eval $(call COMPILE_C_TEMPLATE, $(src)))) diff --git a/flight/PiOS/Common/Libraries/FreeRTOS/library.mk b/flight/PiOS/Common/Libraries/FreeRTOS/library.mk index 9e101b273..70005c3c6 100644 --- a/flight/PiOS/Common/Libraries/FreeRTOS/library.mk +++ b/flight/PiOS/Common/Libraries/FreeRTOS/library.mk @@ -6,5 +6,5 @@ # FREERTOS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))/Source -SRC += $(wildcard $(FREERTOS_DIR)/*.c) +SRC += $(sort $(wildcard $(FREERTOS_DIR)/*.c)) EXTRAINCDIRS += $(FREERTOS_DIR)/include diff --git a/flight/PiOS/Common/Libraries/dosfs/library.mk b/flight/PiOS/Common/Libraries/dosfs/library.mk index 0e6fa982e..4b8499788 100644 --- a/flight/PiOS/Common/Libraries/dosfs/library.mk +++ b/flight/PiOS/Common/Libraries/dosfs/library.mk @@ -3,5 +3,5 @@ # DOSFS_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -SRC += $(wildcard $(DOSFS_DIR)*.c) +SRC += $(sort $(wildcard $(DOSFS_DIR)*.c)) EXTRAINCDIRS += $(DOSFS_DIR) diff --git a/flight/PiOS/Common/Libraries/msheap/library.mk b/flight/PiOS/Common/Libraries/msheap/library.mk index 84a796e62..80a8b7e25 100644 --- a/flight/PiOS/Common/Libraries/msheap/library.mk +++ b/flight/PiOS/Common/Libraries/msheap/library.mk @@ -3,5 +3,5 @@ # MSHEAP_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -SRC += $(wildcard $(MSHEAP_DIR)*.c) +SRC += $(sort $(wildcard $(MSHEAP_DIR)*.c)) EXTRAINCDIRS += $(MSHEAP_DIR) diff --git a/flight/PiOS/STM32F10x/library.mk b/flight/PiOS/STM32F10x/library.mk index df95cfc72..d0d5a0809 100644 --- a/flight/PiOS/STM32F10x/library.mk +++ b/flight/PiOS/STM32F10x/library.mk @@ -18,7 +18,7 @@ ARCHFLAGS += -mcpu=cortex-m3 --specs=nano.specs ASRC += $(PIOS_DEVLIB)startup_stm32f10x_$(MODEL)$(MODEL_SUFFIX).S # PIOS device library source and includes -SRC += $(wildcard $(PIOS_DEVLIB)*.c) +SRC += $(sort $(wildcard $(PIOS_DEVLIB)*.c)) # CMSIS for the F1 include $(PIOS)/Common/Libraries/CMSIS2/library.mk @@ -29,12 +29,12 @@ EXTRAINCDIRS += $(CMSIS_DIR) # ST Peripheral library PERIPHLIB = $(PIOS_DEVLIB)Libraries/STM32F10x_StdPeriph_Driver -SRC += $(wildcard $(PERIPHLIB)/src/*.c) +SRC += $(sort $(wildcard $(PERIPHLIB)/src/*.c)) EXTRAINCDIRS += $(PERIPHLIB)/inc # ST USB Device library USBDEVLIB = $(PIOS_DEVLIB)Libraries/STM32_USB-FS-Device_Driver -SRC += $(wildcard $(USBDEVLIB)/src/*.c) +SRC += $(sort $(wildcard $(USBDEVLIB)/src/*.c)) EXTRAINCDIRS += $(USBDEVLIB)/inc # @@ -45,7 +45,7 @@ EXTRAINCDIRS += $(USBDEVLIB)/inc # ifneq ($(FREERTOS_DIR),) FREERTOS_PORTDIR := $(PIOS_DEVLIB)Libraries/FreeRTOS/Source - SRC += $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM3/*.c) - SRC += $(wildcard $(FREERTOS_PORTDIR)/portable/MemMang/heap_1.c) + SRC += $(sort $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM3/*.c)) + SRC += $(sort $(wildcard $(FREERTOS_PORTDIR)/portable/MemMang/heap_1.c)) EXTRAINCDIRS += $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM3 endif diff --git a/flight/PiOS/STM32F4xx/library.mk b/flight/PiOS/STM32F4xx/library.mk index 531dbbfb2..a38b2720d 100644 --- a/flight/PiOS/STM32F4xx/library.mk +++ b/flight/PiOS/STM32F4xx/library.mk @@ -20,18 +20,18 @@ CDEFS += -DARM_MATH_CM4 -D__FPU_PRESENT=1 ARCHFLAGS += -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16 -mfloat-abi=hard # PIOS device library source and includes -SRC += $(wildcard $(PIOS_DEVLIB)*.c) +SRC += $(sort $(wildcard $(PIOS_DEVLIB)*.c)) EXTRAINCDIRS += $(PIOS_DEVLIB)inc # CMSIS for the F4 include $(PIOSCOMMON)/Libraries/CMSIS2/library.mk CMSIS2_DEVICEDIR := $(PIOS_DEVLIB)Libraries/CMSIS2/Device/ST/STM32F4xx -SRC += $(wildcard $(CMSIS2_DEVICEDIR)/Source/$(BOARD_NAME)/*.c) +SRC += $(sort $(wildcard $(CMSIS2_DEVICEDIR)/Source/$(BOARD_NAME)/*.c)) EXTRAINCDIRS += $(CMSIS2_DEVICEDIR)/Include # ST Peripheral library PERIPHLIB = $(PIOS_DEVLIB)Libraries/STM32F4xx_StdPeriph_Driver -SRC += $(wildcard $(PERIPHLIB)/src/*.c) +SRC += $(sort $(wildcard $(PERIPHLIB)/src/*.c)) EXTRAINCDIRS += $(PERIPHLIB)/inc # ST USB OTG library @@ -42,7 +42,7 @@ EXTRAINCDIRS += $(USBOTGLIB)/inc # ST USB Device library USBDEVLIB = $(PIOS_DEVLIB)Libraries/STM32_USB_Device_Library -SRC += $(wildcard $(USBDEVLIB)/Core/src/*.c) +SRC += $(sort $(wildcard $(USBDEVLIB)/Core/src/*.c)) EXTRAINCDIRS += $(USBDEVLIB)/Core/inc # @@ -53,7 +53,7 @@ EXTRAINCDIRS += $(USBDEVLIB)/Core/inc # ifneq ($(FREERTOS_DIR),) FREERTOS_PORTDIR := $(PIOS_DEVLIB)Libraries/FreeRTOS/Source - SRC += $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM4F/*.c) + SRC += $(sort $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM4F/*.c)) EXTRAINCDIRS += $(FREERTOS_PORTDIR)/portable/GCC/ARM_CM4F include $(PIOSCOMMON)/Libraries/msheap/library.mk endif diff --git a/flight/PiOS/posix/Libraries/FreeRTOS/library.mk b/flight/PiOS/posix/Libraries/FreeRTOS/library.mk index c6267255f..08381319f 100644 --- a/flight/PiOS/posix/Libraries/FreeRTOS/library.mk +++ b/flight/PiOS/posix/Libraries/FreeRTOS/library.mk @@ -6,5 +6,5 @@ # FREERTOS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))/Source -SRC += $(wildcard $(FREERTOS_DIR)/*.c) +SRC += $(sort $(wildcard $(FREERTOS_DIR)/*.c)) EXTRAINCDIRS += $(FREERTOS_DIR)/include diff --git a/flight/PiOS/posix/library.mk b/flight/PiOS/posix/library.mk index 530431210..79cadc5c7 100644 --- a/flight/PiOS/posix/library.mk +++ b/flight/PiOS/posix/library.mk @@ -27,7 +27,7 @@ ARCHFLAGS += -DARCH_POSIX # # PIOS device library source and includes # -SRC += $(wildcard $(PIOS_DEVLIB)*.c) +SRC += $(sort $(wildcard $(PIOS_DEVLIB)*.c)) EXTRAINCDIRS += $(PIOS_DEVLIB)/inc # @@ -68,8 +68,8 @@ EXTRAINCDIRS += $(PIOS_DEVLIB)/inc # ifneq ($(FREERTOS_DIR),) FREERTOS_PORTDIR := $(PIOS_DEVLIB)/Libraries/FreeRTOS/Source -SRC += $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/Posix/*.c) -SRC += $(wildcard $(FREERTOS_PORTDIR)/portable/MemMang/*.c) +SRC += $(sort $(wildcard $(FREERTOS_PORTDIR)/portable/GCC/Posix/*.c)) +SRC += $(sort $(wildcard $(FREERTOS_PORTDIR)/portable/MemMang/*.c)) EXTRAINCDIRS += $(FREERTOS_PORTDIR)/portable/GCC/Posix endif diff --git a/make/apps-defs.mk b/make/apps-defs.mk index e8ff9a016..1f23dc493 100644 --- a/make/apps-defs.mk +++ b/make/apps-defs.mk @@ -101,8 +101,8 @@ SRC += $(MATHLIB)/sin_lookup.c SRC += $(MATHLIB)/pid.c ## Modules -SRC += $(foreach mod, $(MODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c)) -SRC += $(foreach mod, $(OPTMODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c)) +SRC += $(foreach mod, $(MODULES), $(sort $(wildcard $(OPMODULEDIR)/$(mod)/*.c))) +SRC += $(foreach mod, $(OPTMODULES), $(sort $(wildcard $(OPMODULEDIR)/$(mod)/*.c))) # Declare all non-optional modules as built-in to force inclusion. # Built-in modules are always enabled and cannot be disabled. From 5e942bbd6dc166cded71b2a8e00306dc87a76532 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Fri, 19 Apr 2013 22:54:55 +0300 Subject: [PATCH 11/11] gcs: fix weird Windows build error if python is called w/o quotes This fixes two problems: - if OPENPILOT_TOOLS_DIR is set using backslashes, they should be converted to forward ones. Otherwise on Windows it can't run the program. - for some weird reason the python called without quotes (regardless of full path used or not) tries to open whole command line as a file instead of the 1st parameter only. This works as it should from bash prompt. But executed by make it fails on Windows. --- ground/openpilotgcs/src/app/gcsversioninfo.pri | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/app/gcsversioninfo.pri b/ground/openpilotgcs/src/app/gcsversioninfo.pri index 42a695695..cc1d9c629 100644 --- a/ground/openpilotgcs/src/app/gcsversioninfo.pri +++ b/ground/openpilotgcs/src/app/gcsversioninfo.pri @@ -17,16 +17,17 @@ PYTHON_DIR = python-2.7.4 # Search the python using environment override first OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) !isEmpty(OPENPILOT_TOOLS_DIR):exists($$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python*) { - PYTHON = $$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python + PYTHON = \"$$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python\" } else { # If not found, search the predefined tools path exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) { - PYTHON = $$ROOT_DIR/tools/$$PYTHON_DIR/python + PYTHON = \"$$ROOT_DIR/tools/$$PYTHON_DIR/python\" } else { # not found, hope it's in the path... - PYTHON = python + PYTHON = \"python\" } } + PYTHON = $$replace(PYTHON, \\\\, /) message(Using python interpreter: $$PYTHON) # Define other variables