diff --git a/conf/boards/lisa_m_2.0.makefile b/conf/boards/lisa_m_2.0.makefile index fbf17f81de..44f467ba1f 100644 --- a/conf/boards/lisa_m_2.0.makefile +++ b/conf/boards/lisa_m_2.0.makefile @@ -8,4 +8,5 @@ BOARD=lisa_m BOARD_VERSION=2.0 +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile include $(PAPARAZZI_SRC)/conf/boards/lisa_m_common.makefile diff --git a/conf/boards/lisa_m_2.0_chibios.makefile b/conf/boards/lisa_m_2.0_chibios.makefile index f562129362..14dab95c94 100644 --- a/conf/boards/lisa_m_2.0_chibios.makefile +++ b/conf/boards/lisa_m_2.0_chibios.makefile @@ -19,4 +19,5 @@ else $(error Unknown RADIO_CONTROL_PPM_PIN, configure it to either PA01 or PA10) endif +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile include $(PAPARAZZI_SRC)/conf/boards/lisa_m_common_chibios.makefile diff --git a/conf/boards/lisa_m_2.1.makefile b/conf/boards/lisa_m_2.1.makefile index a30c8e58fe..78ece7d72e 100644 --- a/conf/boards/lisa_m_2.1.makefile +++ b/conf/boards/lisa_m_2.1.makefile @@ -8,4 +8,5 @@ BOARD=lisa_m BOARD_VERSION=2.1 +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile include $(PAPARAZZI_SRC)/conf/boards/lisa_m_common.makefile diff --git a/conf/boards/lisa_m_2.1_chibios.makefile b/conf/boards/lisa_m_2.1_chibios.makefile index 257d5cc7df..34c37956f5 100644 --- a/conf/boards/lisa_m_2.1_chibios.makefile +++ b/conf/boards/lisa_m_2.1_chibios.makefile @@ -8,3 +8,4 @@ BOARD=lisa_m BOARD_VERSION=2.1 include $(PAPARAZZI_SRC)/conf/boards/lisa_m_common_chibios.makefile +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile diff --git a/conf/boards/lisa_m_common_chibios.makefile b/conf/boards/lisa_m_common_chibios.makefile index e340c9a5fe..97c9515a79 100644 --- a/conf/boards/lisa_m_common_chibios.makefile +++ b/conf/boards/lisa_m_common_chibios.makefile @@ -44,36 +44,3 @@ CHIBIOS_BOARD_LINKER = STM32F107xC_luftboot.ld else CHIBIOS_BOARD_LINKER = STM32F107xC.ld endif - -# -# default LED configuration -# -RADIO_CONTROL_LED ?= 4 -BARO_LED ?= none -AHRS_ALIGNER_LED ?= 2 -GPS_LED ?= 3 -SYS_TIME_LED ?= 1 - -# -# default uart configuration -# -RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 -RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 - -MODEM_PORT ?= UART2 -MODEM_BAUD ?= B57600 - -GPS_PORT ?= UART3 -GPS_BAUD ?= B38400 - - -# -# default actuator configuration -# -# you can use different actuators by adding a configure option to your firmware section -# e.g. -# -ACTUATORS ?= actuators_pwm - diff --git a/conf/boards/lisa_m_defaults.makefile b/conf/boards/lisa_m_defaults.makefile new file mode 100644 index 0000000000..7c54d2dc0c --- /dev/null +++ b/conf/boards/lisa_m_defaults.makefile @@ -0,0 +1,36 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# Defaults for Lia 1.1, Lisa M 2.0, and Lisa M 2.1 +# + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= 4 +BARO_LED ?= none +AHRS_ALIGNER_LED ?= 2 +GPS_LED ?= 3 +SYS_TIME_LED ?= 1 + +# +# default uart configuration +# +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 +RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 + +MODEM_PORT ?= UART2 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART3 +GPS_BAUD ?= B38400 + +# +# default actuator configuration +# +# you can use different actuators by adding a configure option to your firmware section +# e.g. +# +ACTUATORS ?= actuators_pwm + diff --git a/conf/boards/lisa_mx_2.0.makefile b/conf/boards/lisa_mx_2.0.makefile index ce2ec0fd6d..09c835a200 100644 --- a/conf/boards/lisa_mx_2.0.makefile +++ b/conf/boards/lisa_mx_2.0.makefile @@ -17,10 +17,6 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-mx.ld # ----------------------------------------------------------------------- -# default flash mode is via usb dfu bootloader (luftboot) -# other possibilities: DFU-UTIL, SWD, JTAG_BMP, STLINK, SERIAL -FLASH_MODE ?= SWD - HAS_LUFTBOOT ?= 0 ifeq (,$(findstring $(HAS_LUFTBOOT),0 FALSE)) $(TARGET).CFLAGS+=-DLUFTBOOT @@ -29,47 +25,4 @@ DFU_ADDR = 0x8004000 DFU_PRODUCT = Lisa/Lia endif - -# -# default LED configuration -# -RADIO_CONTROL_LED ?= 4 -BARO_LED ?= none -AHRS_ALIGNER_LED ?= 2 -GPS_LED ?= 3 -SYS_TIME_LED ?= 1 - - -# -# default uart configuration -# -RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 -RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 - -MODEM_PORT ?= UART2 -MODEM_BAUD ?= B57600 - -GPS_PORT ?= UART3 -GPS_BAUD ?= B38400 - -# -# default PPM input is on PA01 (SERVO6) -# -RADIO_CONTROL_PPM_PIN ?= PA01 -ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 PA10 UART1_RX)) - PPM_CONFIG=1 -else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 PA01 PA1 SERVO6)) - PPM_CONFIG=2 -else -$(error Unknown RADIO_CONTROL_PPM_PIN, configure it to either PA01 or PA10) -endif - -# -# default actuator configuration -# -# you can use different actuators by adding a configure option to your firmware section -# e.g. -# -ACTUATORS ?= actuators_pwm +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile diff --git a/conf/boards/lisa_mx_2.1.makefile b/conf/boards/lisa_mx_2.1.makefile index 568ad562f0..c4c409ded7 100644 --- a/conf/boards/lisa_mx_2.1.makefile +++ b/conf/boards/lisa_mx_2.1.makefile @@ -17,10 +17,6 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-mx.ld # ----------------------------------------------------------------------- -# default flash mode is via usb dfu bootloader (luftboot) -# other possibilities: DFU-UTIL, SWD, JTAG_BMP, STLINK, SERIAL -FLASH_MODE ?= SWD - HAS_LUFTBOOT ?= 0 ifeq (,$(findstring $(HAS_LUFTBOOT),0 FALSE)) $(TARGET).CFLAGS+=-DLUFTBOOT @@ -29,47 +25,4 @@ DFU_ADDR = 0x8004000 DFU_PRODUCT = Lisa/Lia endif - -# -# default LED configuration -# -RADIO_CONTROL_LED ?= 4 -BARO_LED ?= none -AHRS_ALIGNER_LED ?= 2 -GPS_LED ?= 3 -SYS_TIME_LED ?= 1 - - -# -# default uart configuration -# -RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 -RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 - -MODEM_PORT ?= UART2 -MODEM_BAUD ?= B57600 - -GPS_PORT ?= UART3 -GPS_BAUD ?= B38400 - -# -# default PPM input is on PA01 (SERVO6) -# -RADIO_CONTROL_PPM_PIN ?= PA01 -ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 PA10 UART1_RX)) - PPM_CONFIG=1 -else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 PA01 PA1 SERVO6)) - PPM_CONFIG=2 -else -$(error Unknown RADIO_CONTROL_PPM_PIN, configure it to either PA01 or PA10) -endif - -# -# default actuator configuration -# -# you can use different actuators by adding a configure option to your firmware section -# e.g. -# -ACTUATORS ?= actuators_pwm +include $(PAPARAZZI_SRC)/conf/boards/lisa_m_defaults.makefile diff --git a/conf/boards/lisa_mx_2.1_chibios.makefile b/conf/boards/lisa_mx_2.1_chibios.makefile index 720aa934d6..48a697923d 100644 --- a/conf/boards/lisa_mx_2.1_chibios.makefile +++ b/conf/boards/lisa_mx_2.1_chibios.makefile @@ -36,41 +36,6 @@ CHIBIOS_BOARD_STARTUP = startup_stm32f4xx.mk # MCU = cortex-m4 -# default flash mode is via usb dfu bootloader -# possibilities: DFU-UTIL, SWD, STLINK -FLASH_MODE ?= SWD - HAS_LUFTBOOT = FALSE -# -# default LED configuration -# -RADIO_CONTROL_LED ?= 4 -BARO_LED ?= none -AHRS_ALIGNER_LED ?= 2 -GPS_LED ?= 3 -SYS_TIME_LED ?= 1 - -# -# default UART configuration (modem, gps, spektrum) -# - -RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 -RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 - -MODEM_PORT ?= UART2 -MODEM_BAUD ?= B57600 - -GPS_PORT ?= UART3 -GPS_BAUD ?= B38400 - -# -# default actuator configuration -# -# you can use different actuators by adding a configure option to your firmware section -# e.g. -# -ACTUATORS ?= actuators_pwm - +include $(PAPARAZZI_SRC)/conf/boards/lisa_mx_defaults.makefile diff --git a/conf/boards/lisa_mx_defaults.makefile b/conf/boards/lisa_mx_defaults.makefile new file mode 100644 index 0000000000..205a35ce08 --- /dev/null +++ b/conf/boards/lisa_mx_defaults.makefile @@ -0,0 +1,54 @@ +# Hey Emacs, this is a -*- makefile -*- +# +# lisa_mx_defaults.makefile +# +# http://wiki.paparazziuav.org/wiki/Lisa/M_v20 +# + +# default flash mode is via usb dfu bootloader +# possibilities: DFU-UTIL, SWD, STLINK +FLASH_MODE ?= SWD + +# +# default LED configuration +# +RADIO_CONTROL_LED ?= 4 +BARO_LED ?= none +AHRS_ALIGNER_LED ?= 2 +GPS_LED ?= 3 +SYS_TIME_LED ?= 1 + + +# +# default uart configuration +# +RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART1 +RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5 + +MODEM_PORT ?= UART2 +MODEM_BAUD ?= B57600 + +GPS_PORT ?= UART3 +GPS_BAUD ?= B38400 + +# +# default PPM input is on PA01 (SERVO6) +# +RADIO_CONTROL_PPM_PIN ?= PA01 +ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_10 PA10 UART1_RX)) + PPM_CONFIG=1 +else ifeq ($(RADIO_CONTROL_PPM_PIN),$(filter $(RADIO_CONTROL_PPM_PIN),PA_01 PA01 PA1 SERVO6)) + PPM_CONFIG=2 +else +$(error Unknown RADIO_CONTROL_PPM_PIN, configure it to either PA01 or PA10) +endif + +# +# default actuator configuration +# +# you can use different actuators by adding a configure option to your firmware section +# e.g. +# +ACTUATORS ?= actuators_pwm