[boards] readability and overwritable defaults

This commit is contained in:
Felix Ruess
2013-02-08 15:41:38 +01:00
parent 043cf7246d
commit 309c7fda86
14 changed files with 95 additions and 190 deletions
+3 -9
View File
@@ -12,9 +12,8 @@ BOARD_VERSION=1.0
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
ifndef FLASH_MODE # default flash mode is via usb bootloader
FLASH_MODE = IAP FLASH_MODE ?= IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -44,9 +43,4 @@ GPS_BAUD ?= B38400
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
+2 -6
View File
@@ -65,9 +65,7 @@ GPS_BAUD ?= B38400
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
ifndef ADC_IR1 ifndef ADC_IR1
@@ -82,6 +80,4 @@ ifndef ADC_IR3
ADC_IR_TOP = 3 ADC_IR_TOP = 3
ADC_IR_TOP_CHAN = 2 ADC_IR_TOP_CHAN = 2
endif endif
ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES ?= 16
ADC_IR_NB_SAMPLES = 16
endif
+15 -46
View File
@@ -28,9 +28,8 @@ else
endif endif
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
ifndef FLASH_MODE # default flash mode is the onboard JTAG
FLASH_MODE = JTAG FLASH_MODE ?= JTAG
endif
# #
# #
@@ -41,50 +40,24 @@ endif
# #
# default LED configuration # default LED configuration
# #
ifndef RADIO_CONTROL_LED RADIO_CONTROL_LED ?= 5
RADIO_CONTROL_LED = 5 BARO_LED ?= none
endif AHRS_ALIGNER_LED ?= 7
GPS_LED ?= 3
ifndef BARO_LED SYS_TIME_LED ?= 1
BARO_LED = none
endif
ifndef AHRS_ALIGNER_LED
AHRS_ALIGNER_LED = 7
endif
ifndef GPS_LED
GPS_LED = 3
endif
ifndef SYS_TIME_LED
SYS_TIME_LED = 1
endif
# #
# default uart configuration # default uart configuration
# #
ifndef RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT ?= UART3
RADIO_CONTROL_SPEKTRUM_PRIMARY_PORT = UART3 RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT ?= UART5
endif
ifndef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT = UART5
endif
ifndef MODEM_PORT MODEM_PORT ?= UART2
MODEM_PORT=UART2 MODEM_BAUD ?= B57600
endif
ifndef MODEM_BAUD
MODEM_BAUD=B57600
endif
ifndef GPS_PORT GPS_PORT ?= UART1
GPS_PORT=UART1 GPS_BAUD ?= B38400
endif
ifndef GPS_BAUD
GPS_BAUD=B38400
endif
# #
# default actuator configuration # default actuator configuration
@@ -92,9 +65,7 @@ endif
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
ifndef ADC_IR1 ifndef ADC_IR1
@@ -109,6 +80,4 @@ ifndef ADC_IR3
ADC_IR_TOP = 4 ADC_IR_TOP = 4
ADC_IR_TOP_CHAN = 3 ADC_IR_TOP_CHAN = 3
endif endif
ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES ?= 16
ADC_IR_NB_SAMPLES = 16
endif
+4 -9
View File
@@ -31,9 +31,8 @@ else
endif endif
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
ifndef FLASH_MODE # default flash mode is the onboard JTAG
FLASH_MODE = JTAG FLASH_MODE ?= JTAG
endif
# #
# #
@@ -72,9 +71,7 @@ GPS_BAUD ?= B38400
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
ifndef ADC_IR1 ifndef ADC_IR1
@@ -89,6 +86,4 @@ ifndef ADC_IR3
ADC_IR_TOP = 4 ADC_IR_TOP = 4
ADC_IR_TOP_CHAN = 3 ADC_IR_TOP_CHAN = 3
endif endif
ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES ?= 16
ADC_IR_NB_SAMPLES = 16
endif
+5 -10
View File
@@ -21,10 +21,9 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-m.ld
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
ifndef FLASH_MODE # default flash mode is JTAG
FLASH_MODE = JTAG # other possibilities: SWD, SERIAL
#FLASH_MODE = SERIAL FLASH_MODE ?= JTAG
endif
# #
# #
@@ -62,9 +61,7 @@ GPS_BAUD ?= B38400
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
ifndef ADC_IR1 ifndef ADC_IR1
@@ -79,6 +76,4 @@ ifndef ADC_IR3
ADC_IR_TOP = 3 ADC_IR_TOP = 3
ADC_IR_TOP_CHAN = 2 ADC_IR_TOP_CHAN = 2
endif endif
ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES ?= 16
ADC_IR_NB_SAMPLES = 16
endif
+5 -11
View File
@@ -18,11 +18,9 @@ $(TARGET).LDSCRIPT=$(SRC_ARCH)/lisa-m.ld
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
ifndef FLASH_MODE # default flash mode is via usb dfu bootloader (luftboot)
FLASH_MODE = DFU # other possibilities: JTAG, SWD, SERIAL
#FLASH_MODE = JTAG FLASH_MODE ?= DFU
#FLASH_MODE = SERIAL
endif
ifndef NO_LUFTBOOT ifndef NO_LUFTBOOT
$(TARGET).CFLAGS+=-DLUFTBOOT $(TARGET).CFLAGS+=-DLUFTBOOT
@@ -65,9 +63,7 @@ GPS_BAUD ?= B38400
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_pwm
ACTUATORS = actuators_pwm
endif
ifndef ADC_IR1 ifndef ADC_IR1
@@ -82,6 +78,4 @@ ifndef ADC_IR3
ADC_IR_TOP = 3 ADC_IR_TOP = 3
ADC_IR_TOP_CHAN = 2 ADC_IR_TOP_CHAN = 2
endif endif
ifndef ADC_IR_NB_SAMPLES ADC_IR_NB_SAMPLES ?= 16
ADC_IR_NB_SAMPLES = 16
endif
+9 -15
View File
@@ -11,11 +11,8 @@ BOARD_VERSION=0.99
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
LPC21ISP_XTAL = 12000 LPC21ISP_XTAL = 12000
@@ -41,22 +38,19 @@ GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4015
ACTUATORS = actuators_4015
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH) $(TARGET).ARCHDIR = $(ARCH)
+9 -13
View File
@@ -11,10 +11,8 @@ BOARD_VERSION=1.1
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -40,21 +38,19 @@ GPS_PORT ?= UART1
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4015
ACTUATORS = actuators_4015
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
+9 -14
View File
@@ -11,10 +11,8 @@ BOARD_VERSION=2.1
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -40,22 +38,19 @@ GPS_PORT ?= UART0
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH) $(TARGET).ARCHDIR = $(ARCH)
+9 -12
View File
@@ -12,9 +12,8 @@ BOARD_VERSION=2.11
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
ifndef FLASH_MODE # default flash mode is via usb bootloader
FLASH_MODE = IAP FLASH_MODE ?= IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -40,21 +39,19 @@ GPS_PORT ?= UART0
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
+9 -13
View File
@@ -11,10 +11,8 @@ BOARD_VERSION=1.0
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -40,21 +38,19 @@ GPS_PORT ?= UART0
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
+3 -7
View File
@@ -12,9 +12,8 @@ BOARD_VERSION=1.0
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
ifndef FLASH_MODE # default flash mode is via usb bootloader
FLASH_MODE = IAP FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
@@ -41,16 +40,13 @@ GPS_PORT ?= UART0
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the Umarim board run on the same processor achitecture # All targets on the Umarim board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH) $(TARGET).ARCHDIR = $(ARCH)
+4 -10
View File
@@ -11,11 +11,8 @@ BOARD_VERSION=lite_2.0
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
LPC21ISP_XTAL = 12000 LPC21ISP_XTAL = 12000
@@ -42,16 +39,13 @@ GPS_BAUD ?= B38400
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the Umarim board run on the same processor achitecture # All targets on the Umarim board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH) $(TARGET).ARCHDIR = $(ARCH)
+9 -15
View File
@@ -11,11 +11,8 @@ BOARD_VERSION=2.0
BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\" BOARD_CFG=\"boards/$(BOARD)_$(BOARD_VERSION).h\"
# default flash mode is via usb bootloader
ifndef FLASH_MODE FLASH_MODE ?= IAP
FLASH_MODE = IAP
endif
LPC21ISP_BAUD = 38400 LPC21ISP_BAUD = 38400
LPC21ISP_XTAL = 12000 LPC21ISP_XTAL = 12000
@@ -40,22 +37,19 @@ GPS_PORT ?= UART0
GPS_BAUD ?= B38400 GPS_BAUD ?= B38400
ADC_IR_TOP = ADC_0 ADC_IR_TOP ?= ADC_0
ADC_IR1 = ADC_1 ADC_IR1 ?= ADC_1
ADC_IR2 = ADC_2 ADC_IR2 ?= ADC_2
ADC_IR_NB_SAMPLES = 16 ADC_IR_NB_SAMPLES ?= 16
ADC_GYRO_NB_SAMPLES = 16 ADC_GYRO_NB_SAMPLES ?= 16
ADC_GENERIC_NB_SAMPLES = 16 ADC_GENERIC_NB_SAMPLES ?= 16
# #
# you can use different actuators by adding a configure option to your firmware section # you can use different actuators by adding a configure option to your firmware section
# e.g. <configure name="ACTUATORS" value="actuators_ppm/> # e.g. <configure name="ACTUATORS" value="actuators_ppm/>
# #
ifndef ACTUATORS ACTUATORS ?= actuators_4017
ACTUATORS = actuators_4017
endif
# All targets on the TINY board run on the same processor achitecture # All targets on the TINY board run on the same processor achitecture
$(TARGET).ARCHDIR = $(ARCH) $(TARGET).ARCHDIR = $(ARCH)