1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

LP-99 Decouple flight build

Moved flight make code into flight/Makefile. This should speed up
rebuilds for GCS and keeps the top level Makefile tidier.

Change-Id: I9d33cb5c223b6a8ed2821435a5d63ecf4b97c6b8
This commit is contained in:
James Duley 2015-08-02 16:01:14 +01:00
parent d207f848ee
commit e308039206
40 changed files with 531 additions and 507 deletions

256
Makefile
View File

@ -47,11 +47,12 @@ export DL_DIR
export TOOLS_DIR
# Set up some macros for common directories within the tree
export BUILD_DIR := $(CURDIR)/build
export PACKAGE_DIR := $(BUILD_DIR)/package
export DIST_DIR := $(BUILD_DIR)/dist
export BUILD_DIR := $(CURDIR)/build
export PACKAGE_DIR := $(BUILD_DIR)/package
export DIST_DIR := $(BUILD_DIR)/dist
export OPGCSSYNTHDIR := $(BUILD_DIR)/gcs-synthetics
DIRS := $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR)
DIRS := $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) $(OPGCSSYNTHDIR)
# Naming for binaries and packaging etc,.
export ORG_BIG_NAME := LibrePilot
@ -135,6 +136,9 @@ else ifeq ($(UNAME), Windows)
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
endif
export UAVOBJGENERATOR
##############################
#
# All targets
#
@ -195,55 +199,6 @@ uavobjects_clean:
#
##############################
# Define some pointers to the various important pieces of the flight code
# to prevent these being repeated in every sub makefile
export PIOS := $(ROOT_DIR)/flight/pios
export FLIGHTLIB := $(ROOT_DIR)/flight/libraries
export OPMODULEDIR := $(ROOT_DIR)/flight/modules
export OPUAVOBJ := $(ROOT_DIR)/flight/uavobjects
export OPUAVTALK := $(ROOT_DIR)/flight/uavtalk
export OPUAVSYNTHDIR := $(BUILD_DIR)/uavobject-synthetics/flight
export OPGCSSYNTHDIR := $(BUILD_DIR)/gcs-synthetics
DIRS += $(OPGCSSYNTHDIR)
# Define supported board lists
ALL_BOARDS := coptercontrol oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum revonano
# Short names of each board (used to display board name in parallel builds)
coptercontrol_short := 'cc '
oplinkmini_short := 'oplm'
revolution_short := 'revo'
osd_short := 'osd '
revoproto_short := 'revp'
revonano_short := 'revn'
simposix_short := 'posx'
discoveryf4bare_short := 'df4b'
gpsplatinum_short := 'gps9'
# SimPosix only builds on Linux so drop it from the list for
# all other platforms.
ifneq ($(UNAME), Linux)
ALL_BOARDS := $(filter-out simposix, $(ALL_BOARDS))
endif
# Start out assuming that we'll build fw, bl and bu for all boards
FW_BOARDS := $(ALL_BOARDS)
BL_BOARDS := $(ALL_BOARDS)
BU_BOARDS := $(ALL_BOARDS)
EF_BOARDS := $(ALL_BOARDS)
# SimPosix doesn't have a BL, BU or EF target so we need to
# filter them out to prevent errors on the all_flight target.
BL_BOARDS := $(filter-out simposix, $(BL_BOARDS))
BU_BOARDS := $(filter-out simposix gpsplatinum, $(BU_BOARDS))
EF_BOARDS := $(filter-out simposix, $(EF_BOARDS))
# Generate the targets for whatever boards are left in each list
FW_TARGETS := $(addprefix fw_, $(FW_BOARDS))
BL_TARGETS := $(addprefix bl_, $(BL_BOARDS))
BU_TARGETS := $(addprefix bu_, $(BU_BOARDS))
EF_TARGETS := $(addprefix ef_, $(EF_BOARDS))
# When building any of the "all_*" targets, tell all sub makefiles to display
# additional details on each line of output to describe which build and target
@ -259,190 +214,10 @@ ifneq ($(word 2,$(MAKECMDGOALS)),)
export ENABLE_MSG_EXTRA := yes
endif
# TEMPLATES (used to generate build rules)
FLIGHT_OUT_DIR := $(BUILD_DIR)/firmware
DIRS += $(FLIGHT_OUT_DIR)
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define FW_TEMPLATE
.PHONY: $(1) fw_$(1)
$(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/boards/$(1)/firmware && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=fw \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(ROOT_DIR)/flight/targets/boards/$(1)/firmware \
OUTDIR=$(BUILD_DIR)/fw_$(1) \
TARGET=fw_$(1) \
$$*
.PHONY: $(1)_clean
$(1)_clean: fw_$(1)_clean
fw_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/fw_$(1))"
$(V1) $(RM) -fr $(BUILD_DIR)/fw_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define BL_TEMPLATE
.PHONY: bl_$(1)
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/boards/$(1)/bootloader && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=bl \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(ROOT_DIR)/flight/targets/boards/$(1)/bootloader \
OUTDIR=$(BUILD_DIR)/bl_$(1) \
TARGET=bl_$(1) \
$$*
.PHONY: unbrick_$(1)
unbrick_$(1): bl_$(1)_hex
$(if $(filter-out undefined,$(origin UNBRICK_TTY)),
$(V0) @$(ECHO) " UNBRICK $(1) via $$(UNBRICK_TTY)"
$(V1) $(STM32FLASH_DIR)/stm32flash \
-w $(BUILD_DIR)/bl_$(1)/bl_$(1).hex \
-g 0x0 \
$$(UNBRICK_TTY)
,
$(V0) @$(ECHO)
$(V0) @$(ECHO) "ERROR: You must specify UNBRICK_TTY=<serial-device> to use for unbricking."
$(V0) @$(ECHO) " eg. $$(MAKE) $$@ UNBRICK_TTY=/dev/ttyUSB0"
)
.PHONY: bl_$(1)_clean
bl_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/bl_$(1))"
$(V1) $(RM) -fr $(BUILD_DIR)/bl_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define BU_TEMPLATE
.PHONY: bu_$(1)
bu_$(1): bu_$(1)_opfw
bu_$(1)_%: bl_$(1)_bino
$(V1) $(MKDIR) -p $(BUILD_DIR)/bu_$(1)/dep
$(V1) cd $(ROOT_DIR)/flight/targets/common/bootloader_updater && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=bu \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(ROOT_DIR)/flight/targets/common/bootloader_updater \
OUTDIR=$(BUILD_DIR)/bu_$(1) \
TARGET=bu_$(1) \
$$*
.PHONY: bu_$(1)_clean
bu_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/bu_$(1))"
$(V1) $(RM) -fr $(BUILD_DIR)/bu_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define EF_TEMPLATE
.PHONY: ef_$(1)
ef_$(1): ef_$(1)_bin
ef_$(1)_%: bl_$(1)_bin fw_$(1)_opfw
$(V1) $(MKDIR) -p $(BUILD_DIR)/ef_$(1)
$(V1) cd $(ROOT_DIR)/flight/targets/common/entire_flash && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=ef \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
DFU_CMD="$(DFUUTIL_DIR)/bin/dfu-util" \
TOPDIR=$(ROOT_DIR)/flight/targets/common/entire_flash \
OUTDIR=$(BUILD_DIR)/ef_$(1) \
TARGET=ef_$(1) \
$$*
.PHONY: ef_$(1)_clean
ef_$(1)_clean:
@$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/ef_$(1))"
$(V1) $(RM) -fr $(BUILD_DIR)/ef_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
define BOARD_PHONY_TEMPLATE
.PHONY: all_$(1)
all_$(1): $$(filter fw_$(1), $$(FW_TARGETS))
all_$(1): $$(filter bl_$(1), $$(BL_TARGETS))
all_$(1): $$(filter bu_$(1), $$(BU_TARGETS))
all_$(1): $$(filter ef_$(1), $$(EF_TARGETS))
.PHONY: all_$(1)_clean
all_$(1)_clean: $$(addsuffix _clean, $$(filter fw_$(1), $$(FW_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter bl_$(1), $$(BL_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter bu_$(1), $$(BU_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter ef_$(1), $$(EF_TARGETS)))
endef
# Generate flight build rules
.PHONY: all_fw all_fw_clean
all_fw: $(addsuffix _opfw, $(FW_TARGETS))
all_fw_clean: $(addsuffix _clean, $(FW_TARGETS))
.PHONY: all_bl all_bl_clean
all_bl: $(addsuffix _bin, $(BL_TARGETS))
all_bl_clean: $(addsuffix _clean, $(BL_TARGETS))
.PHONY: all_bu all_bu_clean
all_bu: $(addsuffix _opfw, $(BU_TARGETS))
all_bu_clean: $(addsuffix _clean, $(BU_TARGETS))
.PHONY: all_ef all_ef_clean
all_ef: $(EF_TARGETS)
all_ef_clean: $(addsuffix _clean, $(EF_TARGETS))
.PHONY: all_flight all_flight_clean
all_flight: all_fw all_bl all_bu all_ef
all_flight_clean: all_fw_clean all_bl_clean all_bu_clean all_ef_clean
# Expand the groups of targets for each board
$(foreach board, $(ALL_BOARDS), $(eval $(call BOARD_PHONY_TEMPLATE,$(board))))
# Expand the firmware rules
$(foreach board, $(ALL_BOARDS), $(eval $(call FW_TEMPLATE,$(board),$($(board)_short))))
# Expand the bootloader rules
$(foreach board, $(ALL_BOARDS), $(eval $(call BL_TEMPLATE,$(board),$($(board)_short))))
# Expand the bootloader updater rules
$(foreach board, $(ALL_BOARDS), $(eval $(call BU_TEMPLATE,$(board),$($(board)_short))))
# Expand the entire-flash rules
$(foreach board, $(ALL_BOARDS), $(eval $(call EF_TEMPLATE,$(board),$($(board)_short))))
.PHONY: sim_win32
sim_win32: sim_win32_exe
sim_win32_%: uavobjects_flight
$(V1) $(MKDIR) -p $(BUILD_DIR)/sitl_win32
$(V1) $(MAKE) --no-print-directory \
-C $(ROOT_DIR)/flight/targets/OpenPilot --file=$(ROOT_DIR)/flight/targets/OpenPilot/Makefile.win32 $*
.PHONY: sim_osx
sim_osx: sim_osx_elf
sim_osx_%: uavobjects_flight
$(V1) $(MKDIR) -p $(BUILD_DIR)/sim_osx
$(V1) $(MAKE) --no-print-directory \
-C $(ROOT_DIR)/flight/targets/SensorTest --file=$(ROOT_DIR)/flight/targets/SensorTest/Makefile.osx $*
include $(ROOT_DIR)/flight/Makefile
##############################
#
@ -686,18 +461,15 @@ endif
# Packaging components
#
##############################
# Firmware files to package
PACKAGE_FW_EXCLUDE := fw_simposix $(if $(PACKAGE_FW_INCLUDE_DISCOVERYF4BARE),,fw_discoveryf4bare)
PACKAGE_FW_TARGETS := $(filter-out $(PACKAGE_FW_EXCLUDE), $(FW_TARGETS))
PACKAGE_ELF_TARGETS := $(filter fw_simposix, $(FW_TARGETS))
PACKAGE_FW_TARGETS := fw_coptercontrol fw_oplinkmini fw_revolution fw_osd fw_revoproto fw_gpsplatinum fw_revonano
# Rules to generate GCS resources used to embed firmware binaries into the GCS.
# They are used later by the vehicle setup wizard to update board firmware.
# To open a firmware image use ":/firmware/fw_coptercontrol.opfw"
OPFW_RESOURCE := $(OPGCSSYNTHDIR)/opfw_resource.qrc
OPFW_RESOURCE_PREFIX := ../../
OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(call toprel, $(BUILD_DIR)/$(fw_targ)/$(fw_targ).opfw))
OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(call toprel, $(FLIGHT_OUT_DIR)/$(fw_targ)/$(fw_targ).opfw))
OPFW_CONTENTS := \
<!DOCTYPE RCC><RCC version="1.0"> \
<qresource prefix="/firmware"> \
@ -708,7 +480,7 @@ OPFW_CONTENTS := \
.PHONY: opfw_resource
opfw_resource: $(OPFW_RESOURCE)
$(OPFW_RESOURCE): $(FW_TARGETS) | $(OPGCSSYNTHDIR)
$(OPFW_RESOURCE): $(PACKAGE_FW_TARGETS) | $(OPGCSSYNTHDIR)
@$(ECHO) Generating OPFW resource file $(call toprel, $@)
$(V1) $(ECHO) $(QUOTE)$(OPFW_CONTENTS)$(QUOTE) > $@

256
flight/Makefile Normal file
View File

@ -0,0 +1,256 @@
export FLIGHT_MAKEFILE := TRUE
export FLIGHT_ROOT_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
export PIOS := $(FLIGHT_ROOT_DIR)/pios
export FLIGHTLIB := $(FLIGHT_ROOT_DIR)/libraries
export OPMODULEDIR := $(FLIGHT_ROOT_DIR)/modules
export OPUAVOBJ := $(FLIGHT_ROOT_DIR)/uavobjects
export OPUAVTALK := $(FLIGHT_ROOT_DIR)/uavtalk
export FLIGHT_OUT_DIR ?= $(CURDIR)
# Define supported board lists
ALL_BOARDS := coptercontrol oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum revonano
# Short names of each board (used to display board name in parallel builds)
coptercontrol_short := 'cc '
oplinkmini_short := 'oplm'
revolution_short := 'revo'
osd_short := 'osd '
revoproto_short := 'revp'
revonano_short := 'revn'
simposix_short := 'posx'
discoveryf4bare_short := 'df4b'
gpsplatinum_short := 'gps9'
# SimPosix only builds on Linux so drop it from the list for
# all other platforms.
ifneq ($(UNAME), Linux)
ALL_BOARDS := $(filter-out simposix, $(ALL_BOARDS))
endif
# Start out assuming that we'll build fw, bl and bu for all boards
FW_BOARDS := $(ALL_BOARDS)
BL_BOARDS := $(ALL_BOARDS)
BU_BOARDS := $(ALL_BOARDS)
EF_BOARDS := $(ALL_BOARDS)
# SimPosix doesn't have a BL, BU or EF target so we need to
# filter them out to prevent errors on the all_flight target.
BL_BOARDS := $(filter-out simposix, $(BL_BOARDS))
BU_BOARDS := $(filter-out simposix gpsplatinum, $(BU_BOARDS))
EF_BOARDS := $(filter-out simposix, $(EF_BOARDS))
# Generate the targets for whatever boards are left in each list
FW_TARGETS := $(addprefix fw_, $(FW_BOARDS))
BL_TARGETS := $(addprefix bl_, $(BL_BOARDS))
BU_TARGETS := $(addprefix bu_, $(BU_BOARDS))
EF_TARGETS := $(addprefix ef_, $(EF_BOARDS))
ALL_FLIGHT := all_fw all_bl all_bu all_ef
ALL_FLIGHT_CLEAN := $(addsuffix _clean,$(ALL_FLIGHT))
.PHONY: all_flight all_flight_clean
all_flight: $(ALL_FLIGHT)
all_flight_clean: $(ALL_FLIGHT_CLEAN)
# TEMPLATES (used to generate build rules)
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define FW_TEMPLATE
.PHONY: $(1) fw_$(1)
$(1): fw_$(1)_opfw
fw_$(1): fw_$(1)_opfw
fw_$(1)_%: flight_uavobjects
$(V1) $$(ARM_GCC_VERSION_CHECK_TEMPLATE)
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/fw_$(1)/dep
$(V1) cd $(FLIGHT_ROOT_DIR)/targets/boards/$(1)/firmware && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=fw \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(FLIGHT_ROOT_DIR)/targets/boards/$(1)/firmware \
OUTDIR=$(FLIGHT_OUT_DIR)/fw_$(1) \
TARGET=fw_$(1) \
$$*
.PHONY: $(1)_clean
$(1)_clean: fw_$(1)_clean
fw_$(1)_clean:
@echo " CLEAN $(call toprel, $(FLIGHT_OUT_DIR)/fw_$(1))"
$(V1) rm -fr $(FLIGHT_OUT_DIR)/fw_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define BL_TEMPLATE
.PHONY: bl_$(1)
bl_$(1): bl_$(1)_bin
bl_$(1)_bino: bl_$(1)_bin
bl_$(1)_%:
$(V1) $$(ARM_GCC_VERSION_CHECK_TEMPLATE)
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/bl_$(1)/dep
$(V1) cd $(FLIGHT_ROOT_DIR)/targets/boards/$(1)/bootloader && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=bl \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(FLIGHT_ROOT_DIR)/targets/boards/$(1)/bootloader \
OUTDIR=$(FLIGHT_OUT_DIR)/bl_$(1) \
TARGET=bl_$(1) \
$$*
.PHONY: unbrick_$(1)
unbrick_$(1): bl_$(1)_hex
$(if $(filter-out undefined,$(origin UNBRICK_TTY)),
$(V0) @echo " UNBRICK $(1) via $$(UNBRICK_TTY)"
$(V1) $(STM32FLASH_DIR)/stm32flash \
-w $(FLIGHT_OUT_DIR)/bl_$(1)/bl_$(1).hex \
-g 0x0 \
$$(UNBRICK_TTY)
,
$(V0) @echo
$(V0) @echo "ERROR: You must specify UNBRICK_TTY=<serial-device> to use for unbricking."
$(V0) @echo " eg. $$(MAKE) $$@ UNBRICK_TTY=/dev/ttyUSB0"
)
.PHONY: bl_$(1)_clean
bl_$(1)_clean:
@echo " CLEAN $(call toprel, $(FLIGHT_OUT_DIR)/bl_$(1))"
$(V1) rm -fr $(FLIGHT_OUT_DIR)/bl_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define BU_TEMPLATE
.PHONY: bu_$(1)
bu_$(1): bu_$(1)_opfw
bu_$(1)_%: bl_$(1)_bino
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/bu_$(1)/dep
$(V1) cd $(FLIGHT_ROOT_DIR)/targets/common/bootloader_updater && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=bu \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
TOPDIR=$(FLIGHT_ROOT_DIR)/targets/common/bootloader_updater \
OUTDIR=$(FLIGHT_OUT_DIR)/bu_$(1) \
TARGET=bu_$(1) \
$$*
.PHONY: bu_$(1)_clean
bu_$(1)_clean:
@echo " CLEAN $(call toprel, $(FLIGHT_OUT_DIR)/bu_$(1))"
$(V1) rm -fr $(FLIGHT_OUT_DIR)/bu_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
# $(2) = Short name for board (e.g cc)
define EF_TEMPLATE
.PHONY: ef_$(1)
ef_$(1): ef_$(1)_bin
ef_$(1)_%: bl_$(1)_bin fw_$(1)_opfw
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/ef_$(1)
$(V1) cd $(FLIGHT_ROOT_DIR)/targets/common/entire_flash && \
$$(MAKE) -r --no-print-directory \
BUILD_TYPE=ef \
BOARD_NAME=$(1) \
BOARD_SHORT_NAME=$(2) \
DFU_CMD="$(DFUUTIL_DIR)/bin/dfu-util" \
TOPDIR=$(FLIGHT_ROOT_DIR)/targets/common/entire_flash \
OUTDIR=$(FLIGHT_OUT_DIR)/ef_$(1) \
TARGET=ef_$(1) \
$$*
.PHONY: ef_$(1)_clean
ef_$(1)_clean:
@echo " CLEAN $(call toprel, $(FLIGHT_OUT_DIR)/ef_$(1))"
$(V1) rm -fr $(FLIGHT_OUT_DIR)/ef_$(1)
endef
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
define BOARD_PHONY_TEMPLATE
.PHONY: all_$(1)
all_$(1): $$(filter fw_$(1), $$(FW_TARGETS))
all_$(1): $$(filter bl_$(1), $$(BL_TARGETS))
all_$(1): $$(filter bu_$(1), $$(BU_TARGETS))
all_$(1): $$(filter ef_$(1), $$(EF_TARGETS))
.PHONY: all_$(1)_clean
all_$(1)_clean: $$(addsuffix _clean, $$(filter fw_$(1), $$(FW_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter bl_$(1), $$(BL_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter bu_$(1), $$(BU_TARGETS)))
all_$(1)_clean: $$(addsuffix _clean, $$(filter ef_$(1), $$(EF_TARGETS)))
endef
# Generate flight build rules
.PHONY: first
first: all_fw
.PHONY: all_fw all_fw_clean
all_fw: $(addsuffix _opfw, $(FW_TARGETS))
all_fw_clean: $(addsuffix _clean, $(FW_TARGETS))
.PHONY: all_bl all_bl_clean
all_bl: $(addsuffix _bin, $(BL_TARGETS))
all_bl_clean: $(addsuffix _clean, $(BL_TARGETS))
.PHONY: all_bu all_bu_clean
all_bu: $(addsuffix _opfw, $(BU_TARGETS))
all_bu_clean: $(addsuffix _clean, $(BU_TARGETS))
.PHONY: all_ef all_ef_clean
all_ef: $(EF_TARGETS)
all_ef_clean: $(addsuffix _clean, $(EF_TARGETS))
# Expand the groups of targets for each board
$(foreach board, $(ALL_BOARDS), $(eval $(call BOARD_PHONY_TEMPLATE,$(board))))
# Expand the firmware rules
$(foreach board, $(ALL_BOARDS), $(eval $(call FW_TEMPLATE,$(board),$($(board)_short))))
# Expand the bootloader rules
$(foreach board, $(ALL_BOARDS), $(eval $(call BL_TEMPLATE,$(board),$($(board)_short))))
# Expand the bootloader updater rules
$(foreach board, $(ALL_BOARDS), $(eval $(call BU_TEMPLATE,$(board),$($(board)_short))))
# Expand the entire-flash rules
$(foreach board, $(ALL_BOARDS), $(eval $(call EF_TEMPLATE,$(board),$($(board)_short))))
.PHONY: sim_win32
sim_win32: sim_win32_exe
sim_win32_%: flight_uavobjects
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/sitl_win32
$(V1) $(MAKE) --no-print-directory \
-C $(FLIGHT_ROOT_DIR)/targets/OpenPilot --file=$(FLIGHT_ROOT_DIR)/targets/OpenPilot/Makefile.win32 $*
.PHONY: sim_osx
sim_osx: sim_osx_elf
sim_osx_%: flight_uavobjects
$(V1) mkdir -p $(FLIGHT_OUT_DIR)/sim_osx
$(V1) $(MAKE) --no-print-directory \
-C $(FLIGHT_ROOT_DIR)/targets/SensorTest --file=$(FLIGHT_ROOT_DIR)/targets/SensorTest/Makefile.osx $*
##############################
#
# UAV Objects
#
##############################
UAVOBJGENERATOR ?= $(shell which uavobjgenerator)
UAVOBJ_XML_DIR := $(FLIGHT_ROOT_DIR)/../shared/uavobjectdefinition
export FLIGHT_UAVOBJ_DIR := $(FLIGHT_OUT_DIR)/uavobjects
.PHONY: flight_uavobjects
flight_uavobjects: $(UAVOBJGENERATOR)
@mkdir -p $(FLIGHT_UAVOBJ_DIR)
$(V1) cd $(FLIGHT_UAVOBJ_DIR) && \
$(UAVOBJGENERATOR) -flight $(UAVOBJ_XML_DIR) $(FLIGHT_ROOT_DIR)/..

View File

@ -43,4 +43,4 @@ $(TARGET)_nat.c $(TARGET)_img.c: $(PM_USR_SOURCES) pmfeatures.py
clean :
$(MAKE) -C ../../vm clean
$(RM) $(TARGET).out $(OBJS) $(TARGET)_img.* $(TARGET)_nat.* pmfeatures.h
rm $(TARGET).out $(OBJS) $(TARGET)_img.* $(TARGET)_nat.* pmfeatures.h

View File

@ -40,13 +40,13 @@ PYSCRIPTS += $(wildcard $(FLIGHTPLANS)/*.py)
$(PYSRC): | $(PYLIB) $(OUTDIR)/pmfeatures.h
$(OUTDIR)/pmfeatures.h: $(PYSCRIPTS)
@$(ECHO) $(MSG_PYMITEINIT) $(call toprel, $@)
@echo $(MSG_PYMITEINIT) $(call toprel, $@)
$(V1) $(PYTHON) $(PYMITETOOLS)/pmGenPmFeatures.py $(PYMITEPLAT)/pmfeatures.py > $@
$(OUTDIR)/pmlib_img.c: | $(OUTDIR)/pmlib_nat.c
$(OUTDIR)/pmlib_nat.c: $(PYSCRIPTS)
@$(ECHO) $(MSG_PYMITEINIT) $(call toprel, $@)
@echo $(MSG_PYMITEINIT) $(call toprel, $@)
$(V1) $(PYTHON) $(PYMITETOOLS)/pmImgCreator.py -c -s --memspace=flash \
-f $(PYMITEPLAT)/pmfeatures.py \
-o $(OUTDIR)/pmlib_img.c \
@ -61,7 +61,7 @@ $(OUTDIR)/pmlib_nat.c: $(PYSCRIPTS)
$(OUTDIR)/pmlibusr_img.c: | $(OUTDIR)/pmlibusr_nat.c
$(OUTDIR)/pmlibusr_nat.c: $(PYSCRIPTS)
@$(ECHO) $(MSG_PYMITEINIT) $(call toprel, $@)
@echo $(MSG_PYMITEINIT) $(call toprel, $@)
$(V1) $(PYTHON) $(PYMITETOOLS)/pmImgCreator.py -c -u \
-f $(PYMITEPLAT)/pmfeatures.py \
-o $(OUTDIR)/pmlibusr_img.c \

View File

@ -29,7 +29,7 @@ TARGETS = $(TARGET_LIB) $(TEST_PROGS)
all: $(TARGETS)
$(TARGET_LIB): $(LIB_OBJS)
$(RM) $@
rm $@
$(AR) cq $@ $(LIB_OBJS)
if [ "$(RANLIB)" ]; then $(RANLIB) $@; fi

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -138,7 +138,7 @@ 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.
MODNAMES := $(notdir $(subst /revolution,,$(MODULES)))
MODULES_BUILTIN := $(foreach mod, $(MODNAMES), -DMODULE_$(shell $(ECHO) $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN)
MODULES_BUILTIN := $(foreach mod, $(MODNAMES), -DMODULE_$(shell echo $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN)
CDEFS += $(MODULES_BUILTIN)
# List C source files here which must be compiled in ARM-Mode (no -mthumb).
@ -177,7 +177,7 @@ EXTRAINCDIRS += $(MATHLIBINC)
EXTRAINCDIRS += $(PIDLIBINC)
EXTRAINCDIRS += $(OPUAVOBJINC)
EXTRAINCDIRS += $(OPUAVTALKINC)
EXTRAINCDIRS += $(OPUAVSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
# Modules
EXTRAINCDIRS += $(foreach mod, $(OPTMODULES) $(MODULES), $(OPMODULEDIR)/$(mod)/inc) $(OPMODULEDIR)/System/inc

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif

View File

@ -16,7 +16,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -234,7 +234,7 @@ endif
# Generate code for PyMite
# $(OUTDIR)/pmlib_img.c $(OUTDIR)/pmlib_nat.c $(OUTDIR)/pmlibusr_img.c $(OUTDIR)/pmlibusr_nat.c $(OUTDIR)/pmfeatures.h: $(wildcard $(PYMITELIB)/*.py) $(wildcard $(PYMITEPLAT)/*.py) $(wildcard $(FLIGHTPLANLIB)/*.py) $(wildcard $(FLIGHTPLANS)/*.py)
# @$(ECHO) $(MSG_PYMITEINIT) $(call toprel, $@)
# @echo $(MSG_PYMITEINIT) $(call toprel, $@)
# @$(PYTHON) $(PYMITETOOLS)/pmImgCreator.py -f $(PYMITEPLAT)/pmfeatures.py -c -s --memspace=flash -o $(OUTDIR)/pmlib_img.c --native-file=$(OUTDIR)/pmlib_nat.c $(PYMITELIB)/list.py $(PYMITELIB)/dict.py $(PYMITELIB)/__bi.py $(PYMITELIB)/sys.py $(PYMITELIB)/string.py $(wildcard $(FLIGHTPLANLIB)/*.py)
# @$(PYTHON) $(PYMITETOOLS)/pmGenPmFeatures.py $(PYMITEPLAT)/pmfeatures.py > $(OUTDIR)/pmfeatures.h
# @$(PYTHON) $(PYMITETOOLS)/pmImgCreator.py -f $(PYMITEPLAT)/pmfeatures.py -c -u -o $(OUTDIR)/pmlibusr_img.c --native-file=$(OUTDIR)/pmlibusr_nat.c $(FLIGHTPLANS)/test.py
@ -292,30 +292,30 @@ $(eval $(call SIZE_TEMPLATE, $(OUTDIR)/$(TARGET).elf))
# Target: clean project
clean:
@echo $(MSG_CLEANING)
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).map
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).elf
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).hex
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).bin
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).sym
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).lss
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).bin.o
$(V1) $(RM) -f $(OUTDIR)/$(TARGET).opfw
$(V1) $(RM) -f $(wildcard $(OUTDIR)/*.c)
$(V1) $(RM) -f $(wildcard $(OUTDIR)/*.h)
$(V1) $(RM) -f $(ALLOBJ)
$(V1) $(RM) -f $(LSTFILES)
$(V1) $(RM) -f $(DEPFILES)
$(V1) $(RM) -f $(SRC:.c=.s)
$(V1) $(RM) -f $(SRCARM:.c=.s)
$(V1) $(RM) -f $(CPPSRC:.cpp=.s)
$(V1) $(RM) -f $(CPPSRCARM:.cpp=.s)
$(V1) rm -f $(OUTDIR)/$(TARGET).map
$(V1) rm -f $(OUTDIR)/$(TARGET).elf
$(V1) rm -f $(OUTDIR)/$(TARGET).hex
$(V1) rm -f $(OUTDIR)/$(TARGET).bin
$(V1) rm -f $(OUTDIR)/$(TARGET).sym
$(V1) rm -f $(OUTDIR)/$(TARGET).lss
$(V1) rm -f $(OUTDIR)/$(TARGET).bin.o
$(V1) rm -f $(OUTDIR)/$(TARGET).opfw
$(V1) rm -f $(wildcard $(OUTDIR)/*.c)
$(V1) rm -f $(wildcard $(OUTDIR)/*.h)
$(V1) rm -f $(ALLOBJ)
$(V1) rm -f $(LSTFILES)
$(V1) rm -f $(DEPFILES)
$(V1) rm -f $(SRC:.c=.s)
$(V1) rm -f $(SRCARM:.c=.s)
$(V1) rm -f $(CPPSRC:.cpp=.s)
$(V1) rm -f $(CPPSRCARM:.cpp=.s)
# Create output files directory
# all known MS Windows OS define the ComSpec environment variable
$(shell $(MKDIR) -p $(OUTDIR) 2>/dev/null)
$(shell mkdir -p $(OUTDIR) 2>/dev/null)
# Include the dependency files.
-include $(shell $(MKDIR) -p $(OUTDIR)/dep 2>/dev/null) $(wildcard $(OUTDIR)/dep/*)
-include $(shell mkdir -p $(OUTDIR)/dep 2>/dev/null) $(wildcard $(OUTDIR)/dep/*)
# Listing of phony targets.
.PHONY: all build clean install

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -70,7 +70,7 @@ MSG_FLASH_IMG = $(QUOTE) FLASH_IMG $(MSG_EXTRA) $(QUOTE)
# Function for converting an absolute path to one relative
# to the top of the source tree.
toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1)))
toprel = $(subst $(realpath $(FLIGHT_ROOT_DIR))/,,$(abspath $(1)))
# Function to replace special characters like is done for the symbols.
replace_special_chars = $(subst +,_,$(subst ~,_,$(subst @,_,$(subst :,_,$(subst -,_,$(subst .,_,$(subst /,_,$1)))))))
@ -82,25 +82,25 @@ gccversion:
# Create final output file (.hex) from ELF output file.
%.hex: %.elf
@$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@)
@echo $(MSG_LOAD_FILE) $(call toprel, $@)
$(V1) $(OBJCOPY) -O ihex $< $@
# Create stripped output file (.elf.stripped) from ELF output file.
%.elf.stripped: %.elf
@$(ECHO) $(MSG_STRIP_FILE) $(call toprel, $@)
@echo $(MSG_STRIP_FILE) $(call toprel, $@)
$(V1) $(STRIP) --strip-unneeded $< -o $@
# Create final output file (.bin) from ELF output file.
%.bin: %.elf
@$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@)
@echo $(MSG_LOAD_FILE) $(call toprel, $@)
$(V1) $(OBJCOPY) -O binary $< $@
%.bin: %.o
@$(ECHO) $(MSG_LOAD_FILE) $(call toprel, $@)
@echo $(MSG_LOAD_FILE) $(call toprel, $@)
$(V1) $(OBJCOPY) -O binary $< $@
%.bin.o: %.bin
@$(ECHO) $(MSG_BIN_OBJ) $(call toprel, $@)
@echo $(MSG_BIN_OBJ) $(call toprel, $@)
$(V1) $(OBJCOPY) -I binary -O elf32-littlearm --binary-architecture arm \
--rename-section .data=.rodata,alloc,load,readonly,data,contents \
--wildcard \
@ -112,12 +112,12 @@ gccversion:
# Create extended listing file/disassambly from ELF output file.
# using objdump testing: option -C
%.lss: %.elf
@$(ECHO) $(MSG_EXTENDED_LISTING) $(call toprel, $@)
@echo $(MSG_EXTENDED_LISTING) $(call toprel, $@)
$(V1) $(OBJDUMP) -h -S -C -r $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
@$(ECHO) $(MSG_SYMBOL_TABLE) $(call toprel, $@)
@echo $(MSG_SYMBOL_TABLE) $(call toprel, $@)
$(V1) $(NM) -n $< > $@
define SIZE_TEMPLATE
@ -126,7 +126,7 @@ size: $(1)_size
.PHONY: $(1)_size
$(1)_size: $(1)
@$(ECHO) $(MSG_SIZE) $$(call toprel, $$<)
@echo $(MSG_SIZE) $$(call toprel, $$<)
$(V1) $(SIZE) -A $$<
endef
@ -137,62 +137,62 @@ endef
define OPFW_TEMPLATE
FORCE:
$(1).firmware_info.c: $(1) $(ROOT_DIR)/flight/templates/firmware_info.c.template FORCE
@$(ECHO) $(MSG_FWINFO) $$(call toprel, $$@)
$(1).firmware_info.c: $(1) $(FLIGHT_ROOT_DIR)/templates/firmware_info.c.template FORCE
@echo $(MSG_FWINFO) $$(call toprel, $$@)
$(V1) $(VERSION_INFO) \
--template=$(ROOT_DIR)/flight/templates/firmware_info.c.template \
--template=$(FLIGHT_ROOT_DIR)/templates/firmware_info.c.template \
--outfile=$$@ \
--image=$(1) \
--type=$(2) \
--revision=$(3) \
--uavodir=$(ROOT_DIR)/shared/uavobjectdefinition
--uavodir=$(FLIGHT_ROOT_DIR)/../shared/uavobjectdefinition
$(eval $(call COMPILE_C_TEMPLATE, $(1).firmware_info.c))
$(OUTDIR)/$(notdir $(basename $(1))).opfw : $(1) $(1).firmware_info.bin
@$(ECHO) $(MSG_OPFIRMWARE) $$(call toprel, $$@)
$(V1) $(CAT) $(1) $(1).firmware_info.bin > $$@
@echo $(MSG_OPFIRMWARE) $$(call toprel, $$@)
$(V1) cat $(1) $(1).firmware_info.bin > $$@
endef
# Assemble: create object files from assembler source files.
define ASSEMBLE_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_ASSEMBLING) $$(call toprel, $$<)
@echo $(MSG_ASSEMBLING) $$(call toprel, $$<)
$(V1) $(CC) -c $(THUMB) $$(ASFLAGS) $$< -o $$@
endef
# Assemble: create object files from assembler source files. ARM-only
define ASSEMBLE_ARM_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_ASSEMBLING_ARM) $$(call toprel, $$<)
@echo $(MSG_ASSEMBLING_ARM) $$(call toprel, $$<)
$(V1) $(CC) -c $$(ASFLAGS) $$< -o $$@
endef
# Compile: create object files from C source files.
define COMPILE_C_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_COMPILING) $$(call toprel, $$<)
@echo $(MSG_COMPILING) $$(call toprel, $$<)
$(V1) $(CC) -c $(THUMB) $$(CFLAGS) $$(CONLYFLAGS) $$(CPPFLAGS) $$< -o $$@
endef
# Compile: create object files from C source files. ARM-only
define COMPILE_C_ARM_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_COMPILING_ARM) $$(call toprel, $$<)
@echo $(MSG_COMPILING_ARM) $$(call toprel, $$<)
$(V1) $(CC) -c $$(CFLAGS) $$(CONLYFLAGS) $$(CPPFLAGS) $$< -o $$@
endef
# Compile: create object files from C++ source files.
define COMPILE_CXX_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_COMPILINGCXX) $$(call toprel, $$<)
@echo $(MSG_COMPILINGCXX) $$(call toprel, $$<)
$(V1) $(CXX) -c $(THUMB) $$(CFLAGS) $$(CPPFLAGS) $$(CXXFLAGS) $$< -o $$@
endef
# Compile: create object files from C++ source files. ARM-only
define COMPILE_CXX_ARM_TEMPLATE
$(OUTDIR)/$(notdir $(basename $(1))).o : $(1)
@$(ECHO) $(MSG_COMPILINGCXX_ARM) $$(call toprel, $$<)
@echo $(MSG_COMPILINGCXX_ARM) $$(call toprel, $$<)
$(V1) $(CPP) -c $$(CFLAGS) $$(CPPFLAGS) $$(CXXFLAGS) $$< -o $$@
endef
@ -204,7 +204,7 @@ define ARCHIVE_TEMPLATE
.SECONDARY : $(1)
.PRECIOUS : $(2)
$(1): $(2)
@$(ECHO) $(MSG_ARCHIVING) $$(call toprel, $$@)
@echo $(MSG_ARCHIVING) $$(call toprel, $$@)
ifeq ($(3),)
$(V1) $(AR) rcs $$@ $(2)
else
@ -228,7 +228,7 @@ define LINK_TEMPLATE
.SECONDARY : $(1)
.PRECIOUS : $(2) $(3)
$(1): $(2) $(3)
@$(ECHO) $(MSG_LINKING) $$(call toprel, $$@)
@echo $(MSG_LINKING) $$(call toprel, $$@)
$(V1) $(CC) $(THUMB) $$(CFLAGS) $$(CPPFLAGS) $(2) $(3) --output $$@ $$(LDFLAGS)
endef
@ -239,21 +239,21 @@ define LINK_CXX_TEMPLATE
.SECONDARY : $(1)
.PRECIOUS : $(2) $(3)
$(1): $(2) $(3)
@$(ECHO) $(MSG_LINKING) $$(call toprel, $$@)
@echo $(MSG_LINKING) $$(call toprel, $$@)
$(V1) $(CXX) $(THUMB) $$(CFLAGS) $$(CPPFLAGS) $$(CXXFLAGS) $(2) $(3) --output $$@ $$(LDFLAGS)
endef
# Compile: create assembler files from C source files. ARM/Thumb
define PARTIAL_COMPILE_TEMPLATE
$($(1):.c=.s) : %.s : %.c
@$(ECHO) $(MSG_ASMFROMC) $$(call toprel, $$<)
@echo $(MSG_ASMFROMC) $$(call toprel, $$<)
$(V1) $(CC) $(THUMB) -S $$(CFLAGS) $$(CONLYFLAGS) $$< -o $$@
endef
# Compile: create assembler files from C source files. ARM only
define PARTIAL_COMPILE_ARM_TEMPLATE
$($(1):.c=.s) : %.s : %.c
@$(ECHO) $(MSG_ASMFROMC_ARM) $$(call toprel, $$<)
@echo $(MSG_ASMFROMC_ARM) $$(call toprel, $$<)
$(V1) $(CC) -S $$(CFLAGS) $$(CONLYFLAGS) $$< -o $$@
endef
@ -270,7 +270,7 @@ define JTAG_TEMPLATE
# debug level
OOCD_JTAG_SETUP = -d0
# interface and board/target settings (using the OOCD target-library here)
OOCD_JTAG_SETUP += -s $(ROOT_DIR)/flight/Project/OpenOCD
OOCD_JTAG_SETUP += -s $(FLIGHT_ROOT_DIR)/Project/OpenOCD
OOCD_JTAG_SETUP += -f $(4) -f $(5)
# initialize
@ -282,7 +282,7 @@ OOCD_BOARD_RESET += -c "reset halt"
.PHONY: program
program: $(1)
@$(ECHO) $(MSG_JTAG_PROGRAM) $$(call toprel, $$<)
@echo $(MSG_JTAG_PROGRAM) $$(call toprel, $$<)
$(V1) $(OPENOCD) \
$$(OOCD_JTAG_SETUP) \
$$(OOCD_BOARD_RESET) \
@ -293,7 +293,7 @@ program: $(1)
.PHONY: wipe
wipe:
@$(ECHO) $(MSG_JTAG_WIPE) wiping $(3) bytes starting from $(2)
@echo $(MSG_JTAG_WIPE) wiping $(3) bytes starting from $(2)
$(V1) $(OPENOCD) \
$$(OOCD_JTAG_SETUP) \
$$(OOCD_BOARD_RESET) \

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -25,9 +25,9 @@ endif
SRC += $(CMSIS_DEVICEDIR)/system_stm32f10x.c
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk
$(info Making bootloader for CopterControl, board revision $(BOARD_REVISION))
$(info Use BOARD_REVISION=1 for CC, BOARD_REVISION=2 for CC3D (default))

View File

@ -18,12 +18,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# ARM DSP library
USE_DSP_LIB ?= NO
@ -88,60 +88,60 @@ ifndef TESTAPP
SRC += $(OPUAVOBJ)/eventdispatcher.c
## UAVObjects
SRC += $(OPUAVSYNTHDIR)/accessorydesired.c
SRC += $(OPUAVSYNTHDIR)/objectpersistence.c
SRC += $(OPUAVSYNTHDIR)/gcstelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/flighttelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/faultsettings.c
SRC += $(OPUAVSYNTHDIR)/flightstatus.c
SRC += $(OPUAVSYNTHDIR)/systemstats.c
SRC += $(OPUAVSYNTHDIR)/systemalarms.c
SRC += $(OPUAVSYNTHDIR)/systemsettings.c
SRC += $(OPUAVSYNTHDIR)/stabilizationdesired.c
SRC += $(OPUAVSYNTHDIR)/stabilizationsettings.c
SRC += $(OPUAVSYNTHDIR)/stabilizationsettingsbank1.c
SRC += $(OPUAVSYNTHDIR)/stabilizationsettingsbank2.c
SRC += $(OPUAVSYNTHDIR)/stabilizationsettingsbank3.c
SRC += $(OPUAVSYNTHDIR)/stabilizationstatus.c
SRC += $(OPUAVSYNTHDIR)/stabilizationbank.c
SRC += $(OPUAVSYNTHDIR)/actuatorcommand.c
SRC += $(OPUAVSYNTHDIR)/actuatordesired.c
SRC += $(OPUAVSYNTHDIR)/actuatorsettings.c
SRC += $(OPUAVSYNTHDIR)/accelstate.c
SRC += $(OPUAVSYNTHDIR)/accelgyrosettings.c
SRC += $(OPUAVSYNTHDIR)/gyrostate.c
SRC += $(OPUAVSYNTHDIR)/attitudestate.c
SRC += $(OPUAVSYNTHDIR)/manualcontrolcommand.c
SRC += $(OPUAVSYNTHDIR)/watchdogstatus.c
SRC += $(OPUAVSYNTHDIR)/manualcontrolsettings.c
SRC += $(OPUAVSYNTHDIR)/flightmodesettings.c
SRC += $(OPUAVSYNTHDIR)/mixersettings.c
SRC += $(OPUAVSYNTHDIR)/firmwareiapobj.c
SRC += $(OPUAVSYNTHDIR)/attitudesettings.c
SRC += $(OPUAVSYNTHDIR)/camerastabsettings.c
SRC += $(OPUAVSYNTHDIR)/cameradesired.c
SRC += $(OPUAVSYNTHDIR)/gpspositionsensor.c
SRC += $(OPUAVSYNTHDIR)/gpsvelocitysensor.c
SRC += $(OPUAVSYNTHDIR)/gpssettings.c
SRC += $(OPUAVSYNTHDIR)/hwsettings.c
SRC += $(OPUAVSYNTHDIR)/receiveractivity.c
SRC += $(OPUAVSYNTHDIR)/receiverstatus.c
SRC += $(OPUAVSYNTHDIR)/mixerstatus.c
SRC += $(OPUAVSYNTHDIR)/ratedesired.c
SRC += $(OPUAVSYNTHDIR)/txpidsettings.c
SRC += $(OPUAVSYNTHDIR)/txpidstatus.c
SRC += $(OPUAVSYNTHDIR)/mpugyroaccelsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/accessorydesired.c
SRC += $(FLIGHT_UAVOBJ_DIR)/objectpersistence.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gcstelemetrystats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flighttelemetrystats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/faultsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flightstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemstats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemalarms.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationdesired.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationsettingsbank1.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationsettingsbank2.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationsettingsbank3.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/stabilizationbank.c
SRC += $(FLIGHT_UAVOBJ_DIR)/actuatorcommand.c
SRC += $(FLIGHT_UAVOBJ_DIR)/actuatordesired.c
SRC += $(FLIGHT_UAVOBJ_DIR)/actuatorsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/accelstate.c
SRC += $(FLIGHT_UAVOBJ_DIR)/accelgyrosettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gyrostate.c
SRC += $(FLIGHT_UAVOBJ_DIR)/attitudestate.c
SRC += $(FLIGHT_UAVOBJ_DIR)/manualcontrolcommand.c
SRC += $(FLIGHT_UAVOBJ_DIR)/watchdogstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/manualcontrolsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flightmodesettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/mixersettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/firmwareiapobj.c
SRC += $(FLIGHT_UAVOBJ_DIR)/attitudesettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/camerastabsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/cameradesired.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpspositionsensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpsvelocitysensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpssettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/hwsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/receiveractivity.c
SRC += $(FLIGHT_UAVOBJ_DIR)/receiverstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/mixerstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/ratedesired.c
SRC += $(FLIGHT_UAVOBJ_DIR)/txpidsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/txpidstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/mpugyroaccelsettings.c
# Command line option for Gcsreceiver module
ifeq ($(GCSRECEIVER), YES)
SRC += $(OPUAVSYNTHDIR)/gcsreceiver.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gcsreceiver.c
endif
# Enable Diag tasks and UAVOs needed
ifeq ($(DIAG_TASKS), YES)
CDEFS += -DDIAG_TASKS
SRC += $(OPUAVSYNTHDIR)/taskinfo.c
SRC += $(OPUAVSYNTHDIR)/callbackinfo.c
SRC += $(OPUAVSYNTHDIR)/perfcounter.c
SRC += $(OPUAVSYNTHDIR)/i2cstats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/taskinfo.c
SRC += $(FLIGHT_UAVOBJ_DIR)/callbackinfo.c
SRC += $(FLIGHT_UAVOBJ_DIR)/perfcounter.c
SRC += $(FLIGHT_UAVOBJ_DIR)/i2cstats.c
endif
else
## Test Code
@ -149,5 +149,5 @@ else
SRC += $(OPTESTS)/$(TESTAPP).c
endif
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,11 +17,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -18,12 +18,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#####
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# REVO C++ support
USE_CXX = YES
@ -112,5 +112,5 @@ endif
include $(FLIGHTLIB)/rscode/library.mk
#include $(FLIGHTLIB)/PyMite/pymite.mk
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -126,5 +126,5 @@ UAVOBJSRCFILENAMES += txpidstatus
UAVOBJSRCFILENAMES += takeofflocation
UAVOBJSRCFILENAMES += perfcounter
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -25,7 +25,7 @@ PIOS_OMITS_USB = YES
PIOS_APPS_MINIMAL = YES
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
## The standard CMSIS startup
SRC += $(CMSIS_DEVICEDIR)/system_stm32f0xx.c
@ -35,6 +35,6 @@ SRC += $(FLIGHTLIB)/fifo_buffer.c
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -18,12 +18,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# ARM DSP library
USE_DSP_LIB ?= NO
@ -53,11 +53,11 @@ SRC += $(PIOSCOMMON)/pios_ubx_dcc.c
SRC += $(PIOSCOMMON)/pios_flash_jedec.c
## UAVObjects
SRC += $(OPUAVSYNTHDIR)/firmwareiapobj.c
SRC += $(OPUAVSYNTHDIR)/systemstats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/firmwareiapobj.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemstats.c
PIOS_OMITS_USB = YES
PIOS_APPS_MINIMAL = YES
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
@ -25,9 +25,9 @@ endif
SRC += $(CMSIS_DEVICEDIR)/system_stm32f10x.c
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk
BLONLY_CDEFS += -DEE_BANK_BASE=$(EE_BANK_BASE)
BLONLY_CDEFS += -DEE_BANK_SIZE=$(EE_BANK_SIZE)

View File

@ -17,12 +17,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# ARM DSP library
override USE_DSP_LIB := NO
@ -54,11 +54,11 @@ ifndef TESTAPP
SRC += $(FLIGHTLIB)/sha1.c
## UAVObjects
SRC += $(OPUAVSYNTHDIR)/oplinkstatus.c
SRC += $(OPUAVSYNTHDIR)/oplinksettings.c
SRC += $(OPUAVSYNTHDIR)/objectpersistence.c
SRC += $(OPUAVSYNTHDIR)/oplinkreceiver.c
SRC += $(OPUAVSYNTHDIR)/radiocombridgestats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/oplinkstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/oplinksettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/objectpersistence.c
SRC += $(FLIGHT_UAVOBJ_DIR)/oplinkreceiver.c
SRC += $(FLIGHT_UAVOBJ_DIR)/radiocombridgestats.c
else
## Test Code
SRC += $(OPTESTS)/test_common.c
@ -68,5 +68,5 @@ endif
# Optional component libraries
include $(FLIGHTLIB)/rscode/library.mk
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,11 +17,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,12 +17,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# ARM DSP library
override USE_DSP_LIB := NO
@ -77,34 +77,34 @@ ifndef TESTAPP
SRC += $(FLIGHTLIB)/auxmagsupport.c
## UAVObjects
SRC += $(OPUAVSYNTHDIR)/objectpersistence.c
SRC += $(OPUAVSYNTHDIR)/gcstelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/flighttelemetrystats.c
SRC += $(OPUAVSYNTHDIR)/flightstatus.c
SRC += $(OPUAVSYNTHDIR)/flightmodesettings.c
SRC += $(OPUAVSYNTHDIR)/manualcontrolsettings.c
SRC += $(OPUAVSYNTHDIR)/systemstats.c
SRC += $(OPUAVSYNTHDIR)/systemalarms.c
SRC += $(OPUAVSYNTHDIR)/systemsettings.c
SRC += $(OPUAVSYNTHDIR)/attitudestate.c
SRC += $(OPUAVSYNTHDIR)/i2cstats.c
SRC += $(OPUAVSYNTHDIR)/watchdogstatus.c
SRC += $(OPUAVSYNTHDIR)/firmwareiapobj.c
SRC += $(OPUAVSYNTHDIR)/hwsettings.c
SRC += $(OPUAVSYNTHDIR)/taskinfo.c
SRC += $(OPUAVSYNTHDIR)/callbackinfo.c
SRC += $(OPUAVSYNTHDIR)/mixerstatus.c
SRC += $(OPUAVSYNTHDIR)/homelocation.c
SRC += $(OPUAVSYNTHDIR)/gpspositionsensor.c
SRC += $(OPUAVSYNTHDIR)/gpssatellites.c
SRC += $(OPUAVSYNTHDIR)/gpsvelocitysensor.c
SRC += $(OPUAVSYNTHDIR)/gpstime.c
SRC += $(OPUAVSYNTHDIR)/gpssettings.c
SRC += $(OPUAVSYNTHDIR)/osdsettings.c
SRC += $(OPUAVSYNTHDIR)/barosensor.c
SRC += $(OPUAVSYNTHDIR)/magsensor.c
SRC += $(OPUAVSYNTHDIR)/auxmagsensor.c
SRC += $(OPUAVSYNTHDIR)/gpsextendedstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/objectpersistence.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gcstelemetrystats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flighttelemetrystats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flightstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/flightmodesettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/manualcontrolsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemstats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemalarms.c
SRC += $(FLIGHT_UAVOBJ_DIR)/systemsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/attitudestate.c
SRC += $(FLIGHT_UAVOBJ_DIR)/i2cstats.c
SRC += $(FLIGHT_UAVOBJ_DIR)/watchdogstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/firmwareiapobj.c
SRC += $(FLIGHT_UAVOBJ_DIR)/hwsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/taskinfo.c
SRC += $(FLIGHT_UAVOBJ_DIR)/callbackinfo.c
SRC += $(FLIGHT_UAVOBJ_DIR)/mixerstatus.c
SRC += $(FLIGHT_UAVOBJ_DIR)/homelocation.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpspositionsensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpssatellites.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpsvelocitysensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpstime.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpssettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/osdsettings.c
SRC += $(FLIGHT_UAVOBJ_DIR)/barosensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/magsensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/auxmagsensor.c
SRC += $(FLIGHT_UAVOBJ_DIR)/gpsextendedstatus.c
else
## Test Code
SRC += $(OPTESTS)/test_common.c
@ -114,5 +114,5 @@ endif
# Optional component libraries
include $(PIOS)/common/libraries/dosfs/library.mk
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,11 +17,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -18,12 +18,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#####
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# REVO C++ support
USE_CXX = YES
@ -112,5 +112,5 @@ include $(FLIGHTLIB)/rscode/library.mk
#include $(FLIGHTLIB)/PyMite/pymite.mk
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -112,7 +112,6 @@ PYMITEINC += $(OUTDIR)
FLIGHTPLANLIB = $(OPMODULEDIR)/FlightPlan/lib
FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans
UAVOBJSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
UAVOBJPYTHONSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/python
# List C source files here. (C dependencies are automatically generated.)
@ -141,7 +140,7 @@ SRC += $(OPSYSTEM)/alarms.c
SRC += $(OPUAVTALK)/uavtalk.c
SRC += $(OPUAVOBJ)/uavobjectmanager.c
SRC += $(OPUAVOBJ)/eventdispatcher.c
SRC += $(UAVOBJSYNTHDIR)/uavobjectsinit.c
SRC += $(FLIGHT_UAVOBJ_DIR)/uavobjectsinit.c
else
## TESTCODE
SRC += $(OPTESTS)/test_common.c
@ -152,11 +151,11 @@ endif
## UAVOBJECTS
ifndef TESTAPP
#include $(UAVOBJSYNTHDIR)/Makefile.inc
#include $(FLIGHT_UAVOBJ_DIR)/Makefile.inc
include ./UAVObjects.inc
UAVOBJSRCFILENAMES += attitudesimulated
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
SRC += $(UAVOBJSRC)
@ -221,7 +220,7 @@ EXTRAINCDIRS += $(OPUAVTALK)
EXTRAINCDIRS += $(OPUAVTALKINC)
EXTRAINCDIRS += $(OPUAVOBJ)
EXTRAINCDIRS += $(OPUAVOBJINC)
EXTRAINCDIRS += $(UAVOBJSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
EXTRAINCDIRS += $(PIOS)
EXTRAINCDIRS += $(PIOSINC)
EXTRAINCDIRS += $(FLIGHTLIBINC)
@ -367,7 +366,7 @@ OBJCOPY = $(ARM_SDK_PREFIX)objcopy
OBJDUMP = $(ARM_SDK_PREFIX)objdump
SIZE = $(ARM_SDK_PREFIX)size
NM = $(ARM_SDK_PREFIX)nm
REMOVE = $(RM) -f
REMOVE = rm -f

View File

@ -126,5 +126,5 @@ UAVOBJSRCFILENAMES += txpidstatus
UAVOBJSRCFILENAMES += takeofflocation
UAVOBJSRCFILENAMES += perfcounter
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )

View File

@ -17,11 +17,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -17,12 +17,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#####
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# REVO C++ support
USE_CXX = YES
@ -106,5 +106,5 @@ endif
# Optional component libraries
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -112,7 +112,6 @@ PYMITEINC += $(OUTDIR)
FLIGHTPLANLIB = $(OPMODULEDIR)/FlightPlan/lib
FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans
UAVOBJSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
UAVOBJPYTHONSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/python
# List C source files here. (C dependencies are automatically generated.)
@ -141,7 +140,7 @@ SRC += $(OPSYSTEM)/alarms.c
SRC += $(OPUAVTALK)/uavtalk.c
SRC += $(OPUAVOBJ)/uavobjectmanager.c
SRC += $(OPUAVOBJ)/eventdispatcher.c
SRC += $(UAVOBJSYNTHDIR)/uavobjectsinit.c
SRC += $(FLIGHT_UAVOBJ_DIR)/uavobjectsinit.c
else
## TESTCODE
SRC += $(OPTESTS)/test_common.c
@ -152,11 +151,11 @@ endif
## UAVOBJECTS
ifndef TESTAPP
#include $(UAVOBJSYNTHDIR)/Makefile.inc
#include $(FLIGHT_UAVOBJ_DIR)/Makefile.inc
include ./UAVObjects.inc
UAVOBJSRCFILENAMES += attitudesimulated
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
SRC += $(UAVOBJSRC)
@ -221,7 +220,7 @@ EXTRAINCDIRS += $(OPUAVTALK)
EXTRAINCDIRS += $(OPUAVTALKINC)
EXTRAINCDIRS += $(OPUAVOBJ)
EXTRAINCDIRS += $(OPUAVOBJINC)
EXTRAINCDIRS += $(UAVOBJSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
EXTRAINCDIRS += $(PIOS)
EXTRAINCDIRS += $(PIOSINC)
EXTRAINCDIRS += $(FLIGHTLIBINC)
@ -367,7 +366,7 @@ OBJCOPY = $(ARM_SDK_PREFIX)objcopy
OBJDUMP = $(ARM_SDK_PREFIX)objdump
SIZE = $(ARM_SDK_PREFIX)size
NM = $(ARM_SDK_PREFIX)nm
REMOVE = $(RM) -f
REMOVE = rm -f

View File

@ -126,5 +126,5 @@ UAVOBJSRCFILENAMES += txpidstatus
UAVOBJSRCFILENAMES += takeofflocation
UAVOBJSRCFILENAMES += perfcounter
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )

View File

@ -17,11 +17,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/boot-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -18,12 +18,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#####
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# REVO C++ support
USE_CXX = YES
@ -105,5 +105,5 @@ endif
# Optional component libraries
#include $(FLIGHTLIB)/PyMite/pymite.mk
include $(ROOT_DIR)/make/apps-defs.mk
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/apps-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -118,7 +118,6 @@ PYMITEINC += $(OUTDIR)
FLIGHTPLANLIB = $(OPMODULEDIR)/FlightPlan/lib
FLIGHTPLANS = $(OPMODULEDIR)/FlightPlan/flightplans
UAVOBJSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
UAVOBJPYTHONSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/python
# List C source files here. (C dependencies are automatically generated.)
@ -145,14 +144,14 @@ SRC += $(OPSYSTEM)/alarms.c
SRC += $(OPUAVTALK)/uavtalk.c
SRC += $(OPUAVOBJ)/uavobjectmanager.c
SRC += $(OPUAVOBJ)/eventdispatcher.c
SRC += $(UAVOBJSYNTHDIR)/uavobjectsinit.c
SRC += $(FLIGHT_UAVOBJ_DIR)/uavobjectsinit.c
include $(WHEREAMI)/UAVObjects.inc
UAVOBJSRCFILENAMES += attitudesimulated
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )
SRC += $(UAVOBJSRC)
@ -222,7 +221,7 @@ EXTRAINCDIRS += $(OPUAVTALK)
EXTRAINCDIRS += $(OPUAVTALKINC)
EXTRAINCDIRS += $(OPUAVOBJ)
EXTRAINCDIRS += $(OPUAVOBJINC)
EXTRAINCDIRS += $(UAVOBJSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
EXTRAINCDIRS += $(PIOS)
EXTRAINCDIRS += $(PIOSINC)
EXTRAINCDIRS += $(FLIGHTLIBINC)
@ -369,7 +368,7 @@ OBJCOPY = $(ARM_SDK_PREFIX)objcopy
OBJDUMP = $(ARM_SDK_PREFIX)objdump
SIZE = $(ARM_SDK_PREFIX)size
NM = $(ARM_SDK_PREFIX)nm
REMOVE = $(RM) -f
REMOVE = rm -f

View File

@ -125,5 +125,5 @@ UAVOBJSRCFILENAMES += txpidsettings
UAVOBJSRCFILENAMES += txpidstatus
UAVOBJSRCFILENAMES += takeofflocation
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(OPUAVSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )

View File

@ -27,7 +27,7 @@ override ARM_SDK_PREFIX :=
override THUMB :=
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# Set developer code and compile options
# Set to YES for debugging
@ -71,7 +71,6 @@ PIOSCORECOMMON = $(PIOS)/common
PIOSCOMMONLIB = $(PIOS)/common/libraries
BOOT =
BOOTINC =
UAVOBJSYNTHDIR = $(OUTDIR)/../uavobject-synthetics/flight
# optional component libraries
include $(PIOS)/common/libraries/FreeRTOS/library.mk
@ -99,7 +98,7 @@ SRC += $(OPUAVTALK)/uavtalk.c
SRC += $(OPUAVOBJ)/uavobjectmanager.c
SRC += $(OPUAVOBJ)/uavobjectpersistence.c
SRC += $(OPUAVOBJ)/eventdispatcher.c
SRC += $(UAVOBJSYNTHDIR)/uavobjectsinit.c
SRC += $(FLIGHT_UAVOBJ_DIR)/uavobjectsinit.c
SRC += $(FLIGHTLIB)/CoordinateConversions.c
SRC += $(FLIGHTLIB)/fifo_buffer.c
@ -145,13 +144,13 @@ EXTRAINCDIRS += $(OPUAVTALK)
EXTRAINCDIRS += $(OPUAVTALKINC)
EXTRAINCDIRS += $(OPUAVOBJ)
EXTRAINCDIRS += $(OPUAVOBJINC)
EXTRAINCDIRS += $(UAVOBJSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
EXTRAINCDIRS += $(FLIGHTLIBINC)
EXTRAINCDIRS += $(MATHLIBINC)
EXTRAINCDIRS += $(PIDLIBINC)
EXTRAINCDIRS += $(PIOSCOMMON)
EXTRAINCDIRS += $(CMSISDIR)
EXTRAINCDIRS += $(OPUAVSYNTHDIR)
EXTRAINCDIRS += $(FLIGHT_UAVOBJ_DIR)
EXTRAINCDIRS += $(BOOTINC)
EXTRAINCDIRS += ${foreach MOD, ${MODULES}, $(OPMODULEDIR)/${MOD}/inc} ${OPMODULEDIR}/System/inc
@ -290,7 +289,7 @@ LDFLAGS += $(addprefix -T,$(LINKER_SCRIPTS_APP))
# Define programs and commands.
REMOVE = $(RM) -f
REMOVE = rm -f
# List of all source files.
ALLSRC = $(ASRCARM) $(ASRC) $(SRCARM) $(SRC) $(CPPSRCARM) $(CPPSRC)
@ -424,16 +423,16 @@ gencode: ${OUTDIR}/InitMods.c ${OUTDIR}/pmlib_img.c ${OUTDIR}/pmlib_nat.c ${OUTD
# Generate code for module initialization
${OUTDIR}/InitMods.c: Makefile
$(V1) $(ECHO) $(MSG_MODINIT $(call toprel, $@))
$(V1) $(ECHO) $(QUOTE)// Autogenerated file$(QUOTE) > ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)${foreach MOD, ${MODNAMES}, extern unsigned int ${MOD}Initialize(void);}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)${foreach MOD, ${MODNAMES}, extern unsigned int ${MOD}Start(void);}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)void InitModules() {$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)${foreach MOD, ${MODNAMES}, ${MOD}Initialize();}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)void StartModules() {$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)${foreach MOD, ${MODNAMES}, ${MOD}Start();}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) $(ECHO) $(QUOTE)}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(MSG_MODINIT $(call toprel, $@))
$(V1) echo $(QUOTE)// Autogenerated file$(QUOTE) > ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)${foreach MOD, ${MODNAMES}, extern unsigned int ${MOD}Initialize(void);}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)${foreach MOD, ${MODNAMES}, extern unsigned int ${MOD}Start(void);}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)void InitModules() {$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)${foreach MOD, ${MODNAMES}, ${MOD}Initialize();}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)void StartModules() {$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)${foreach MOD, ${MODNAMES}, ${MOD}Start();}$(QUOTE) >> ${OUTDIR}/InitMods.c
$(V1) echo $(QUOTE)}$(QUOTE) >> ${OUTDIR}/InitMods.c
# Listing of phony targets.
.PHONY : all build clean clean_list install

View File

@ -120,5 +120,5 @@ UAVOBJSRCFILENAMES += ekfconfiguration
UAVOBJSRCFILENAMES += ekfstatevariance
UAVOBJSRCFILENAMES += takeofflocation
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )

View File

@ -16,12 +16,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../../boards/$(BOARD_NAME)/board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# ARM DSP library
override USE_DSP_LIB := NO
@ -72,6 +72,6 @@ EXTRAINCDIRS += $(PIOSCOMMON)
EXTRAINCDIRS += $(OPSYSTEMINC)
# Link: create ELF output file from object files.
EXTRAOBJ := $(BUILD_DIR)/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin.o
EXTRAOBJ := $(FLIGHT_OUT_DIR)/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin.o
include $(ROOT_DIR)/make/common-defs.mk
include $(FLIGHT_ROOT_DIR)/make/common-defs.mk

View File

@ -16,12 +16,12 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include ../../boards/$(BOARD_NAME)/board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
# Paths
TOPDIR = .
@ -36,12 +36,12 @@ endif
.PHONY: bin
bin: $(OUTDIR)/$(TARGET).bin
BL_BIN = $(BUILD_DIR)/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
FW_BIN = $(BUILD_DIR)/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin
BL_BIN = $(FLIGHT_OUT_DIR)/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
FW_BIN = $(FLIGHT_OUT_DIR)/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin
FWINFO_BIN = $(FW_BIN).firmware_info.bin
$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN)
$(V0) @$(ECHO) $(MSG_FLASH_IMG) $@
$(V0) @echo $(MSG_FLASH_IMG) $@
$(V1) $(ENTIRE_FLASH) \
$(EF_VERBOSE) \
--bl-bank-base=$(BL_BANK_BASE) \

View File

@ -26,11 +26,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
EXTRAINCDIRS += $(TOPDIR)
EXTRAINCDIRS += $(PIOS)/inc
@ -40,4 +40,4 @@ EXTRAINCDIRS += $(FLIGHTLIB)
SRC += $(FLIGHTLIB)/optypes.c
SRC += $(PIOS)/common/pios_notify.c
include $(ROOT_DIR)/make/unittest.mk
include $(FLIGHT_ROOT_DIR)/make/unittest.mk

View File

@ -24,11 +24,11 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
EXTRAINCDIRS += $(TOPDIR)
EXTRAINCDIRS += $(PIOS)/inc
@ -37,4 +37,4 @@ SRC += $(PIOS)/common/pios_flashfs_logfs.c
CFLAGS += "-DFLASH_IMAGE_FILE=\"$(OUTDIR)/theflash.bin\""
include $(ROOT_DIR)/make/unittest.mk
include $(FLIGHT_ROOT_DIR)/make/unittest.mk

View File

@ -25,14 +25,14 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ifndef TOP_LEVEL_MAKEFILE
ifndef FLIGHT_MAKEFILE
$(error Top level Makefile must be used to build this target)
endif
include $(ROOT_DIR)/make/firmware-defs.mk
include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk
EXTRAINCDIRS += $(TOPDIR)
EXTRAINCDIRS += $(ROOT_DIR)/flight/libraries/math
EXTRAINCDIRS += $(FLIGHT_ROOT_DIR)/flight/libraries/math
EXTRAINCDIRS += $(PIOS)/inc
include $(ROOT_DIR)/make/unittest.mk
include $(FLIGHT_ROOT_DIR)/make/unittest.mk

View File

@ -37,5 +37,5 @@
UAVOBJSRCFILENAMES = $(UAVOBJFILENAMES)
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(UAVOBJSYNTHDIR)/$(UAVOBJSRCFILE).c )
UAVOBJSRC = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),$(FLIGHT_UAVOBJ_DIR)/$(UAVOBJSRCFILE).c )
UAVOBJDEFINE = $(foreach UAVOBJSRCFILE,$(UAVOBJSRCFILENAMES),-DUAVOBJ_INIT_$(UAVOBJSRCFILE) )