mk: remove Qualcomm board support

This commit is contained in:
Francisco Ferreira 2018-05-11 13:26:53 +01:00 committed by Andrew Tridgell
parent 221ba177c5
commit 7a696bd766
8 changed files with 0 additions and 324 deletions

View File

@ -43,10 +43,6 @@ ifeq ($(HAL_BOARD),HAL_BOARD_VRBRAIN)
include $(MK_DIR)/board_vrbrain.mk include $(MK_DIR)/board_vrbrain.mk
endif endif
ifeq ($(HAL_BOARD),HAL_BOARD_QURT)
include $(MK_DIR)/board_qurt.mk
endif
ifeq ($(HAL_BOARD),HAL_BOARD_F4LIGHT) ifeq ($(HAL_BOARD),HAL_BOARD_F4LIGHT)
include $(MK_DIR)/board_F4Light.mk include $(MK_DIR)/board_F4Light.mk
endif endif

View File

@ -132,9 +132,6 @@ print-%:
# fetch dependency info from a previous build if any of it exists # fetch dependency info from a previous build if any of it exists
-include $(ALLDEPS) -include $(ALLDEPS)
ifeq ($(HAL_BOARD_SUBTYPE),HAL_BOARD_SUBTYPE_LINUX_QFLIGHT)
include $(MK_DIR)/board_qflight.mk
else
# Link the final object # Link the final object
$(SKETCHELF): $(SKETCHOBJS) $(LIBOBJS) $(SKETCHELF): $(SKETCHOBJS) $(LIBOBJS)
@echo "Building $(SKETCHELF)" @echo "Building $(SKETCHELF)"
@ -142,7 +139,6 @@ $(SKETCHELF): $(SKETCHOBJS) $(LIBOBJS)
$(v)$(LD) $(LDFLAGS) -o $@ $(SKETCHOBJS) $(LIBOBJS) $(LIBS) $(v)$(LD) $(LDFLAGS) -o $@ $(SKETCHOBJS) $(LIBOBJS) $(LIBS)
$(v)cp $(SKETCHELF) . $(v)cp $(SKETCHELF) .
@echo "Firmware is in $(BUILDELF)" @echo "Firmware is in $(BUILDELF)"
endif
SKETCH_INCLUDES = $(SKETCHLIBINCLUDES) -I$(UAVCAN_DIRECTORY)/libuavcan/include -I$(UAVCAN_DIRECTORY)/libuavcan/include/dsdlc_generated SKETCH_INCLUDES = $(SKETCHLIBINCLUDES) -I$(UAVCAN_DIRECTORY)/libuavcan/include -I$(UAVCAN_DIRECTORY)/libuavcan/include/dsdlc_generated
SLIB_INCLUDES = -I$(dir $<)/utility $(SKETCHLIBINCLUDES) -I$(UAVCAN_DIRECTORY)/libuavcan/include -I$(UAVCAN_DIRECTORY)/libuavcan/include/dsdlc_generated SLIB_INCLUDES = -I$(dir $<)/utility $(SKETCHLIBINCLUDES) -I$(UAVCAN_DIRECTORY)/libuavcan/include -I$(UAVCAN_DIRECTORY)/libuavcan/include/dsdlc_generated

View File

@ -1,116 +0,0 @@
# extra rules for qualcomm flight linux build
FLIGHT_BOARD ?= flight4
HEXAGON_TOOLS_ROOT ?= $(HOME)/Qualcomm/HEXAGON_Tools/7.2.11
HEXAGON_SDK_ROOT ?= $(HOME)/Qualcomm/Hexagon_SDK/2.0
HEXAGON_FC_ADDON ?= $(HOME)/Qualcomm/HexagonFCAddon/flight_controller
V_ARCH = v5
CROSSDEV = hexagon-
HEXAGON_BIN = $(addsuffix /Tools/bin,$(HEXAGON_TOOLS_ROOT))
HEXAGON_CLANG_BIN = $(addsuffix /Tools/bin,$(HEXAGON_TOOLS_ROOT))
QURT_CC = $(HEXAGON_CLANG_BIN)/$(CROSSDEV)clang
QURT_CXX = $(HEXAGON_CLANG_BIN)/$(CROSSDEV)clang++
HEXAGON_GCC_BIN = $(HEXAGON_TOOLS_ROOT)/gnu/bin
LINUX_QAIC = $(HEXAGON_SDK_ROOT)/tools/qaic/Linux/qaic
QURT_ARM_GCC_ROOT = $(HEXAGON_SDK_ROOT)/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux
QURT_ARM_CC = $(QURT_ARM_GCC_ROOT)/bin/arm-linux-gnueabihf-gcc
QURT_ARM_CXX = $(QURT_ARM_GCC_ROOT)/bin/arm-linux-gnueabihf-g++
HEXAGON_LINK = $(QURT_CC)
LIBSTDCXX = $(HEXAGON_TOOLS_ROOT)/Tools/target/hexagon/lib/v5/G0/pic/libstdc++.a
QFLIGHT_CC = $(QURT_ARM_CC)
QFLIGHT_CXX = $(QURT_ARM_CXX)
QFLIGHT_LD = $(QURT_ARM_CXX)
QFLIGHT_SRC = $(SKETCHBOOK)/libraries/AP_HAL_Linux/qflight
QFLIGHT_BUILD = $(BUILDROOT)/libraries/AP_HAL_Linux/qflight
GENERATE_DSP_C = $(QFLIGHT_BUILD)/qflight_skel.c
GENERATE_ARM_C = $(QFLIGHT_BUILD)/qflight_stub.c
GENERATE_TARGETS = $(GENERATE_DSP_C) $(GENERATE_ARM_C) $(QFLIGHT_BUILD)/qflight_dsp.h
LIBOBJS += $(QFLIGHT_BUILD)/qflight_stub.o
# Add missing parts from libc and libstdc++
MISSING_TOOLCHAIN_FLAGS += -DHAVE_STD_NULLPTR_T=0 -DHAVE_STD_MOVE=0 -DHAVE_STD_REMOVE_REFERENCE=0 -DHAVE_TYPE_TRAITS_H=0 -DHAVE_BYTESWAP_H=0 -DHAVE_ENDIAN_H=1
# Hardcoded libraries/AP_Common/missing/cmath defines in "make" to retain the current behavior
EXTRAFLAGS += -DHAVE_CMATH_ISFINITE -DNEED_CMATH_ISFINITE_STD_NAMESPACE
EXTRAFLAGS += -D__STDC_FORMAT_MACROS
# DSP build flags
DSP_INC=$(MISSING_TOOLCHAIN_FLAGS) $(SHARED_INC) -I$(HEXAGON_FC_ADDON)/hexagon/inc -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/sys -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/sys/sys -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/sys/machine -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/include -I$(HEXAGON_SDK_ROOT)/lib/common/qurt/ADSPv5MP/include -I$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/hexagon_ReleaseG -I$(QFLIGHT_BUILD) -I$(HEXAGON_SDK_ROOT)/inc/stddef -I$(SKETCHBOOK)/libraries
DSP_FLAGS=-mv5 -G0 -g -O3 -fno-exceptions -fno-strict-aliasing -fno-zero-initialized-in-bss -fdata-sections -fpic -D__V_DYNAMIC__ $(DSP_INC) -D_PID_T -D_UID_T -D_TIMER_T -D_HAS_C9X
$(GENERATE_TARGETS): $(QFLIGHT_SRC)/qflight_dsp.idl
@echo Generating DSP IDL sources for $^
$(v)mkdir -p $(QFLIGHT_BUILD)
$(v)$(LINUX_QAIC) -mdll -o $(QFLIGHT_BUILD) -I$(QFLIGHT_SRC) -I$(HEXAGON_SDK_ROOT)/inc/stddef $<
DSP_LINK_FLAGS = -mv5 -O3 -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -Wl,-soname=libqflight_skel.so
ARM_INC=-I$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_ReleaseG -I$(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship -I$(HEXAGON_SDK_ROOT)/inc/stddef -I$(BUILDROOT)/libraries -I$(HEXAGON_SDK_ROOT)/inc/stddef
ARM_CFLAGS=-fPIC -mword-relocations -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -march=armv7-a -g -O3 -fno-strict-aliasing -DARM_ARCH_7A -DUSE_SYSLOG $(ARM_INC)
ARM_LINK_LIBS1 = -L$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_ReleaseG -ladsprpc $(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship/rpcmem.a $(HEXAGON_SDK_ROOT)/lib/common/adspmsgd/ship/UbuntuARM_ReleaseG/adspmsgd.a
ARM_LINK_LIBS2 = -lm -lc -lsupc++ -lgcc_eh -lgcc
ARM_LINK_FLAGS = -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -Wl,-unresolved-symbols=ignore-in-shared-libs -Wl,-ldl
LIBS += $(ARM_LINK_FLAGS) $(ARM_LINK_LIBS1) $(ARM_LINK_LIBS2)
CXXOPTS += $(ARM_CFLAGS)
COPTS += $(ARM_CFLAGS)
LIBSKETCH_SKEL_SO = $(BUILDROOT)/libqflight_skel.so
.SUFFIXES: .o .c .cpp .so .do
# build DSP object from C file
$(BUILDROOT)/libraries/%.do: $(SKETCHBOOK)/libraries/%.c $(MAVLINK_HEADERS)
$(RULEHDR)
$(v)$(QURT_CC) $(DSP_FLAGS) -c -o $@ $<
$(BUILDROOT)/libraries/AP_HAL_Linux/qflight/%.o: $(BUILDROOT)/libraries/AP_HAL_Linux/qflight/%.c
$(RULEHDR)
$(v)$(CC) -c -fPIC -mword-relocations -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -march=armv7-a -g -O3 -fno-strict-aliasing -DARM_ARCH_7A -DUSE_SYSLOG -I$(HEXAGON_SDK_ROOT)/inc/stddef -I$(HEXAGON_SDK_ROOT)/lib/common/adspmsgd/ship/UbuntuARM_ReleaseG -I$(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship -I$(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship -I$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_ReleaseG -std=gnu99 -o $@ $<
$(BUILDROOT)/libraries/%.do: $(SKETCHBOOK)/libraries/%.cpp
$(RULEHDR)
$(v)$(QURT_CXX) -std=gnu++11 $(DSP_FLAGS) -DSKEL_INVOKE=$(SKETCH)_skel_invoke -c -o $@ $<
.c.do:
$(RULEHDR)
$(v)$(QURT_CC) $(DSP_FLAGS) -DSKEL_INVOKE=$(SKETCH)_skel_invoke -c -o $@ $<
.cpp.do:
$(RULEHDR)
$(v)$(QURT_CXX) -std=gnu++11 $(DSP_FLAGS) -DSKEL_INVOKE=$(SKETCH)_skel_invoke -c -o $@ $<
DSPSKELOBJS=$(QFLIGHT_BUILD)/qflight_skel.do $(QFLIGHT_BUILD)/dsp_functions.do $(BUILDROOT)/libraries/AP_HAL/utility/RingBuffer.do
$(SKETCHELF): $(LIBSKETCH_SKEL_SO)
$(LIBSKETCH_SKEL_SO): $(DSPSKELOBJS)
@echo Linking $@
$(v)$(HEXAGON_LINK) -L$(HEXAGON_FC_ADDON)/hexagon/libs -lmpu9x50 -lbmp280 -g -mv5 -mG0lib -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -lc -lm -Wl,-soname=libqflight_skel.so -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive -Wl,$(LIBSTDCXX)
$(v)cp $(LIBSKETCH_SKEL_SO) .
@echo "DSP skel firmware is in libqflight_skel.so"
# Link the final object
$(SKETCHELF): $(SKETCHOBJS) $(LIBOBJS)
@echo "Building $(SKETCHELF)"
$(RULEHDR)
$(v)$(QFLIGHT_CC) -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -Wl,-unresolved-symbols=ignore-in-shared-libs -Wl,-ldl -o $@ -Wl,"-(" $(SKETCHOBJS) $(LIBOBJS) -L$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_ReleaseG/ -ladsprpc $(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship/rpcmem.a $(HEXAGON_SDK_ROOT)/lib/common/adspmsgd/ship/UbuntuARM_ReleaseG/adspmsgd.a -Wl,"-)" -lm -lc -lsupc++ -lgcc_eh -lgcc -lpthread -lstdc++
#$(v)$(LD) $(LDFLAGS) -o $@ $(SKETCHOBJS) $(LIBOBJS) $(LIBS)
$(v)cp $(SKETCHELF) .
@echo "Firmware is in $(BUILDELF)"
qflight_send: qflight
rsync -av $(LIBSKETCH_SKEL_SO) root@$(FLIGHT_BOARD):/usr/share/data/adsp
rsync -av $(SKETCHELF) root@$(FLIGHT_BOARD):

View File

@ -1,176 +0,0 @@
# extra rules for qualcomm flight build targeting the DSPs
# host name of flight board for "qurt_send" target
FLIGHT_BOARD ?= flight4
HEXAGON_TOOLS_ROOT ?= $(HOME)/Qualcomm/HEXAGON_Tools/7.2.11
HEXAGON_SDK_ROOT ?= $(HOME)/Qualcomm/Hexagon_SDK/2.0
HEXAGON_FC_ADDON ?= $(HOME)/Qualcomm/HexagonFCAddon/flight_controller
V_ARCH = v5
CROSSDEV = hexagon-
HEXAGON_BIN = $(addsuffix /Tools/bin,$(HEXAGON_TOOLS_ROOT))
HEXAGON_CLANG_BIN = $(addsuffix /Tools/bin,$(HEXAGON_TOOLS_ROOT))
QURT_CC = $(HEXAGON_CLANG_BIN)/$(CROSSDEV)clang
QURT_CXX = $(HEXAGON_CLANG_BIN)/$(CROSSDEV)clang++
LINUX_QAIC = $(HEXAGON_SDK_ROOT)/tools/qaic/Linux/qaic
QURT_ARM_GCC_ROOT = $(HEXAGON_SDK_ROOT)/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux
QURT_ARM_CC = $(QURT_ARM_GCC_ROOT)/bin/arm-linux-gnueabihf-gcc
QURT_ARM_CXX = $(QURT_ARM_GCC_ROOT)/bin/arm-linux-gnueabihf-g++
HEXAGON_LINK = $(QURT_CC)
LIBSTDCXX = $(HEXAGON_TOOLS_ROOT)/Tools/target/hexagon/lib/v5/G0/pic/libstdc++.a
LIBQCC = $(HEXAGON_TOOLS_ROOT)/Tools/target/hexagon/lib/v5/G0/pic/libqcc.a
QFLIGHT_CC = $(QURT_ARM_CC)
QFLIGHT_CXX = $(QURT_ARM_CXX)
OPT = -O3
include $(MK_DIR)/find_tools.mk
# Hardcoded libraries/AP_Common/missing/cmath defines in "make" to retain the current behavior
EXTRAFLAGS += -DHAVE_CMATH_ISFINITE -DNEED_CMATH_ISFINITE_STD_NAMESPACE -DHAVE_BYTESWAP_H=1 -DHAVE_ENDIAN_H=1
EXTRAFLAGS += -D__STDC_FORMAT_MACROS
DEFINES += -DSKETCH=\"$(SKETCH)\" -DSKETCHNAME="\"$(SKETCH)\"" -DSKETCHBOOK="\"$(SKETCHBOOK)\"" -DAPM_BUILD_DIRECTORY=APM_BUILD_$(SKETCH)
DEFINES += $(EXTRAFLAGS)
DEFINES += -DCONFIG_HAL_BOARD=$(HAL_BOARD) -DCONFIG_HAL_BOARD_SUBTYPE=$(HAL_BOARD_SUBTYPE) -DAP_MAIN=ArduPilot_main
DEPFLAGS = -MD -MP -MT $@
CXXOPTS = -ffunction-sections -fdata-sections -fno-exceptions -fsigned-char $(DSP_CFLAGS) $(WARNFLAGSCXX)
COPTS = -ffunction-sections -fdata-sections -fsigned-char $(DSP_CFLAGS)
# DSP build flags
DSP_INC=-I$(HEXAGON_SDK_ROOT)/gnu/hexagon/include -I$(HEXAGON_FC_ADDON)/hexagon/inc -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/sys -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/sys/sys -I$(HEXAGON_FC_ADDON)/hexagon/inc/dspal/include -I$(HEXAGON_SDK_ROOT)/lib/common/qurt/ADSPv5MP/include -I$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/hexagon_Debug_dynamic -I$(HEXAGON_SDK_ROOT)/inc/stddef -I$(HAL_QURT_BUILD)
DSP_WARN=-Wno-unused-parameter -Wno-gnu-variable-sized-type-not-at-end -Wno-gnu-designator -Wno-absolute-value
DSP_FLAGS=-mv5 -G0 -g $(OPT) $(DSP_WARN) -fno-exceptions -fno-strict-aliasing -fno-zero-initialized-in-bss -fdata-sections -fpic -D__V_DYNAMIC__ -D_DEBUG $(DSP_INC) -D_PID_T -D_UID_T -D_TIMER_T -D_HAS_C9X
DSP_LINK_FLAGS = -mv5 -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -Wl,-soname=lib$(SKETCHNAME)_skel.so
# Add missing parts from libc and libstdc++
MISSING_TOOLCHAIN_FLAGS += -DHAVE_STD_NULLPTR_T=0 -DHAVE_STD_MOVE=0 -DHAVE_STD_REMOVE_REFERENCE=0 -DHAVE_TYPE_TRAITS_H=0 -DHAVE_BYTESWAP_H=0
CXXFLAGS += -std=gnu++11 $(WARNFLAGS) $(WARNFLAGSCXX) $(DEPFLAGS) $(MISSING_TOOLCHAIN_FLAGS) $(CXXOPTS) $(DEFINES) $(DSP_FLAGS)
CFLAGS += $(WARNFLAGS) $(DEPFLAGS) $(COPTS) $(DEFINES) $(DSP_FLAGS)
ARM_INC=-I$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_Debug -I$(SKETCHBOOK)/libraries/
ARM_WARN=-Wno-unused-parameter -Wno-unknown-pragmas
ARM_CFLAGS=$(ARM_WARN) -fPIC -mword-relocations -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -march=armv7-a -g -O0 -fno-strict-aliasing -DARM_ARCH_7A -DUSE_SYSLOG $(ARM_INC) -I$(HEXAGON_SDK_ROOT)/inc/stddef -DCONFIG_HAL_BOARD=HAL_BOARD_LINUX -DCONFIG_HAL_BOARD_SUBTYPE=HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
ifeq ($(VERBOSE),)
v = @
else
v =
endif
# Library object files
LIBOBJS := $(SKETCHLIBOBJS)
# The ELF file
SKETCHELF = $(BUILDROOT)/$(SKETCH).elf
LIBSKETCH_SKEL_SO = $(BUILDROOT)/libardupilot_skel.so
BUILDELF = $(notdir $(SKETCHELF))
# All of the objects that may be built
ALLOBJS = $(SKETCHOBJS) $(LIBOBJS)
# All of the dependency files that may be generated
ALLDEPS = $(ALLOBJS:%.o=%.d)
HAL_QURT_SRC = $(SKETCHBOOK)/libraries/AP_HAL_QURT
HAL_QURT_BUILD = $(BUILDROOT)/libraries/AP_HAL_QURT
# main app sources
MAINAPP_SRC = $(wildcard $(HAL_QURT_SRC)/mainapp/*.cpp) $(wildcard $(SKETCHBOOK)/libraries/AP_HAL/utility/*.cpp)
MAINAPPOBJS = $(subst $(SKETCHBOOK)/,$(BUILDROOT)/,$(MAINAPP_SRC:%.cpp=%.ao)) $(HAL_QURT_BUILD)/ardupilot_stub.ao
.SUFFIXES: .ao .o .c .so .do
# build arm object
$(BUILDROOT)/libraries/%.ao: $(SKETCHBOOK)/libraries/%.c
$(RULEHDR)
$(v)$(QURT_ARM_CC) -c $(ARM_CFLAGS) -I$(HAL_QURT_BUILD) -o $@ $< -DSKETCHNAME="\"$(SKETCH)\""
# build arm C++ object
$(BUILDROOT)/libraries/%.ao: $(SKETCHBOOK)/libraries/%.cpp $(HAL_QURT_BUILD)/qurt_dsp.h
$(RULEHDR)
$(v)$(QURT_ARM_CXX) -std=gnu++11 -c $(ARM_CFLAGS) -I$(HAL_QURT_BUILD) -o $@ $< -DSKETCHNAME="\"$(SKETCH)\""
$(BUILDROOT)/libraries/%.ao: $(BUILDROOT)/libraries/%.c
$(RULEHDR)
$(v)$(QURT_ARM_CC) -c $(ARM_CFLAGS) -I$(HAL_QURT_BUILD) -o $@ $< -DSKETCHNAME="\"$(SKETCH)\""
# build DSP object from C file
$(BUILDROOT)/libraries/%.do: $(BUILDROOT)/libraries/%.c
$(RULEHDR)
$(v)$(QURT_CC) $(CFLAGS) -I$(HEXAGON_SDK_ROOT)/inc/stddef -DSKEL_INVOKE=$(SKETCH)_skel_invoke -c -o $@ $<
################################################################################
# Targets
#
all: $(SKETCHELF)
print-%:
echo "$*=$($*)"
################################################################################
# Rules
#
SKETCH_INCLUDES = $(SKETCHLIBINCLUDES)
SLIB_INCLUDES = $(SKETCHLIBINCLUDES)
# fetch dependency info from a previous build if any of it exists
-include $(ALLDEPS)
GENERATE_DSP_C = $(HAL_QURT_BUILD)/ardupilot_skel.c
GENERATE_ARM_C = $(HAL_QURT_BUILD)/ardupilot_stub.c
GENERATE_TARGETS = $(HAL_QURT_BUILD)/qurt_dsp.h $(GENERATE_DSP_C) $(GENERATE_ARM_C)
$(GENERATE_TARGETS): $(HAL_QURT_SRC)/qurt_dsp.idl
@echo Generating DSP IDL sources for $^
$(v)mkdir -p $(HAL_QURT_BUILD)
$(v)$(LINUX_QAIC) -mdll -o $(HAL_QURT_BUILD) -I$(HAL_QURT_SRC) -I$(HEXAGON_SDK_ROOT)/inc/stddef $<
# Link the final object
$(SKETCHELF): $(MAINAPPOBJS) $(LIBSKETCH_SKEL_SO) $(GENERATE_TARGETS)
@echo "Building $(SKETCHELF)"
$(RULEHDR)
$(v)$(QFLIGHT_CXX) -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 -Wl,-unresolved-symbols=ignore-in-shared-libs -Wl,-ldl -o $@ -Wl,"-(" $(MAINAPPOBJS) -L$(HEXAGON_SDK_ROOT)/lib/common/remote/ship/UbuntuARM_ReleaseG/ -ladsprpc $(HEXAGON_SDK_ROOT)/lib/common/rpcmem/UbuntuARM_ReleaseG/ship/rpcmem.a $(HEXAGON_SDK_ROOT)/lib/common/adspmsgd/ship/UbuntuARM_ReleaseG/adspmsgd.a -Wl,"-)" -lm -lc -lsupc++ -lgcc_eh -lgcc -lpthread -lstdc++
$(v)cp $(SKETCHELF) .
@echo "Firmware is in $(BUILDELF)"
DSPSKELOBJS=$(HAL_QURT_BUILD)/ardupilot_skel.do
# this is quite bizarre. The provided libc mixes PIC and non-PIC code,
# which seems to confuse the linker. In order to link to some critical
# system objects we need to extract them from libc into a new library
LIBC_SRC=$(HEXAGON_TOOLS_ROOT)/Tools/target/hexagon/lib/v5/G0/pic/libc.a
LIBC_EXTRACTDIR=$(BUILDROOT)/libc_extracted
LIBC_OBJECTS=xfdtest.o xdtest.o feclearexcept.o fegetenv.o fesetenv.o
LIBC_EXTRACTED=$(LIBC_EXTRACTDIR)/libc_extracted.a
$(LIBC_EXTRACTED): $(LIBC_SRC)
$(v)echo Extracting libc objects into $@
$(v)mkdir -p $(LIBC_EXTRACTDIR)
$(v)(cd $(LIBC_EXTRACTDIR) && ar x $(LIBC_SRC) $(LIBC_OBJECTS) && ar crs libc_extracted.a $(LIBC_OBJECTS))
$(LIBSKETCH_SKEL_SO): $(DSPSKELOBJS) $(ALLOBJS) $(GENERATE_TARGETS) $(LIBC_EXTRACTED)
@echo Linking $@
$(v)$(HEXAGON_LINK) -L$(HEXAGON_FC_ADDON)/hexagon/libs -lmpu9x50 -lbmp280 -lcsr_gps -g -mv5 -mG0lib -G0 -fpic -shared -Wl,-Bsymbolic -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=realloc -Wl,--wrap=memalign -Wl,--wrap=__stack_chk_fail -lc -lm -Wl,-soname=libqflight_skel.so -o $@ -Wl,--whole-archive $(DSPSKELOBJS) $(ALLOBJS) $(LIBC_EXTRACTED) -Wl,--no-whole-archive -Wl,$(LIBSTDCXX) -Wl,$(LIBQCC) -Wl,$(HEXAGON_TOOLS_ROOT)/Tools/target/hexagon/lib/v5/G0/libdl.a
$(v)cp $(LIBSKETCH_SKEL_SO) .
@echo "DSP skel firmware is in $(BUILDELF)"
include $(MK_DIR)/build_rules.mk
qurt_send: qurt
rsync -av $(LIBSKETCH_SKEL_SO) root@$(FLIGHT_BOARD):/usr/share/data/adsp
rsync -av $(SKETCHELF) root@$(FLIGHT_BOARD):

View File

@ -151,16 +151,6 @@ HAL_BOARD = HAL_BOARD_VRBRAIN
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE
endif endif
ifneq ($(findstring qflight, $(MAKECMDGOALS)),)
HAL_BOARD = HAL_BOARD_LINUX
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
endif
ifneq ($(findstring qurt, $(MAKECMDGOALS)),)
HAL_BOARD = HAL_BOARD_QURT
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE
endif
ifneq ($(findstring f4light, $(MAKECMDGOALS)),) ifneq ($(findstring f4light, $(MAKECMDGOALS)),)
HAL_BOARD = HAL_BOARD_F4LIGHT HAL_BOARD = HAL_BOARD_F4LIGHT
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE

View File

@ -29,5 +29,4 @@ help:
@echo " px4-v4 - the XRacer" @echo " px4-v4 - the XRacer"
@echo " vrbrain - the VRBrain boards" @echo " vrbrain - the VRBrain boards"
@echo " sitl - the SITL Software In The Loop simulation" @echo " sitl - the SITL Software In The Loop simulation"
@echo " qflight - qualcomm flight board"
@echo " f4light - the OpenPilot Revolution, Revolution Mini, AirbotF4 and similar boards" @echo " f4light - the OpenPilot Revolution, Revolution Mini, AirbotF4 and similar boards"

View File

@ -64,11 +64,6 @@ LIBTOKENS += \
AP_HAL_VRBRAIN AP_HAL_VRBRAIN
endif endif
ifeq ($(HAL_BOARD),HAL_BOARD_QURT)
LIBTOKENS += \
AP_HAL_QURT
endif
ifeq ($(HAL_BOARD),HAL_BOARD_F4LIGHT) ifeq ($(HAL_BOARD),HAL_BOARD_F4LIGHT)
LIBTOKENS += \ LIBTOKENS += \
AP_HAL_F4Light AP_HAL_F4Light

View File

@ -19,14 +19,6 @@ f4light: HAL_BOARD = HAL_BOARD_F4LIGHT
f4light: TOOLCHAIN = ARM f4light: TOOLCHAIN = ARM
f4light: all f4light: all
qflight: HAL_BOARD = HAL_BOARD_LINUX
qflight: TOOLCHAIN = QFLIGHT
qflight: all
qurt: HAL_BOARD = HAL_BOARD_QURT
qurt: TOOLCHAIN = QURT
qurt: all
# cope with HIL targets # cope with HIL targets
%-hil: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS " %-hil: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS "
%-hilsensors: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS " %-hilsensors: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_SENSORS "