diff --git a/flight/OpenPilot/Makefile b/flight/OpenPilot/Makefile index 1843d994f..465957138 100644 --- a/flight/OpenPilot/Makefile +++ b/flight/OpenPilot/Makefile @@ -24,11 +24,19 @@ # Set developer code and compile options -# Set to YES for debugging +# Set to YES to compile for debugging DEBUG ?= YES + +# Set to YES to use the Servo output pins for debugging via scope or logic analyser ENABLE_DEBUG_PINS ?= NO + +# Set to Yes to enable the AUX UART which is mapped on the S1 (Tx) and S2 (Rx) servo outputs +ENABLE_AUX_UART ?= NO + +# USE_BOOTLOADER ?= NO + # Set to YES when using Code Sourcery toolchain CODE_SOURCERY ?= YES @@ -45,10 +53,12 @@ FLASH_TOOL = OPENOCD USE_THUMB_MODE = YES # List of modules to include -MODULES = Telemetry GPS ManualControl Actuator Altitude Attitude +MODULES = Telemetry GPS ManualControl Actuator Altitude Attitude #MODULES = Telemetry Example #MODULES = Telemetry MK/MKSerial +#MODULES += Osd/OsdEtStd + # MCU name, submodel and board # - MCU used for compiler-option (-mcpu) @@ -343,6 +353,9 @@ CDEFS += -DUSE_$(BOARD) ifeq ($(ENABLE_DEBUG_PINS), YES) CDEFS += -DPIOS_ENABLE_DEBUG_PINS endif +ifeq ($(ENABLE_AUX_UART), YES) +CDEFS += -DPIOS_ENABLE_AUX_UART +endif ifeq ($(USE_BOOTLOADER), YES) CDEFS += -DUSE_BOOTLOADER endif @@ -388,7 +401,8 @@ ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices endif -CFLAGS += -Wall -Werror +CFLAGS += -Wall +CFLAGS += -Werror CFLAGS += -Wa,-adhlns=$(addprefix $(OUTDIR)/, $(notdir $(addsuffix .lst, $(basename $<)))) # Compiler flags to generate dependency files: CFLAGS += -MD -MP -MF $(OUTDIR)/dep/$(@F).d diff --git a/flight/OpenPilot/System/inc/pios_board.h b/flight/OpenPilot/System/inc/pios_board.h index 51358064d..744fb7f71 100644 --- a/flight/OpenPilot/System/inc/pios_board.h +++ b/flight/OpenPilot/System/inc/pios_board.h @@ -119,7 +119,7 @@ TIM8 | Servo 5 | Servo 6 | Servo 7 | Servo 8 #define PIOS_COM_GPS 1 #define PIOS_COM_TELEM_USB 2 -#if 1 +#ifdef PIOS_ENABLE_AUX_UART #define PIOS_COM_AUX 3 #define PIOS_COM_DEBUG PIOS_COM_AUX #endif