2014-08-01 06:12:39 -07:00
|
|
|
###############################################################################
|
|
|
|
# "THE BEER-WARE LICENSE" (Revision 42):
|
|
|
|
# <msmith@FreeBSD.ORG> wrote this file. As long as you retain this notice you
|
|
|
|
# can do whatever you want with this stuff. If we meet some day, and you think
|
|
|
|
# this stuff is worth it, you can buy me a beer in return
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# Makefile for building the cleanflight firmware.
|
|
|
|
#
|
|
|
|
# Invoke this with 'make help' to see the list of supported targets.
|
2014-11-07 06:26:29 -08:00
|
|
|
#
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
###############################################################################
|
2015-11-24 16:18:10 -08:00
|
|
|
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Things that the user might override on the commandline
|
|
|
|
#
|
|
|
|
|
|
|
|
# The target to build, see VALID_TARGETS below
|
|
|
|
TARGET ?= NAZE
|
|
|
|
|
|
|
|
# Compile-time options
|
|
|
|
OPTIONS ?=
|
|
|
|
|
2015-10-15 00:33:24 -07:00
|
|
|
# compile for OpenPilot BootLoader support
|
|
|
|
OPBL ?=no
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Debugger optons, must be empty or GDB
|
|
|
|
DEBUG ?=
|
|
|
|
|
2016-04-30 12:16:02 -07:00
|
|
|
# Insert the debugging hardfault debugger
|
|
|
|
# releases should not be built with this flag as it does not disable pwm output
|
|
|
|
DEBUG_HARDFAULTS ?=
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Serial port/Device for flashing
|
2015-06-23 13:42:34 -07:00
|
|
|
SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyUSB*) no-port-found)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
# Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override.
|
|
|
|
FLASH_SIZE ?=
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
###############################################################################
|
|
|
|
# Things that need to be maintained as the source changes
|
|
|
|
#
|
|
|
|
|
2015-09-19 08:47:48 -07:00
|
|
|
FORKNAME = betaflight
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-12-22 12:32:27 -08:00
|
|
|
CC3D_TARGETS = CC3D CC3D_OPBL
|
2015-11-24 16:18:10 -08:00
|
|
|
|
2016-06-10 19:42:54 -07:00
|
|
|
VALID_TARGETS = NAZE NAZE32PRO OLIMEXINO STM32F3DISCOVERY CHEBUZZF3 $(CC3D_TARGETS) CJMCU EUSTM32F103RC SPRACINGF3 PORT103R SPARKY ALIENFLIGHTF1 ALIENFLIGHTF3 COLIBRI_RACE LUX_RACE MOTOLAB RMDO IRCFUSIONF3 AFROMINI SPRACINGF3MINI SPRACINGF3EVO DOGE SINGULARITY FURYF3 SIRINFPV
|
2015-11-24 16:18:10 -08:00
|
|
|
|
|
|
|
# Valid targets for OP VCP support
|
|
|
|
VCP_VALID_TARGETS = $(CC3D_TARGETS)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-10-15 00:33:24 -07:00
|
|
|
# Valid targets for OP BootLoader support
|
2015-12-22 12:32:27 -08:00
|
|
|
OPBL_VALID_TARGETS = CC3D_OPBL
|
2015-11-24 16:18:10 -08:00
|
|
|
|
|
|
|
64K_TARGETS = CJMCU
|
2016-01-27 00:40:58 -08:00
|
|
|
128K_TARGETS = ALIENFLIGHTF1 $(CC3D_TARGETS) NAZE OLIMEXINO RMDO AFROMINI
|
2016-06-10 19:42:54 -07:00
|
|
|
256K_TARGETS = EUSTM32F103RC PORT103R STM32F3DISCOVERY CHEBUZZF3 NAZE32PRO SPRACINGF3 IRCFUSIONF3 SPARKY ALIENFLIGHTF3 COLIBRI_RACE LUX_RACE MOTOLAB SPRACINGF3MINI SPRACINGF3EVO DOGE SINGULARITY FURYF3 SIRINFPV
|
2015-11-24 16:18:10 -08:00
|
|
|
|
2016-06-10 19:42:54 -07:00
|
|
|
F3_TARGETS = STM32F3DISCOVERY CHEBUZZF3 NAZE32PRO SPRACINGF3 IRCFUSIONF3 SPARKY ALIENFLIGHTF3 COLIBRI_RACE LUX_RACE MOTOLAB RMDO SPRACINGF3MINI SPRACINGF3EVO DOGE SINGULARITY FURYF3 SIRINFPV
|
2015-11-24 16:18:10 -08:00
|
|
|
|
2016-04-30 12:16:02 -07:00
|
|
|
# note that there is no hardfault debugging startup file assembly handler for other platforms
|
|
|
|
ifeq ($(DEBUG_HARDFAULTS),F3)
|
|
|
|
CFLAGS += -DDEBUG_HARDFAULTS
|
|
|
|
STM32F30x_COMMON_SRC = startup_stm32f3_debug_hardfault_handler.S
|
|
|
|
else
|
|
|
|
STM32F30x_COMMON_SRC = startup_stm32f30x_md_gcc.S
|
|
|
|
endif
|
2015-10-15 00:33:24 -07:00
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
# Configure default flash sizes for the targets
|
|
|
|
ifeq ($(FLASH_SIZE),)
|
2015-11-24 16:18:10 -08:00
|
|
|
ifeq ($(TARGET),$(filter $(TARGET),$(64K_TARGETS)))
|
2015-03-25 14:00:58 -07:00
|
|
|
FLASH_SIZE = 64
|
2015-11-24 16:18:10 -08:00
|
|
|
else ifeq ($(TARGET),$(filter $(TARGET),$(128K_TARGETS)))
|
2015-03-25 14:00:58 -07:00
|
|
|
FLASH_SIZE = 128
|
2015-11-24 16:18:10 -08:00
|
|
|
else ifeq ($(TARGET),$(filter $(TARGET),$(256K_TARGETS)))
|
2015-03-25 14:00:58 -07:00
|
|
|
FLASH_SIZE = 256
|
|
|
|
else
|
2015-11-24 16:18:10 -08:00
|
|
|
$(error FLASH_SIZE not configured for target $(TARGET))
|
2015-03-25 14:00:58 -07:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-09-03 16:27:28 -07:00
|
|
|
REVISION = $(shell git log -1 --format="%h")
|
|
|
|
|
2016-01-28 07:21:32 -08:00
|
|
|
FC_VER_MAJOR := $(shell grep " FC_VERSION_MAJOR" src/main/version.h | awk '{print $$3}' )
|
|
|
|
FC_VER_MINOR := $(shell grep " FC_VERSION_MINOR" src/main/version.h | awk '{print $$3}' )
|
|
|
|
FC_VER_PATCH := $(shell grep " FC_VERSION_PATCH" src/main/version.h | awk '{print $$3}' )
|
|
|
|
|
|
|
|
FC_VER := $(FC_VER_MAJOR).$(FC_VER_MINOR).$(FC_VER_PATCH)
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Working directories
|
2014-10-23 05:10:45 -07:00
|
|
|
ROOT := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
2014-08-01 06:12:39 -07:00
|
|
|
SRC_DIR = $(ROOT)/src/main
|
|
|
|
OBJECT_DIR = $(ROOT)/obj/main
|
|
|
|
BIN_DIR = $(ROOT)/obj
|
|
|
|
CMSIS_DIR = $(ROOT)/lib/main/CMSIS
|
2014-11-07 06:26:29 -08:00
|
|
|
INCLUDE_DIRS = $(SRC_DIR)
|
|
|
|
LINKER_DIR = $(ROOT)/src/main/target
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
# Search path for sources
|
|
|
|
VPATH := $(SRC_DIR):$(SRC_DIR)/startup
|
2015-01-25 04:59:48 -08:00
|
|
|
USBFS_DIR = $(ROOT)/lib/main/STM32_USB-FS-Device_Driver
|
|
|
|
USBPERIPH_SRC = $(notdir $(wildcard $(USBFS_DIR)/src/*.c))
|
2015-08-04 09:08:02 -07:00
|
|
|
FATFS_DIR = $(ROOT)/lib/main/FatFS
|
|
|
|
FATFS_SRC = $(notdir $(wildcard $(FATFS_DIR)/*.c))
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-11-24 16:18:10 -08:00
|
|
|
ifeq ($(TARGET),$(filter $(TARGET),$(F3_TARGETS)))
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-09-11 02:19:25 -07:00
|
|
|
CSOURCES := $(shell find $(SRC_DIR) -name '*.c')
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
STDPERIPH_DIR = $(ROOT)/lib/main/STM32F30x_StdPeriph_Driver
|
|
|
|
|
|
|
|
STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c))
|
|
|
|
|
2014-11-08 06:25:16 -08:00
|
|
|
EXCLUDES = stm32f30x_crc.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
stm32f30x_can.c
|
|
|
|
|
|
|
|
STDPERIPH_SRC := $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC))
|
|
|
|
|
2015-01-20 14:33:03 -08:00
|
|
|
DEVICE_STDPERIPH_SRC = \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(STDPERIPH_SRC)
|
|
|
|
|
|
|
|
|
2015-01-20 14:33:03 -08:00
|
|
|
VPATH := $(VPATH):$(CMSIS_DIR)/CM1/CoreSupport:$(CMSIS_DIR)/CM1/DeviceSupport/ST/STM32F30x
|
2014-08-01 06:12:39 -07:00
|
|
|
CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM1/CoreSupport/*.c \
|
|
|
|
$(CMSIS_DIR)/CM1/DeviceSupport/ST/STM32F30x/*.c))
|
|
|
|
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(STDPERIPH_DIR)/inc \
|
|
|
|
$(CMSIS_DIR)/CM1/CoreSupport \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(CMSIS_DIR)/CM1/DeviceSupport/ST/STM32F30x
|
|
|
|
|
2015-10-29 06:57:57 -07:00
|
|
|
ifneq ($(TARGET),$(filter $(TARGET),SPRACINGF3 IRCFUSIONF3))
|
2015-01-20 14:33:03 -08:00
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(USBFS_DIR)/inc \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(ROOT)/src/main/vcp
|
|
|
|
|
2015-01-20 14:33:03 -08:00
|
|
|
VPATH := $(VPATH):$(USBFS_DIR)/src
|
|
|
|
|
|
|
|
DEVICE_STDPERIPH_SRC := $(DEVICE_STDPERIPH_SRC)\
|
|
|
|
$(USBPERIPH_SRC)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-08-04 09:08:02 -07:00
|
|
|
ifeq ($(TARGET),SPRACINGF3MINI)
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(FATFS_DIR) \
|
|
|
|
|
|
|
|
VPATH := $(VPATH):$(FATFS_DIR)
|
|
|
|
endif
|
|
|
|
|
2016-06-05 03:53:27 -07:00
|
|
|
ifeq ($(TARGET),FURY)
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(FATFS_DIR) \
|
|
|
|
|
|
|
|
VPATH := $(VPATH):$(FATFS_DIR)
|
|
|
|
endif
|
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
LD_SCRIPT = $(LINKER_DIR)/stm32_flash_f303_$(FLASH_SIZE)k.ld
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-08-19 06:11:02 -07:00
|
|
|
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -Wdouble-promotion
|
2014-09-02 17:38:27 -07:00
|
|
|
DEVICE_FLAGS = -DSTM32F303xC -DSTM32F303
|
2014-08-01 06:12:39 -07:00
|
|
|
TARGET_FLAGS = -D$(TARGET)
|
|
|
|
ifeq ($(TARGET),CHEBUZZF3)
|
|
|
|
# CHEBUZZ is a VARIANT of STM32F3DISCOVERY
|
2015-10-29 06:57:57 -07:00
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DSTM32F3DISCOVERY
|
2014-08-01 06:12:39 -07:00
|
|
|
endif
|
|
|
|
|
2015-10-29 06:57:57 -07:00
|
|
|
ifeq ($(TARGET),$(filter $(TARGET),RMDO IRCFUSIONF3))
|
|
|
|
# RMDO and IRCFUSIONF3 are a VARIANT of SPRACINGF3
|
2015-10-06 10:53:29 -07:00
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DSPRACINGF3
|
|
|
|
endif
|
|
|
|
|
2014-11-09 15:53:48 -08:00
|
|
|
else ifeq ($(TARGET),$(filter $(TARGET),EUSTM32F103RC PORT103R))
|
2014-09-02 17:38:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
STDPERIPH_DIR = $(ROOT)/lib/main/STM32F10x_StdPeriph_Driver
|
|
|
|
|
|
|
|
STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c))
|
|
|
|
|
2015-01-07 21:02:23 -08:00
|
|
|
EXCLUDES = stm32f10x_crc.c \
|
|
|
|
stm32f10x_cec.c \
|
|
|
|
stm32f10x_can.c
|
|
|
|
|
|
|
|
STDPERIPH_SRC := $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC))
|
|
|
|
|
2014-09-02 17:38:27 -07:00
|
|
|
# Search path and source files for the CMSIS sources
|
|
|
|
VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x
|
|
|
|
CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \
|
|
|
|
$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x/*.c))
|
|
|
|
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(STDPERIPH_DIR)/inc \
|
|
|
|
$(CMSIS_DIR)/CM3/CoreSupport \
|
|
|
|
$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x \
|
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
LD_SCRIPT = $(LINKER_DIR)/stm32_flash_f103_$(FLASH_SIZE)k.ld
|
2014-09-02 17:38:27 -07:00
|
|
|
|
|
|
|
ARCH_FLAGS = -mthumb -mcpu=cortex-m3
|
|
|
|
TARGET_FLAGS = -D$(TARGET) -pedantic
|
|
|
|
DEVICE_FLAGS = -DSTM32F10X_HD -DSTM32F10X
|
|
|
|
|
|
|
|
DEVICE_STDPERIPH_SRC = $(STDPERIPH_SRC)
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
else
|
|
|
|
|
|
|
|
STDPERIPH_DIR = $(ROOT)/lib/main/STM32F10x_StdPeriph_Driver
|
|
|
|
|
|
|
|
STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c))
|
|
|
|
|
2015-01-07 21:02:23 -08:00
|
|
|
EXCLUDES = stm32f10x_crc.c \
|
|
|
|
stm32f10x_cec.c \
|
|
|
|
stm32f10x_can.c
|
|
|
|
|
|
|
|
STDPERIPH_SRC := $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC))
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Search path and source files for the CMSIS sources
|
|
|
|
VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x
|
|
|
|
CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \
|
|
|
|
$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x/*.c))
|
|
|
|
|
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(STDPERIPH_DIR)/inc \
|
|
|
|
$(CMSIS_DIR)/CM3/CoreSupport \
|
|
|
|
$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x \
|
|
|
|
|
2015-01-25 04:59:48 -08:00
|
|
|
DEVICE_STDPERIPH_SRC = $(STDPERIPH_SRC)
|
|
|
|
|
2015-11-24 16:18:10 -08:00
|
|
|
ifeq ($(TARGET),$(filter $(TARGET), $(VCP_VALID_TARGETS)))
|
2015-01-25 04:59:48 -08:00
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(USBFS_DIR)/inc \
|
|
|
|
$(ROOT)/src/main/vcp
|
|
|
|
|
|
|
|
VPATH := $(VPATH):$(USBFS_DIR)/src
|
|
|
|
|
|
|
|
DEVICE_STDPERIPH_SRC := $(DEVICE_STDPERIPH_SRC) \
|
|
|
|
$(USBPERIPH_SRC)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
LD_SCRIPT = $(LINKER_DIR)/stm32_flash_f103_$(FLASH_SIZE)k.ld
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
ARCH_FLAGS = -mthumb -mcpu=cortex-m3
|
2014-08-01 14:06:39 -07:00
|
|
|
TARGET_FLAGS = -D$(TARGET) -pedantic
|
2014-09-02 17:38:27 -07:00
|
|
|
DEVICE_FLAGS = -DSTM32F10X_MD -DSTM32F10X
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-03-25 14:00:58 -07:00
|
|
|
ifneq ($(FLASH_SIZE),)
|
|
|
|
DEVICE_FLAGS := $(DEVICE_FLAGS) -DFLASH_SIZE=$(FLASH_SIZE)
|
|
|
|
endif
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
TARGET_DIR = $(ROOT)/src/main/target/$(TARGET)
|
|
|
|
TARGET_SRC = $(notdir $(wildcard $(TARGET_DIR)/*.c))
|
|
|
|
|
2016-01-27 00:40:58 -08:00
|
|
|
ifeq ($(TARGET),ALIENFLIGHTF1)
|
|
|
|
# ALIENFLIGHTF1 is a VARIANT of NAZE
|
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DNAZE -DALIENFLIGHT
|
2014-12-28 03:45:15 -08:00
|
|
|
TARGET_DIR = $(ROOT)/src/main/target/NAZE
|
|
|
|
endif
|
|
|
|
|
2015-11-24 16:18:10 -08:00
|
|
|
ifeq ($(TARGET),$(filter $(TARGET), $(CC3D_TARGETS)))
|
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DCC3D
|
2016-05-05 07:19:50 -07:00
|
|
|
ifeq ($(TARGET),CC3D_OPBL)
|
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DCC3D_OPBL
|
|
|
|
endif
|
2015-11-24 16:18:10 -08:00
|
|
|
TARGET_DIR = $(ROOT)/src/main/target/CC3D
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(filter $(TARGET),$(OPBL_VALID_TARGETS)),)
|
|
|
|
OPBL=yes
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OPBL),yes)
|
|
|
|
ifneq ($(filter $(TARGET),$(OPBL_VALID_TARGETS)),)
|
|
|
|
TARGET_FLAGS := -DOPBL $(TARGET_FLAGS)
|
|
|
|
LD_SCRIPT = $(LINKER_DIR)/stm32_flash_f103_$(FLASH_SIZE)k_opbl.ld
|
|
|
|
.DEFAULT_GOAL := binary
|
|
|
|
else
|
|
|
|
$(error OPBL specified with a unsupported target)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-12-06 14:38:17 -08:00
|
|
|
ifeq ($(TARGET),AFROMINI)
|
|
|
|
# AFROMINI is a VARIANT of NAZE being recognized as rev4, but needs to use rev5 config
|
|
|
|
TARGET_FLAGS := $(TARGET_FLAGS) -DNAZE -DAFROMINI
|
|
|
|
TARGET_DIR = $(ROOT)/src/main/target/NAZE
|
|
|
|
endif
|
2015-11-24 16:18:10 -08:00
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
INCLUDE_DIRS := $(INCLUDE_DIRS) \
|
|
|
|
$(TARGET_DIR)
|
|
|
|
|
|
|
|
VPATH := $(VPATH):$(TARGET_DIR)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
COMMON_SRC = build_config.c \
|
2015-04-14 05:58:45 -07:00
|
|
|
debug.c \
|
2014-09-20 21:09:01 -07:00
|
|
|
version.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(TARGET_SRC) \
|
|
|
|
config/config.c \
|
|
|
|
config/runtime_config.c \
|
|
|
|
common/maths.c \
|
|
|
|
common/printf.c \
|
|
|
|
common/typeconversion.c \
|
2015-02-25 16:27:09 -08:00
|
|
|
common/encoding.c \
|
2015-06-30 02:05:13 -07:00
|
|
|
common/filter.c \
|
2015-12-17 18:36:05 -08:00
|
|
|
scheduler.c \
|
2016-03-01 05:14:26 -08:00
|
|
|
scheduler_tasks.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
main.c \
|
|
|
|
mw.c \
|
|
|
|
flight/altitudehold.c \
|
|
|
|
flight/failsafe.c \
|
2015-01-31 15:39:38 -08:00
|
|
|
flight/pid.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
flight/imu.c \
|
|
|
|
flight/mixer.c \
|
|
|
|
drivers/bus_i2c_soft.c \
|
|
|
|
drivers/serial.c \
|
|
|
|
drivers/sound_beeper.c \
|
|
|
|
drivers/system.c \
|
2015-08-04 15:16:52 -07:00
|
|
|
drivers/gyro_sync.c \
|
2016-02-10 13:36:05 -08:00
|
|
|
drivers/dma.c \
|
2015-07-21 12:22:48 -07:00
|
|
|
drivers/buf_writer.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
io/beeper.c \
|
|
|
|
io/rc_controls.c \
|
|
|
|
io/rc_curves.c \
|
|
|
|
io/serial.c \
|
2016-04-02 08:07:12 -07:00
|
|
|
io/serial_4way.c \
|
|
|
|
io/serial_4way_avrootloader.c \
|
|
|
|
io/serial_4way_stk500v2.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
io/serial_cli.c \
|
|
|
|
io/serial_msp.c \
|
|
|
|
io/statusindicator.c \
|
|
|
|
rx/rx.c \
|
|
|
|
rx/pwm.c \
|
|
|
|
rx/msp.c \
|
2014-08-26 15:25:14 -07:00
|
|
|
rx/sbus.c \
|
|
|
|
rx/sumd.c \
|
2014-09-20 01:39:42 -07:00
|
|
|
rx/sumh.c \
|
2014-08-26 15:25:14 -07:00
|
|
|
rx/spektrum.c \
|
2014-12-15 13:15:47 -08:00
|
|
|
rx/xbus.c \
|
2015-06-03 04:22:56 -07:00
|
|
|
rx/ibus.c \
|
2016-01-21 09:22:39 -08:00
|
|
|
rx/jetiexbus.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
sensors/acceleration.c \
|
|
|
|
sensors/battery.c \
|
|
|
|
sensors/boardalignment.c \
|
|
|
|
sensors/compass.c \
|
|
|
|
sensors/gyro.c \
|
|
|
|
sensors/initialisation.c \
|
|
|
|
$(CMSIS_SRC) \
|
|
|
|
$(DEVICE_STDPERIPH_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
HIGHEND_SRC = \
|
2016-02-21 05:06:10 -08:00
|
|
|
flight/gtune.c \
|
2014-08-07 06:23:05 -07:00
|
|
|
flight/navigation.c \
|
|
|
|
flight/gps_conversion.c \
|
2014-09-18 12:53:28 -07:00
|
|
|
common/colorconversion.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
io/gps.c \
|
|
|
|
io/ledstrip.c \
|
2014-09-08 17:59:53 -07:00
|
|
|
io/display.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
telemetry/telemetry.c \
|
|
|
|
telemetry/frsky.c \
|
|
|
|
telemetry/hott.c \
|
2015-01-25 04:59:48 -08:00
|
|
|
telemetry/smartport.c \
|
2016-02-03 02:14:35 -08:00
|
|
|
telemetry/ltm.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
sensors/sonar.c \
|
2014-12-08 01:06:57 -08:00
|
|
|
sensors/barometer.c \
|
2015-01-27 23:42:51 -08:00
|
|
|
blackbox/blackbox.c \
|
|
|
|
blackbox/blackbox_io.c
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
VCP_SRC = \
|
2015-01-25 04:59:48 -08:00
|
|
|
vcp/hw_config.c \
|
|
|
|
vcp/stm32_it.c \
|
|
|
|
vcp/usb_desc.c \
|
|
|
|
vcp/usb_endp.c \
|
|
|
|
vcp/usb_istr.c \
|
|
|
|
vcp/usb_prop.c \
|
|
|
|
vcp/usb_pwr.c \
|
2016-04-06 20:10:58 -07:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/usb_io.c
|
2015-01-25 04:59:48 -08:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
NAZE_SRC = startup_stm32f10x_md_gcc.S \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_adxl345.c \
|
|
|
|
drivers/accgyro_bma280.c \
|
|
|
|
drivers/accgyro_l3g4200d.c \
|
|
|
|
drivers/accgyro_mma845x.c \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_mpu3050.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
2015-09-19 10:30:34 -07:00
|
|
|
drivers/accgyro_mpu6500.c \
|
2014-10-13 16:22:54 -07:00
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f10x.c \
|
|
|
|
drivers/barometer_bmp085.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/barometer_ms5611.c \
|
2015-09-19 10:38:02 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/bus_spi.c \
|
|
|
|
drivers/bus_i2c_stm32f10x.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
2014-09-08 18:11:38 -07:00
|
|
|
drivers/display_ug2864hsweg01.h \
|
2015-07-12 19:27:26 -07:00
|
|
|
drivers/flash_m25p16.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/gpio_stm32f10x.c \
|
2014-08-01 15:36:42 -07:00
|
|
|
drivers/inverter.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/light_led_stm32f10x.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f10x.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f10x.c \
|
|
|
|
drivers/sound_beeper_stm32f10x.c \
|
|
|
|
drivers/system_stm32f10x.c \
|
|
|
|
drivers/timer.c \
|
2014-11-07 06:26:29 -08:00
|
|
|
drivers/timer_stm32f10x.c \
|
2015-01-27 20:45:36 -08:00
|
|
|
io/flashfs.c \
|
2014-10-15 12:59:06 -07:00
|
|
|
hardware_revision.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
|
|
|
|
2016-01-27 00:40:58 -08:00
|
|
|
ALIENFLIGHTF1_SRC = $(NAZE_SRC)
|
2014-12-28 03:45:15 -08:00
|
|
|
|
2015-12-06 14:38:17 -08:00
|
|
|
AFROMINI_SRC = $(NAZE_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
EUSTM32F103RC_SRC = startup_stm32f10x_hd_gcc.S \
|
2014-10-13 16:22:54 -07:00
|
|
|
drivers/accgyro_adxl345.c \
|
|
|
|
drivers/accgyro_bma280.c \
|
2014-09-08 17:59:53 -07:00
|
|
|
drivers/accgyro_l3g4200d.c \
|
2014-10-13 16:22:54 -07:00
|
|
|
drivers/accgyro_mma845x.c \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-10-13 16:22:54 -07:00
|
|
|
drivers/accgyro_mpu3050.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f10x.c \
|
|
|
|
drivers/barometer_bmp085.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-10-13 16:22:54 -07:00
|
|
|
drivers/barometer_ms5611.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
drivers/bus_i2c_stm32f10x.c \
|
|
|
|
drivers/bus_spi.c \
|
2014-12-21 09:55:13 -08:00
|
|
|
drivers/compass_ak8975.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
drivers/compass_hmc5883l.c \
|
2014-12-12 17:42:35 -08:00
|
|
|
drivers/display_ug2864hsweg01.c \
|
2015-07-12 19:27:26 -07:00
|
|
|
drivers/flash_m25p16.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
drivers/gpio_stm32f10x.c \
|
2014-11-09 15:53:48 -08:00
|
|
|
drivers/inverter.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
drivers/light_led_stm32f10x.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f10x.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f10x.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
drivers/sound_beeper_stm32f10x.c \
|
|
|
|
drivers/system_stm32f10x.c \
|
|
|
|
drivers/timer.c \
|
2014-11-07 06:26:29 -08:00
|
|
|
drivers/timer_stm32f10x.c \
|
2015-07-12 19:27:26 -07:00
|
|
|
io/flashfs.c \
|
2014-09-02 17:38:27 -07:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
|
|
|
|
2014-11-09 15:53:48 -08:00
|
|
|
PORT103R_SRC = $(EUSTM32F103RC_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
OLIMEXINO_SRC = startup_stm32f10x_md_gcc.S \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f10x.c \
|
|
|
|
drivers/barometer_bmp085.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/bus_i2c_stm32f10x.c \
|
|
|
|
drivers/bus_spi.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
|
|
|
drivers/gpio_stm32f10x.c \
|
|
|
|
drivers/light_led_stm32f10x.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f10x.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f10x.c \
|
2014-08-13 14:01:39 -07:00
|
|
|
drivers/sonar_hcsr04.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/sound_beeper_stm32f10x.c \
|
|
|
|
drivers/system_stm32f10x.c \
|
|
|
|
drivers/timer.c \
|
2014-11-07 06:26:29 -08:00
|
|
|
drivers/timer_stm32f10x.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
CJMCU_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
startup_stm32f10x_md_gcc.S \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f10x.c \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/bus_i2c_stm32f10x.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
|
|
|
drivers/gpio_stm32f10x.c \
|
|
|
|
drivers/light_led_stm32f10x.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f10x.c \
|
|
|
|
drivers/sound_beeper_stm32f10x.c \
|
|
|
|
drivers/system_stm32f10x.c \
|
|
|
|
drivers/timer.c \
|
2014-11-07 06:26:29 -08:00
|
|
|
drivers/timer_stm32f10x.c \
|
2015-01-07 17:10:41 -08:00
|
|
|
hardware_revision.c \
|
2015-10-06 12:16:37 -07:00
|
|
|
flight/gtune.c \
|
2015-02-22 08:20:04 -08:00
|
|
|
blackbox/blackbox.c \
|
|
|
|
blackbox/blackbox_io.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(COMMON_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
CC3D_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
startup_stm32f10x_md_gcc.S \
|
2015-09-19 09:11:04 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f10x.c \
|
2015-01-22 10:19:23 -08:00
|
|
|
drivers/barometer_bmp085.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2015-01-22 10:19:23 -08:00
|
|
|
drivers/barometer_ms5611.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/bus_spi.c \
|
2015-01-22 10:19:23 -08:00
|
|
|
drivers/bus_i2c_stm32f10x.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
|
|
|
drivers/display_ug2864hsweg01.c \
|
2015-07-12 19:27:26 -07:00
|
|
|
drivers/flash_m25p16.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/gpio_stm32f10x.c \
|
2014-08-01 15:36:42 -07:00
|
|
|
drivers/inverter.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/light_led_stm32f10x.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f10x.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f10x.c \
|
2015-01-29 07:33:45 -08:00
|
|
|
drivers/sonar_hcsr04.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/sound_beeper_stm32f10x.c \
|
|
|
|
drivers/system_stm32f10x.c \
|
|
|
|
drivers/timer.c \
|
2014-11-07 06:26:29 -08:00
|
|
|
drivers/timer_stm32f10x.c \
|
2015-02-24 03:52:25 -08:00
|
|
|
io/flashfs.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(HIGHEND_SRC) \
|
2015-01-25 04:59:48 -08:00
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2016-04-30 12:16:02 -07:00
|
|
|
|
|
|
|
STM32F30x_COMMON_SRC += \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/adc.c \
|
|
|
|
drivers/adc_stm32f30x.c \
|
|
|
|
drivers/bus_i2c_stm32f30x.c \
|
|
|
|
drivers/bus_spi.c \
|
2016-01-16 17:06:26 -08:00
|
|
|
drivers/display_ug2864hsweg01.h \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/gpio_stm32f30x.c \
|
|
|
|
drivers/light_led_stm32f30x.c \
|
|
|
|
drivers/pwm_mapping.c \
|
|
|
|
drivers/pwm_output.c \
|
|
|
|
drivers/pwm_rx.c \
|
|
|
|
drivers/serial_uart.c \
|
|
|
|
drivers/serial_uart_stm32f30x.c \
|
|
|
|
drivers/sound_beeper_stm32f30x.c \
|
|
|
|
drivers/system_stm32f30x.c \
|
|
|
|
drivers/timer.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
drivers/timer_stm32f30x.c
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
NAZE32PRO_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(HIGHEND_SRC) \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
STM32F3DISCOVERY_COMMON_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_l3gd20.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
drivers/accgyro_lsm303dlhc.c \
|
2015-01-20 16:11:55 -08:00
|
|
|
drivers/compass_hmc5883l.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(VCP_SRC)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
STM32F3DISCOVERY_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F3DISCOVERY_COMMON_SRC) \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_adxl345.c \
|
|
|
|
drivers/accgyro_bma280.c \
|
|
|
|
drivers/accgyro_mma845x.c \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
drivers/accgyro_mpu3050.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/accgyro_l3g4200d.c \
|
2014-12-24 13:06:24 -08:00
|
|
|
drivers/barometer_ms5611.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-12-24 13:06:24 -08:00
|
|
|
drivers/compass_ak8975.c \
|
2015-08-25 17:26:26 -07:00
|
|
|
drivers/sdcard.c \
|
2015-10-21 18:27:36 -07:00
|
|
|
drivers/sdcard_standard.c \
|
2015-11-16 02:45:42 -08:00
|
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
|
|
io/asyncfatfs/fat_standard.c \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
CHEBUZZF3_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F3DISCOVERY_SRC) \
|
2014-10-06 22:56:42 -07:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
2014-10-23 05:10:45 -07:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
COLIBRI_RACE_SRC = \
|
2015-06-09 04:06:52 -07:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2015-11-12 21:10:00 -08:00
|
|
|
io/i2c_bst.c \
|
|
|
|
drivers/bus_bst_stm32f30x.c \
|
2015-09-19 08:21:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2015-10-16 01:57:43 -07:00
|
|
|
drivers/accgyro_mpu6500.c \
|
2016-04-16 03:28:18 -07:00
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
2015-06-09 04:06:52 -07:00
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
2015-10-17 05:32:30 -07:00
|
|
|
drivers/accgyro_mpu6500.c \
|
2015-06-09 04:06:52 -07:00
|
|
|
drivers/barometer_ms5611.c \
|
2016-04-22 02:03:47 -07:00
|
|
|
drivers/compass_ak8963.c \
|
2015-06-09 04:06:52 -07:00
|
|
|
drivers/compass_ak8975.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/display_ug2864hsweg01.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2015-06-09 04:06:52 -07:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
|
2016-01-26 15:19:44 -08:00
|
|
|
LUX_RACE_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
2016-02-03 03:06:23 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2016-01-26 15:19:44 -08:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2016-04-08 13:35:03 -07:00
|
|
|
|
|
|
|
DOGE_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
|
|
|
drivers/barometer_bmp280.c \
|
|
|
|
drivers/barometer_spi_bmp280.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2016-01-26 15:19:44 -08:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
SPARKY_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2014-12-12 17:42:35 -08:00
|
|
|
drivers/display_ug2864hsweg01.c \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2014-12-24 13:36:47 -08:00
|
|
|
drivers/accgyro_mpu6050.c \
|
2014-12-08 19:09:07 -08:00
|
|
|
drivers/barometer_ms5611.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2014-12-21 09:55:13 -08:00
|
|
|
drivers/compass_ak8975.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
|
2016-01-27 00:40:58 -08:00
|
|
|
ALIENFLIGHTF3_SRC = \
|
2016-01-16 17:45:52 -08:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/accgyro_mpu.c \
|
2016-01-27 00:40:58 -08:00
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
|
|
|
drivers/compass_ak8963.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
hardware_revision.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2015-01-06 09:21:24 -08:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
RMDO_SRC = \
|
2015-10-06 10:53:29 -07:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2016-02-03 00:46:39 -08:00
|
|
|
drivers/accgyro_mpu.c \
|
2015-10-06 10:53:29 -07:00
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/barometer_bmp280.c \
|
|
|
|
drivers/display_ug2864hsweg01.h \
|
|
|
|
drivers/flash_m25p16.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2015-10-06 10:53:29 -07:00
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
io/flashfs.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
2015-01-06 09:21:24 -08:00
|
|
|
|
2015-10-06 12:16:37 -07:00
|
|
|
SPRACINGF3_SRC = \
|
2015-01-20 14:33:03 -08:00
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2015-09-18 12:23:50 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/barometer_ms5611.c \
|
2015-06-09 19:36:53 -07:00
|
|
|
drivers/compass_ak8975.c \
|
2016-01-17 23:29:50 -08:00
|
|
|
drivers/barometer_bmp085.c \
|
2015-06-01 09:53:05 -07:00
|
|
|
drivers/barometer_bmp280.c \
|
2015-01-20 14:33:03 -08:00
|
|
|
drivers/compass_hmc5883l.c \
|
2015-02-04 18:08:37 -08:00
|
|
|
drivers/display_ug2864hsweg01.h \
|
2015-02-22 13:40:29 -08:00
|
|
|
drivers/flash_m25p16.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
2015-06-26 07:16:52 -07:00
|
|
|
drivers/serial_softserial.c \
|
2015-03-22 13:55:27 -07:00
|
|
|
drivers/sonar_hcsr04.c \
|
2015-02-22 13:40:29 -08:00
|
|
|
io/flashfs.c \
|
2014-12-08 19:09:07 -08:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
2015-10-29 06:57:57 -07:00
|
|
|
|
|
|
|
IRCFUSIONF3_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/barometer_bmp085.c \
|
2016-02-03 00:46:39 -08:00
|
|
|
drivers/flash_m25p16.c \
|
2015-10-29 06:57:57 -07:00
|
|
|
io/flashfs.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC)
|
2014-12-08 19:09:07 -08:00
|
|
|
|
2016-04-08 02:14:43 -07:00
|
|
|
SPRACINGF3EVO_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
|
|
|
drivers/barometer_bmp280.c \
|
|
|
|
drivers/compass_ak8963.c \
|
|
|
|
drivers/display_ug2864hsweg01.h \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/sdcard.c \
|
|
|
|
drivers/sdcard_standard.c \
|
|
|
|
drivers/transponder_ir.c \
|
|
|
|
drivers/transponder_ir_stm32f30x.c \
|
|
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
|
|
io/asyncfatfs/fat_standard.c \
|
|
|
|
io/transponder_ir.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
|
2015-08-15 15:33:52 -07:00
|
|
|
MOTOLAB_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
2015-10-07 08:27:04 -07:00
|
|
|
drivers/accgyro_mpu.c \
|
2015-08-15 15:33:52 -07:00
|
|
|
drivers/display_ug2864hsweg01.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
2015-12-02 13:04:19 -08:00
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
2015-08-15 15:33:52 -07:00
|
|
|
drivers/barometer_ms5611.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
2016-01-16 17:45:52 -08:00
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_softserial.c \
|
2015-08-15 15:33:52 -07:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/flash_m25p16.c \
|
|
|
|
io/flashfs.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
2016-05-10 03:28:13 -07:00
|
|
|
|
2016-01-16 17:45:52 -08:00
|
|
|
SPRACINGF3MINI_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/barometer_bmp280.c \
|
|
|
|
drivers/compass_ak8975.c \
|
|
|
|
drivers/compass_hmc5883l.c \
|
|
|
|
drivers/display_ug2864hsweg01.h \
|
|
|
|
drivers/flash_m25p16.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
drivers/sdcard.c \
|
|
|
|
drivers/sdcard_standard.c \
|
|
|
|
drivers/transponder_ir.c \
|
|
|
|
drivers/transponder_ir_stm32f30x.c \
|
|
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
|
|
io/asyncfatfs/fat_standard.c \
|
|
|
|
io/transponder_ir.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
# $(FATFS_SRC)
|
2015-08-15 15:33:52 -07:00
|
|
|
|
2016-03-11 20:55:27 -08:00
|
|
|
SIRINFPV_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
2016-03-20 20:04:11 -07:00
|
|
|
drivers/accgyro_mpu6500.c \
|
2016-03-11 20:55:27 -08:00
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
2016-03-20 20:04:11 -07:00
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
2016-03-11 20:55:27 -08:00
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/sdcard.c \
|
|
|
|
drivers/sdcard_standard.c \
|
|
|
|
drivers/max7456.c \
|
|
|
|
drivers/rtc6705.c \
|
|
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
|
|
io/asyncfatfs/fat_standard.c \
|
|
|
|
io/osd.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
# $(FATFS_SRC)
|
|
|
|
|
2015-12-01 14:55:15 -08:00
|
|
|
SINGULARITY_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/accgyro_mpu6050.c \
|
|
|
|
drivers/flash_m25p16.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
2016-05-26 14:07:19 -07:00
|
|
|
drivers/vtx_rtc6705.c \
|
2015-12-01 14:55:15 -08:00
|
|
|
io/flashfs.c \
|
2016-05-26 14:07:19 -07:00
|
|
|
io/vtx.c \
|
2015-12-01 14:55:15 -08:00
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
|
2016-06-05 03:53:27 -07:00
|
|
|
FURYF3_SRC = \
|
|
|
|
$(STM32F30x_COMMON_SRC) \
|
|
|
|
drivers/accgyro_mpu.c \
|
|
|
|
drivers/barometer_ms5611.c \
|
|
|
|
drivers/barometer_bmp280.c \
|
|
|
|
drivers/display_ug2864hsweg01.c \
|
|
|
|
drivers/accgyro_spi_mpu6000.c \
|
|
|
|
drivers/accgyro_mpu6500.c \
|
|
|
|
drivers/accgyro_spi_mpu6500.c \
|
|
|
|
drivers/light_ws2811strip.c \
|
|
|
|
drivers/light_ws2811strip_stm32f30x.c \
|
|
|
|
drivers/serial_usb_vcp.c \
|
|
|
|
drivers/sdcard.c \
|
|
|
|
drivers/sdcard_standard.c \
|
|
|
|
drivers/flash_m25p16.c \
|
|
|
|
drivers/sonar_hcsr04.c \
|
|
|
|
drivers/serial_softserial.c \
|
|
|
|
io/asyncfatfs/asyncfatfs.c \
|
|
|
|
io/asyncfatfs/fat_standard.c \
|
|
|
|
io/flashfs.c \
|
|
|
|
$(HIGHEND_SRC) \
|
|
|
|
$(COMMON_SRC) \
|
|
|
|
$(VCP_SRC)
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# Search path and source files for the ST stdperiph library
|
|
|
|
VPATH := $(VPATH):$(STDPERIPH_DIR)/src
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Things that might need changing to use different tools
|
|
|
|
#
|
|
|
|
|
|
|
|
# Tool names
|
|
|
|
CC = arm-none-eabi-gcc
|
|
|
|
OBJCOPY = arm-none-eabi-objcopy
|
|
|
|
SIZE = arm-none-eabi-size
|
|
|
|
|
|
|
|
#
|
|
|
|
# Tool options.
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),GDB)
|
|
|
|
OPTIMIZE = -O0
|
|
|
|
LTO_FLAGS = $(OPTIMIZE)
|
|
|
|
else
|
|
|
|
OPTIMIZE = -Os
|
2014-08-01 10:39:47 -07:00
|
|
|
LTO_FLAGS = -flto -fuse-linker-plugin $(OPTIMIZE)
|
2014-08-01 06:12:39 -07:00
|
|
|
endif
|
|
|
|
|
2015-09-11 16:07:12 -07:00
|
|
|
DEBUG_FLAGS = -ggdb3 -DDEBUG
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2016-04-30 12:16:02 -07:00
|
|
|
CFLAGS += $(ARCH_FLAGS) \
|
2014-08-01 10:39:47 -07:00
|
|
|
$(LTO_FLAGS) \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(addprefix -D,$(OPTIONS)) \
|
|
|
|
$(addprefix -I,$(INCLUDE_DIRS)) \
|
|
|
|
$(DEBUG_FLAGS) \
|
|
|
|
-std=gnu99 \
|
2014-11-19 08:00:21 -08:00
|
|
|
-Wall -Wextra -Wunsafe-loop-optimizations -Wdouble-promotion \
|
2014-08-01 06:12:39 -07:00
|
|
|
-ffunction-sections \
|
|
|
|
-fdata-sections \
|
|
|
|
$(DEVICE_FLAGS) \
|
|
|
|
-DUSE_STDPERIPH_DRIVER \
|
|
|
|
$(TARGET_FLAGS) \
|
|
|
|
-D'__FORKNAME__="$(FORKNAME)"' \
|
2014-08-02 03:49:15 -07:00
|
|
|
-D'__TARGET__="$(TARGET)"' \
|
2014-09-03 16:27:28 -07:00
|
|
|
-D'__REVISION__="$(REVISION)"' \
|
2014-10-23 05:10:45 -07:00
|
|
|
-save-temps=obj \
|
2015-01-29 06:11:27 -08:00
|
|
|
-MMD -MP
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
ASFLAGS = $(ARCH_FLAGS) \
|
|
|
|
-x assembler-with-cpp \
|
2014-10-23 05:10:45 -07:00
|
|
|
$(addprefix -I,$(INCLUDE_DIRS)) \
|
2015-01-29 06:11:27 -08:00
|
|
|
-MMD -MP
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2014-08-01 10:39:47 -07:00
|
|
|
LDFLAGS = -lm \
|
|
|
|
-nostartfiles \
|
|
|
|
--specs=nano.specs \
|
|
|
|
-lc \
|
|
|
|
-lnosys \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(ARCH_FLAGS) \
|
2014-08-01 10:39:47 -07:00
|
|
|
$(LTO_FLAGS) \
|
2014-08-01 06:12:39 -07:00
|
|
|
$(DEBUG_FLAGS) \
|
|
|
|
-static \
|
|
|
|
-Wl,-gc-sections,-Map,$(TARGET_MAP) \
|
2015-06-21 23:49:16 -07:00
|
|
|
-Wl,-L$(LINKER_DIR) \
|
2015-07-09 22:02:38 -07:00
|
|
|
-Wl,--cref \
|
2014-08-01 10:39:47 -07:00
|
|
|
-T$(LD_SCRIPT)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# No user-serviceable parts below
|
|
|
|
###############################################################################
|
|
|
|
|
2015-08-21 21:23:55 -07:00
|
|
|
CPPCHECK = cppcheck $(CSOURCES) --enable=all --platform=unix64 \
|
|
|
|
--std=c99 --inline-suppr --quiet --force \
|
|
|
|
$(addprefix -I,$(INCLUDE_DIRS)) \
|
|
|
|
-I/usr/include -I/usr/include/linux
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
#
|
|
|
|
# Things we will build
|
|
|
|
#
|
|
|
|
ifeq ($(filter $(TARGET),$(VALID_TARGETS)),)
|
|
|
|
$(error Target '$(TARGET)' is not valid, must be one of $(VALID_TARGETS))
|
|
|
|
endif
|
|
|
|
|
2015-11-24 16:18:10 -08:00
|
|
|
CC3D_OPBL_SRC = $(CC3D_SRC)
|
|
|
|
|
2016-01-28 07:21:32 -08:00
|
|
|
TARGET_BIN = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET).bin
|
|
|
|
TARGET_HEX = $(BIN_DIR)/$(FORKNAME)_$(FC_VER)_$(TARGET).hex
|
2014-08-01 06:12:39 -07:00
|
|
|
TARGET_ELF = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).elf
|
|
|
|
TARGET_OBJS = $(addsuffix .o,$(addprefix $(OBJECT_DIR)/$(TARGET)/,$(basename $($(TARGET)_SRC))))
|
2014-10-23 05:10:45 -07:00
|
|
|
TARGET_DEPS = $(addsuffix .d,$(addprefix $(OBJECT_DIR)/$(TARGET)/,$(basename $($(TARGET)_SRC))))
|
|
|
|
TARGET_MAP = $(OBJECT_DIR)/$(FORKNAME)_$(TARGET).map
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-10-23 09:48:43 -07:00
|
|
|
|
|
|
|
CLEAN_ARTIFACTS := $(TARGET_BIN)
|
2016-04-26 09:58:05 -07:00
|
|
|
CLEAN_ARTIFACTS += $(TARGET_HEX)
|
2015-10-23 09:48:43 -07:00
|
|
|
CLEAN_ARTIFACTS += $(TARGET_ELF) $(TARGET_OBJS) $(TARGET_MAP)
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
# List of buildable ELF files and their object dependencies.
|
|
|
|
# It would be nice to compute these lists, but that seems to be just beyond make.
|
|
|
|
|
|
|
|
$(TARGET_HEX): $(TARGET_ELF)
|
|
|
|
$(OBJCOPY) -O ihex --set-start 0x8000000 $< $@
|
|
|
|
|
2014-09-26 06:10:12 -07:00
|
|
|
$(TARGET_BIN): $(TARGET_ELF)
|
|
|
|
$(OBJCOPY) -O binary $< $@
|
|
|
|
|
2014-08-01 06:12:39 -07:00
|
|
|
$(TARGET_ELF): $(TARGET_OBJS)
|
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
$(SIZE) $(TARGET_ELF)
|
|
|
|
|
|
|
|
# Compile
|
|
|
|
$(OBJECT_DIR)/$(TARGET)/%.o: %.c
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@echo %% $(notdir $<)
|
|
|
|
@$(CC) -c -o $@ $(CFLAGS) $<
|
|
|
|
|
|
|
|
# Assemble
|
|
|
|
$(OBJECT_DIR)/$(TARGET)/%.o: %.s
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@echo %% $(notdir $<)
|
2014-10-23 05:10:45 -07:00
|
|
|
@$(CC) -c -o $@ $(ASFLAGS) $<
|
|
|
|
|
2014-09-16 04:46:27 -07:00
|
|
|
$(OBJECT_DIR)/$(TARGET)/%.o: %.S
|
2014-08-01 06:12:39 -07:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@echo %% $(notdir $<)
|
2014-11-07 06:26:29 -08:00
|
|
|
@$(CC) -c -o $@ $(ASFLAGS) $<
|
2014-08-01 06:12:39 -07:00
|
|
|
|
2015-08-17 05:37:09 -07:00
|
|
|
|
|
|
|
## all : default task; compile C code, build firmware
|
|
|
|
all: binary
|
|
|
|
|
|
|
|
## clean : clean up all temporary / machine-generated files
|
2014-08-01 06:12:39 -07:00
|
|
|
clean:
|
2015-10-23 09:48:43 -07:00
|
|
|
rm -f $(CLEAN_ARTIFACTS)
|
2014-08-01 06:12:39 -07:00
|
|
|
rm -rf $(OBJECT_DIR)/$(TARGET)
|
2015-08-17 06:02:19 -07:00
|
|
|
cd src/test && $(MAKE) clean || true
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
flash_$(TARGET): $(TARGET_HEX)
|
|
|
|
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
|
|
|
echo -n 'R' >$(SERIAL_DEVICE)
|
|
|
|
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
|
|
|
|
|
2015-08-17 05:37:09 -07:00
|
|
|
## flash : flash firmware (.hex) onto flight controller
|
2014-08-01 06:12:39 -07:00
|
|
|
flash: flash_$(TARGET)
|
|
|
|
|
2015-07-19 06:52:15 -07:00
|
|
|
st-flash_$(TARGET): $(TARGET_BIN)
|
|
|
|
st-flash --reset write $< 0x08000000
|
|
|
|
|
2015-08-17 05:37:09 -07:00
|
|
|
## st-flash : flash firmware (.bin) onto flight controller
|
2015-07-19 06:52:15 -07:00
|
|
|
st-flash: st-flash_$(TARGET)
|
|
|
|
|
2014-09-26 06:10:12 -07:00
|
|
|
binary: $(TARGET_BIN)
|
2015-11-24 16:18:10 -08:00
|
|
|
hex: $(TARGET_HEX)
|
2014-08-01 06:12:39 -07:00
|
|
|
|
|
|
|
unbrick_$(TARGET): $(TARGET_HEX)
|
|
|
|
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
|
|
|
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
|
|
|
|
|
2015-08-17 05:37:09 -07:00
|
|
|
## unbrick : unbrick flight controller
|
2014-08-01 06:12:39 -07:00
|
|
|
unbrick: unbrick_$(TARGET)
|
|
|
|
|
2015-08-21 21:23:55 -07:00
|
|
|
## cppcheck : run static analysis on C source code
|
|
|
|
cppcheck: $(CSOURCES)
|
|
|
|
$(CPPCHECK)
|
|
|
|
|
|
|
|
cppcheck-result.xml: $(CSOURCES)
|
|
|
|
$(CPPCHECK) --xml-version=2 2> cppcheck-result.xml
|
|
|
|
|
2015-08-17 05:37:09 -07:00
|
|
|
## help : print this help message and exit
|
|
|
|
help: Makefile
|
2014-08-01 06:12:39 -07:00
|
|
|
@echo ""
|
|
|
|
@echo "Makefile for the $(FORKNAME) firmware"
|
|
|
|
@echo ""
|
|
|
|
@echo "Usage:"
|
|
|
|
@echo " make [TARGET=<target>] [OPTIONS=\"<options>\"]"
|
|
|
|
@echo ""
|
|
|
|
@echo "Valid TARGET values are: $(VALID_TARGETS)"
|
|
|
|
@echo ""
|
2015-08-17 05:37:09 -07:00
|
|
|
@sed -n 's/^## //p' $<
|
2014-10-23 05:10:45 -07:00
|
|
|
|
2015-08-17 06:02:19 -07:00
|
|
|
## test : run the cleanflight test suite
|
|
|
|
test:
|
|
|
|
cd src/test && $(MAKE) test || true
|
|
|
|
|
2014-10-23 05:10:45 -07:00
|
|
|
# rebuild everything when makefile changes
|
|
|
|
$(TARGET_OBJS) : Makefile
|
|
|
|
|
|
|
|
# include auto-generated dependencies
|
|
|
|
-include $(TARGET_DEPS)
|