mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-28 19:48:31 -04:00
mk: remove support for flymaple
This commit is contained in:
parent
33f5fc5f38
commit
8bec17e05b
@ -42,10 +42,6 @@ ifeq ($(HAL_BOARD),HAL_BOARD_VRBRAIN)
|
||||
include $(MK_DIR)/board_vrbrain.mk
|
||||
endif
|
||||
|
||||
ifeq ($(HAL_BOARD),HAL_BOARD_FLYMAPLE)
|
||||
include $(MK_DIR)/board_flymaple.mk
|
||||
endif
|
||||
|
||||
ifeq ($(HAL_BOARD),HAL_BOARD_QURT)
|
||||
include $(MK_DIR)/board_qurt.mk
|
||||
endif
|
||||
|
@ -1,176 +0,0 @@
|
||||
# board_flymaple.mk
|
||||
#
|
||||
# Build ArduPlane for Flymaple http://www.open-drone.org/flymaple
|
||||
|
||||
# cope with relative paths
|
||||
ifeq ($(wildcard $(LIBMAPLE_PATH)/wirish),)
|
||||
LIBMAPLE_PATH := $(shell cd $(SKETCHBOOK)/../libmaple && pwd)
|
||||
endif
|
||||
|
||||
ifeq ($(wildcard $(LIBMAPLE_PATH)/wirish),)
|
||||
$(error ERROR: failed to find libmaple - please see libraries/AP_HAL_FLYMAPLE/FlymaplePortingNotes.txt)
|
||||
endif
|
||||
|
||||
|
||||
TOOLCHAIN = ARM
|
||||
|
||||
include $(MK_DIR)/find_tools.mk
|
||||
|
||||
HARDWARE := leaflabs
|
||||
MCU := STM32F103RE
|
||||
FAMILY := cortex-m3
|
||||
F_CPU := 72000000L
|
||||
LINKER := maple_RET6/flash.ld
|
||||
HARDWARE_CORE := maple
|
||||
UPLOADER := dfu-util
|
||||
USBID := 1EAF:0003
|
||||
PRODUCT_ID := 0003
|
||||
LD_MEM_DIR := sram_64k_flash_512k
|
||||
|
||||
# Hardcoded libraries/AP_Common/missing/cmath defines in "make" to retain the current behavior
|
||||
EXTRAFLAGS += -DHAVE_CMATH_ISFINITE -DNEED_CMATH_ISFINITE_STD_NAMESPACE
|
||||
|
||||
#
|
||||
# Tool options
|
||||
#
|
||||
DEFINES = -DF_CPU=$(F_CPU) -DMCU_$(MCU) -DBOARD_$(BOARD) -DERROR_LED_PORT=GPIOA -DERROR_LED_PIN=5 -DVECT_TAB_FLASH
|
||||
DEFINES += -DSKETCH=\"$(SKETCH)\" -DAPM_BUILD_DIRECTORY=APM_BUILD_$(SKETCH)
|
||||
DEFINES += $(EXTRAFLAGS)
|
||||
DEFINES += -DCONFIG_HAL_BOARD=$(HAL_BOARD)
|
||||
WARNFLAGS = -Wall -Wextra -Wlogical-op -Wformat -Wshadow -Wpointer-arith -Wcast-align -Wno-psabi
|
||||
WARNFLAGS += -Wwrite-strings -Wformat=2 -Wno-unused-parameter -Wno-redundant-decls -Wno-unknown-pragmas
|
||||
WARNFLAGSCXX = -Wno-reorder
|
||||
DEPFLAGS = -MD -MT $@
|
||||
|
||||
CXXOPTS = -std=gnu++11 -ffunction-sections -fdata-sections -fno-exceptions -fsigned-char
|
||||
COPTS = -ffunction-sections -fdata-sections -fsigned-char
|
||||
|
||||
ASOPTS = -x assembler-with-cpp
|
||||
LISTOPTS = -adhlns=$(@:.o=.lst)
|
||||
|
||||
NATIVE_CPUFLAGS = -D_GNU_SOURCE
|
||||
NATIVE_CPULDFLAGS = -g
|
||||
NATIVE_OPTFLAGS = -O0 -g
|
||||
|
||||
ARM_CPUFLAGS = -mcpu=$(FAMILY) -march=armv7-m -mthumb -DBOARD_maple -DMCU_$(MCU)
|
||||
ARM_CPULDFLAGS = -T$(LIBMAPLE_PATH)/support/ld/flash.ld -L $(LIBMAPLE_PATH)/support/ld/stm32/series/stm32f1/performance -L $(LIBMAPLE_PATH)/support/ld/stm32/mem/$(LD_MEM_DIR) -L $(LIBMAPLE_PATH)/support/ld -L $(LIBMAPLE_PATH)/support/ld/toolchains/generic
|
||||
ARM_OPTFLAGS = -Os
|
||||
|
||||
CPUFLAGS= $($(TOOLCHAIN)_CPUFLAGS)
|
||||
CPULDFLAGS= $($(TOOLCHAIN)_CPULDFLAGS)
|
||||
OPTFLAGS= $($(TOOLCHAIN)_OPTFLAGS)
|
||||
|
||||
CXXFLAGS = $(CPUFLAGS) $(DEFINES) -Os -g3 -gdwarf-2 -nostdlib \
|
||||
-ffunction-sections -fdata-sections \
|
||||
-fno-rtti -fno-exceptions -Wl,--gc-sections $(OPTFLAGS)
|
||||
CXXFLAGS += $(WARNFLAGS) $(WARNFLAGSCXX) $(DEPFLAGS) $(CXXOPTS)
|
||||
CFLAGS = $(CPUFLAGS) $(DEFINES) -Os -g3 -gdwarf-2 -nostdlib \
|
||||
-ffunction-sections -fdata-sections \
|
||||
-fno-exceptions -Wl,--gc-sections $(OPTFLAGS)
|
||||
CFLAGS += $(WARNFLAGS) $(DEPFLAGS) $(COPTS)
|
||||
ASFLAGS = $(CPUFLAGS) $(DEFINES) -x assembler-with-cpp
|
||||
ASFLAGS += $(ASOPTS)
|
||||
|
||||
LDFLAGS = $(CPUFLAGS) $(OPTFLAGS) -mcpu=cortex-m3 -mthumb \
|
||||
-Xlinker --gc-sections \
|
||||
-Xassembler --march=armv7-m -Wall
|
||||
LDFLAGS += -Wl,--gc-sections -Wl,-Map -Wl,$(SKETCHMAP) $(CPULDFLAGS)
|
||||
|
||||
LIBS = -lm
|
||||
|
||||
ifeq ($(VERBOSE),)
|
||||
v = @
|
||||
else
|
||||
v =
|
||||
endif
|
||||
|
||||
COREOBJS = $(LIBMAPLE_PATH)/build/libmaple/*.o $(LIBMAPLE_PATH)/build/libmaple/usb/stm32f1/*.o $(LIBMAPLE_PATH)/build/libmaple/stm32f1/*.o $(LIBMAPLE_PATH)/build/libmaple/usb/usb_lib/*.o $(LIBMAPLE_PATH)/build/libmaple/usb/usb_lib/*.o $(LIBMAPLE_PATH)/build/libmaple/stm32f1/performance/*.o $(LIBMAPLE_PATH)/build/wirish/*.o $(LIBMAPLE_PATH)/build/wirish/boards/maple/*.o $(LIBMAPLE_PATH)/build/wirish/stm32f1/*.o $(LIBMAPLE_PATH)/build/libraries/Wire/*.o
|
||||
COREINCLUDES = -I$(LIBMAPLE_PATH)/libmaple/include/libmaple -I$(LIBMAPLE_PATH)/wirish/include/wirish -I$(LIBMAPLE_PATH)/libraries -I$(LIBMAPLE_PATH)/libmaple/include/libmaple -I$(LIBMAPLE_PATH)/wirish/include/wirish -I$(LIBMAPLE_PATH)/libraries -I$(LIBMAPLE_PATH)/libmaple/include -I$(LIBMAPLE_PATH)/libmaple/stm32f1/include -I$(LIBMAPLE_PATH)/wirish/include -I$(LIBMAPLE_PATH)/wirish/boards/maple/include -I$(LIBMAPLE_PATH)/libraries/Wire
|
||||
|
||||
# Library object files
|
||||
LIBOBJS := $(SKETCHLIBOBJS) $(COREOBJS)
|
||||
|
||||
################################################################################
|
||||
# Built products
|
||||
#
|
||||
|
||||
# The ELF file
|
||||
SKETCHELF = $(BUILDROOT)/$(SKETCH).elf
|
||||
BUILDELF = $(notdir $(SKETCHELF))
|
||||
|
||||
# HEX file
|
||||
SKETCHHEX = $(BUILDROOT)/$(SKETCH).hex
|
||||
|
||||
# BIN file
|
||||
SKETCHBIN = $(BUILDROOT)/$(SKETCH).bin
|
||||
|
||||
# EEP file
|
||||
SKETCHEEP = $(BUILDROOT)/$(SKETCH).eep
|
||||
|
||||
# Map file
|
||||
SKETCHMAP = $(BUILDROOT)/$(SKETCH).map
|
||||
|
||||
# All of the objects that may be built
|
||||
ALLOBJS = $(SKETCHOBJS) $(LIBOBJS)
|
||||
|
||||
# All of the dependency files that may be generated
|
||||
ALLDEPS = $(ALLOBJS:%.o=%.d)
|
||||
|
||||
################################################################################
|
||||
# Targets
|
||||
#
|
||||
|
||||
all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX)
|
||||
|
||||
print-%:
|
||||
echo "$*=$($*)"
|
||||
|
||||
flymaple-upload: upload
|
||||
|
||||
.PHONY: upload
|
||||
upload: $(SKETCHBIN)
|
||||
$(LIBMAPLE_PATH)/support/scripts/reset.py && sleep 1 && $(UPLOADER) -a1 -d $(USBID) -D $(SKETCHBIN) -R
|
||||
|
||||
debug:
|
||||
$(AVARICE) --mkII --capture --jtag usb :4242 & \
|
||||
gnome-terminal -x $(GDB) $(SKETCHELF) & \
|
||||
echo -e '\n\nat the gdb prompt type "target remote localhost:4242"'
|
||||
|
||||
# this allows you to flash your image via JTAG for when you
|
||||
# have completely broken your USB
|
||||
jtag-program:
|
||||
$(AVARICE) --mkII --jtag usb --erase --program --file $(SKETCHELF)
|
||||
|
||||
################################################################################
|
||||
# Rules
|
||||
#
|
||||
|
||||
# fetch dependency info from a previous build if any of it exists
|
||||
-include $(ALLDEPS)
|
||||
|
||||
# Link the final object
|
||||
$(SKETCHELF): $(SKETCHOBJS) $(LIBOBJS)
|
||||
$(RULEHDR)
|
||||
$(v)$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
$(v)cp $(SKETCHELF) .
|
||||
@echo "Firmware is in $(BUILDELF)"
|
||||
|
||||
# Create the hex file
|
||||
$(SKETCHHEX): $(SKETCHELF)
|
||||
$(RULEHDR)
|
||||
$(v)$(OBJCOPY) -O ihex -R .eeprom $< $@
|
||||
|
||||
# Create the bin file
|
||||
$(SKETCHBIN): $(SKETCHELF)
|
||||
$(RULEHDR)
|
||||
$(v)$(OBJCOPY) -v -O binary $< $@
|
||||
|
||||
# Create the eep file
|
||||
$(SKETCHEEP): $(SKETCHELF)
|
||||
$(RULEHDR)
|
||||
$(v)$(OBJCOPY) -O ihex -j.eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 $< $@
|
||||
|
||||
SKETCH_INCLUDES = $(SKETCHLIBINCLUDES) $(ARDUINOLIBINCLUDES) $(COREINCLUDES)
|
||||
SLIB_INCLUDES = -I$(dir $<)/utility $(SKETCHLIBINCLUDES) $(ARDUINOLIBINCLUDES) $(COREINCLUDES)
|
||||
|
||||
include $(MK_DIR)/build_rules.mk
|
@ -211,10 +211,6 @@ HAL_BOARD = HAL_BOARD_VRBRAIN
|
||||
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_NONE
|
||||
endif
|
||||
|
||||
ifneq ($(findstring flymaple, $(MAKECMDGOALS)),)
|
||||
HAL_BOARD = HAL_BOARD_FLYMAPLE
|
||||
endif
|
||||
|
||||
ifneq ($(findstring bhat, $(MAKECMDGOALS)),)
|
||||
HAL_BOARD = HAL_BOARD_LINUX
|
||||
HAL_BOARD_SUBTYPE = HAL_BOARD_SUBTYPE_LINUX_BH
|
||||
|
@ -36,16 +36,6 @@ NATIVE_OBJCOPY := objcopy
|
||||
|
||||
AVARICE := $(call FIND_TOOL,avarice)
|
||||
|
||||
# Tools for Maple/Flymaple
|
||||
# Toolchain is expected to be on the PATH
|
||||
ARM_CXX := $(call FIND_TOOL,arm-none-eabi-g++)
|
||||
ARM_CC := $(call FIND_TOOL,arm-none-eabi-gcc)
|
||||
ARM_AS := $(call FIND_TOOL,arm-none-eabi-gcc)
|
||||
ARM_AR := $(call FIND_TOOL,arm-none-eabi-ar)
|
||||
ARM_LD := $(call FIND_TOOL,arm-none-eabi-g++)
|
||||
ARM_GDB := $(call FIND_TOOL,arm-none-eabi-gdb)
|
||||
ARM_OBJCOPY := $(call FIND_TOOL,arm-none-eabi-objcopy)
|
||||
|
||||
# toolchains for beagleboneblack
|
||||
BBONE_CXX := arm-linux-gnueabihf-g++
|
||||
BBONE_CC := arm-linux-gnueabihf-gcc
|
||||
|
@ -26,7 +26,6 @@ help:
|
||||
@echo " pxf - the Beagle Bone Black (BBB) + PXF cape combination"
|
||||
@echo " navio - the RaspberryPi + NavIO cape combination"
|
||||
@echo " linux - a generic Linux build"
|
||||
@echo " flymaple - the FlyMaple board"
|
||||
@echo " vrbrain - the VRBrain boards"
|
||||
@echo " sitl - the SITL Software In The Loop simulation"
|
||||
@echo " bbbmini - the Beagle Bone Black mini"
|
||||
|
@ -58,11 +58,6 @@ LIBTOKENS += \
|
||||
AP_HAL_VRBRAIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAL_BOARD),HAL_BOARD_FLYMAPLE)
|
||||
LIBTOKENS += \
|
||||
AP_HAL_FLYMAPLE
|
||||
endif
|
||||
|
||||
ifeq ($(HAL_BOARD),HAL_BOARD_QURT)
|
||||
LIBTOKENS += \
|
||||
AP_HAL_QURT
|
||||
|
@ -12,11 +12,8 @@ sitl-arm: all
|
||||
apm1 apm1-1280 apm2 apm2beta:
|
||||
$(error $@ is deprecated on master branch; use master-AVR)
|
||||
|
||||
flymaple: HAL_BOARD = HAL_BOARD_FLYMAPLE
|
||||
flymaple: TOOLCHAIN = ARM
|
||||
flymaple: all
|
||||
flymaple-hil: EXTRAFLAGS += "-DHIL_MODE=HIL_MODE_ATTITUDE "
|
||||
flymaple-hil: flymaple
|
||||
flymaple flymaple-hil:
|
||||
$(error $@ is deprecated on master branch; use master-AVR)
|
||||
|
||||
linux: HAL_BOARD = HAL_BOARD_LINUX
|
||||
linux: TOOLCHAIN = NATIVE
|
||||
|
Loading…
Reference in New Issue
Block a user