mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
Merge remote-tracking branch 'origin/next' into Brian-PipXtreme-V2
This commit is contained in:
commit
43786c914d
53
Makefile
53
Makefile
@ -518,6 +518,7 @@ uavobjects_clean:
|
||||
|
||||
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
|
||||
# $(2) = Name of board used in source tree (e.g. CopterControl)
|
||||
# $(3) = Short name for board (e.g CC)
|
||||
define FW_TEMPLATE
|
||||
.PHONY: $(1) fw_$(1)
|
||||
$(1): fw_$(1)_opfw
|
||||
@ -528,6 +529,8 @@ fw_$(1)_%: uavobjects_flight
|
||||
$(V1) cd $(ROOT_DIR)/flight/$(2) && \
|
||||
$$(MAKE) -r --no-print-directory \
|
||||
BOARD_NAME=$(1) \
|
||||
BOARD_SHORT_NAME=$(3) \
|
||||
BUILD_TYPE=fw \
|
||||
TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" \
|
||||
REMOVE_CMD="$(RM)" OOCD_EXE="$(OPENOCD)" \
|
||||
$$*
|
||||
@ -551,6 +554,8 @@ bl_$(1)_%:
|
||||
$(V1) cd $(ROOT_DIR)/flight/Bootloaders/$(2) && \
|
||||
$$(MAKE) -r --no-print-directory \
|
||||
BOARD_NAME=$(1) \
|
||||
BOARD_SHORT_NAME=$(3) \
|
||||
BUILD_TYPE=bl \
|
||||
TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" \
|
||||
REMOVE_CMD="$(RM)" OOCD_EXE="$(OPENOCD)" \
|
||||
$$*
|
||||
@ -585,6 +590,8 @@ bu_$(1)_%: bl_$(1)_bino
|
||||
$(V1) cd $(ROOT_DIR)/flight/Bootloaders/BootloaderUpdater && \
|
||||
$$(MAKE) -r --no-print-directory \
|
||||
BOARD_NAME=$(1) \
|
||||
BOARD_SHORT_NAME=$(3) \
|
||||
BUILD_TYPE=bu \
|
||||
TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" \
|
||||
REMOVE_CMD="$(RM)" OOCD_EXE="$(OPENOCD)" \
|
||||
$$*
|
||||
@ -600,11 +607,13 @@ define EF_TEMPLATE
|
||||
.PHONY: ef_$(1)
|
||||
ef_$(1): ef_$(1)_bin
|
||||
|
||||
ef_$(1)_%: bl_$(1)_bin fw_$(1)_bin
|
||||
ef_$(1)_%: bl_$(1)_bin fw_$(1)_opfw
|
||||
$(V1) mkdir -p $(BUILD_DIR)/ef_$(1)/dep
|
||||
$(V1) cd $(ROOT_DIR)/flight/EntireFlash && \
|
||||
$$(MAKE) -r --no-print-directory \
|
||||
BOARD_NAME=$(1) \
|
||||
BOARD_SHORT_NAME=$(3) \
|
||||
BUILD_TYPE=ef \
|
||||
TCHAIN_PREFIX="$(ARM_SDK_PREFIX)" \
|
||||
DFU_CMD="$(DFUUTIL_DIR)/bin/dfu-util" \
|
||||
$$*
|
||||
@ -615,6 +624,19 @@ ef_$(1)_clean:
|
||||
$(V1) $(RM) -fr $(BUILD_DIR)/ef_$(1)
|
||||
endef
|
||||
|
||||
# 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
|
||||
# that each line applies to.
|
||||
ifneq ($(strip $(filter all_%,$(MAKECMDGOALS))),)
|
||||
export ENABLE_MSG_EXTRA := yes
|
||||
endif
|
||||
|
||||
# When building more than one goal in a single make invocation, also
|
||||
# enable the extra context for each output line
|
||||
ifneq ($(word 2,$(MAKECMDGOALS)),)
|
||||
export ENABLE_MSG_EXTRA := yes
|
||||
endif
|
||||
|
||||
# $(1) = Canonical board name all in lower case (e.g. coptercontrol)
|
||||
define BOARD_PHONY_TEMPLATE
|
||||
.PHONY: all_$(1)
|
||||
@ -632,6 +654,12 @@ endef
|
||||
|
||||
ALL_BOARDS := coptercontrol pipxtreme simposix
|
||||
|
||||
# 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
|
||||
|
||||
# Friendly names of each board (used to find source tree)
|
||||
coptercontrol_friendly := CopterControl
|
||||
pipxtreme_friendly := PipXtreme
|
||||
@ -644,6 +672,13 @@ ifneq ($(UNAME), Linux)
|
||||
ALL_BOARDS := $(filter-out simposix, $(ALL_BOARDS))
|
||||
endif
|
||||
|
||||
# Short hames of each board (used to display board name in parallel builds)
|
||||
coptercontrol_short := 'cc '
|
||||
pipxtreme_short := 'pipx'
|
||||
revolution_short := 'revo'
|
||||
simposix_short := 'posx'
|
||||
osd_short := 'osd '
|
||||
|
||||
# Start out assuming that we'll build fw, bl and bu for all boards
|
||||
FW_BOARDS := $(ALL_BOARDS)
|
||||
BL_BOARDS := $(ALL_BOARDS)
|
||||
@ -655,6 +690,12 @@ EF_BOARDS := $(ALL_BOARDS)
|
||||
BL_BOARDS := $(filter-out ins, $(BL_BOARDS))
|
||||
BU_BOARDS := $(filter-out ins, $(BU_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, $(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))
|
||||
@ -674,7 +715,7 @@ 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: $(EF_TARGETS)
|
||||
all_ef_clean: $(addsuffix _clean, $(EF_TARGETS))
|
||||
|
||||
.PHONY: all_flight all_flight_clean
|
||||
@ -685,16 +726,16 @@ all_flight_clean: all_fw_clean all_bl_clean all_bu_clean all_ef_clean
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BOARD_PHONY_TEMPLATE,$(board))))
|
||||
|
||||
# Expand the bootloader updater rules
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BU_TEMPLATE,$(board),$($(board)_friendly))))
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BU_TEMPLATE,$(board),$($(board)_friendly),$($(board)_short))))
|
||||
|
||||
# Expand the firmware rules
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call FW_TEMPLATE,$(board),$($(board)_friendly))))
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call FW_TEMPLATE,$(board),$($(board)_friendly),$($(board)_short))))
|
||||
|
||||
# Expand the bootloader rules
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BL_TEMPLATE,$(board),$($(board)_friendly))))
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call BL_TEMPLATE,$(board),$($(board)_friendly),$($(board)_short))))
|
||||
|
||||
# Expand the entire-flash rules
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call EF_TEMPLATE,$(board),$($(board)_friendly))))
|
||||
$(foreach board, $(ALL_BOARDS), $(eval $(call EF_TEMPLATE,$(board),$($(board)_friendly),$($(board)_short))))
|
||||
|
||||
.PHONY: sim_win32
|
||||
sim_win32: sim_win32_exe
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 436 KiB |
@ -35,13 +35,13 @@ bin: $(OUTDIR)/$(TARGET).bin
|
||||
|
||||
FW_PAD = $(shell echo $$[$(FW_BANK_BASE)-$(BL_BANK_BASE)-$(BL_BANK_SIZE)])
|
||||
$(OUTDIR)/$(TARGET).pad:
|
||||
$(V0) @echo " PADDING $@"
|
||||
$(V0) @echo $(MSG_PADDING) $@
|
||||
$(V1) dd status=noxfer if=/dev/zero count=$(FW_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@
|
||||
|
||||
BL_BIN = $(TOP)/build/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
|
||||
FW_BIN = $(TOP)/build/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin
|
||||
$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).pad
|
||||
$(V0) @echo " FLASH IMG $@"
|
||||
$(V0) @echo $(MSG_FLASH_IMG) $@
|
||||
$(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).pad $(FW_BIN) > $@
|
||||
|
||||
.PHONY: dfu
|
||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 436 KiB |
@ -34,7 +34,7 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QLinkedList>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QTCore/QTime>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QDebug>
|
||||
|
@ -23,32 +23,41 @@ else
|
||||
quote =
|
||||
endif
|
||||
|
||||
# Add a board designator to the terse message text
|
||||
ifeq ($(ENABLE_MSG_EXTRA),yes)
|
||||
MSG_EXTRA := [$(BUILD_TYPE)|$(BOARD_SHORT_NAME)]
|
||||
else
|
||||
MSG_BOARD :=
|
||||
endif
|
||||
|
||||
# Define Messages
|
||||
# English
|
||||
MSG_FORMATERROR := ${quote} Can not handle output-format${quote}
|
||||
MSG_MODINIT := ${quote} MODINIT ${quote}
|
||||
MSG_SIZE := ${quote} SIZE ${quote}
|
||||
MSG_LOAD_FILE := ${quote} BIN/HEX ${quote}
|
||||
MSG_BIN_OBJ := ${quote} BINO ${quote}
|
||||
MSG_STRIP_FILE := ${quote} STRIP ${quote}
|
||||
MSG_EXTENDED_LISTING := ${quote} LIS ${quote}
|
||||
MSG_SYMBOL_TABLE := ${quote} NM ${quote}
|
||||
MSG_LINKING := ${quote} LD ${quote}
|
||||
MSG_COMPILING := ${quote} CC ${quote}
|
||||
MSG_COMPILING_ARM := ${quote} CC-ARM ${quote}
|
||||
MSG_COMPILINGCPP := ${quote} CXX ${quote}
|
||||
MSG_COMPILINGCPP_ARM := ${quote} CXX-ARM ${quote}
|
||||
MSG_ASSEMBLING := ${quote} AS ${quote}
|
||||
MSG_ASSEMBLING_ARM := ${quote} AS-ARM ${quote}
|
||||
MSG_CLEANING := ${quote} CLEAN ${quote}
|
||||
MSG_ASMFROMC := ${quote} AS(C) ${quote}
|
||||
MSG_ASMFROMC_ARM := ${quote} AS(C)-ARM ${quote}
|
||||
MSG_PYMITEINIT := ${quote} PY ${quote}
|
||||
MSG_INSTALLING := ${quote} INSTALL ${quote}
|
||||
MSG_OPFIRMWARE := ${quote} OPFW ${quote}
|
||||
MSG_FWINFO := ${quote} FWINFO ${quote}
|
||||
MSG_JTAG_PROGRAM := ${quote} JTAG-PGM ${quote}
|
||||
MSG_JTAG_WIPE := ${quote} JTAG-WIPE ${quote}
|
||||
MSG_FORMATERROR = ${quote} Can not handle output-format${quote}
|
||||
MSG_MODINIT = ${quote} MODINIT $(MSG_EXTRA) ${quote}
|
||||
MSG_SIZE = ${quote} SIZE $(MSG_EXTRA) ${quote}
|
||||
MSG_LOAD_FILE = ${quote} BIN/HEX $(MSG_EXTRA) ${quote}
|
||||
MSG_BIN_OBJ = ${quote} BINO $(MSG_EXTRA) ${quote}
|
||||
MSG_STRIP_FILE = ${quote} STRIP $(MSG_EXTRA) ${quote}
|
||||
MSG_EXTENDED_LISTING = ${quote} LIS $(MSG_EXTRA) ${quote}
|
||||
MSG_SYMBOL_TABLE = ${quote} NM $(MSG_EXTRA) ${quote}
|
||||
MSG_LINKING = ${quote} LD $(MSG_EXTRA) ${quote}
|
||||
MSG_COMPILING = ${quote} CC ${MSG_EXTRA} ${quote}
|
||||
MSG_COMPILING_ARM = ${quote} CC-ARM $(MSG_EXTRA) ${quote}
|
||||
MSG_COMPILINGCPP = ${quote} CXX $(MSG_EXTRA) ${quote}
|
||||
MSG_COMPILINGCPP_ARM = ${quote} CXX-ARM $(MSG_EXTRA) ${quote}
|
||||
MSG_ASSEMBLING = ${quote} AS $(MSG_EXTRA) ${quote}
|
||||
MSG_ASSEMBLING_ARM = ${quote} AS-ARM $(MSG_EXTRA) ${quote}
|
||||
MSG_CLEANING = ${quote} CLEAN $(MSG_EXTRA) ${quote}
|
||||
MSG_ASMFROMC = ${quote} AS(C) $(MSG_EXTRA) ${quote}
|
||||
MSG_ASMFROMC_ARM = ${quote} AS(C)-ARM $(MSG_EXTRA) ${quote}
|
||||
MSG_PYMITEINIT = ${quote} PY $(MSG_EXTRA) ${quote}
|
||||
MSG_INSTALLING = ${quote} INSTALL $(MSG_EXTRA) ${quote}
|
||||
MSG_OPFIRMWARE = ${quote} OPFW $(MSG_EXTRA) ${quote}
|
||||
MSG_FWINFO = ${quote} FWINFO $(MSG_EXTRA) ${quote}
|
||||
MSG_JTAG_PROGRAM = ${quote} JTAG-PGM $(MSG_EXTRA) ${quote}
|
||||
MSG_JTAG_WIPE = ${quote} JTAG-WIPE $(MSG_EXTRA) ${quote}
|
||||
MSG_PADDING = ${quote} PADDING $(MSG_EXTRA) ${quote}
|
||||
MSG_FLASH_IMG = ${quote} FLASH_IMG $(MSG_EXTRA) ${quote}
|
||||
|
||||
toprel = $(subst $(realpath $(TOP))/,,$(abspath $(1)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user