diff --git a/Makefile.ac b/Makefile.ac index a0ca229775..f49755c7a4 100644 --- a/Makefile.ac +++ b/Makefile.ac @@ -33,9 +33,8 @@ ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT) AIRCRAFT_CONF_DIR = $(ACINCLUDE)/conf AC_GENERATED = $(ACINCLUDE)/generated -ifndef PERIODIC_FREQ -PERIODIC_FREQ = 60 -endif +# periodic frequency defaults to 60Hz +PERIODIC_FREQ ?= 60 AIRFRAME_H=$(AC_GENERATED)/airframe.h PERIODIC_H=$(AC_GENERATED)/periodic_telemetry.h diff --git a/conf/Makefile.lpc21 b/conf/Makefile.lpc21 index 109e8f2e98..a1b8bc298d 100644 --- a/conf/Makefile.lpc21 +++ b/conf/Makefile.lpc21 @@ -126,9 +126,7 @@ LDFLAGS +=-T$(LDSCRIPT) # Settings and variables: LPC21ISP = lpc21isp -ifndef LPC21ISP_PORT -LPC21ISP_PORT = /dev/ttyS0 -endif +LPC21ISP_PORT ?= /dev/ttyS0 LPC21ISP_FLASHFILE = $(OBJDIR)/$(TARGET).hex # verbose output: #LPC21ISP_DEBUG = -debug diff --git a/conf/Makefile.stm32 b/conf/Makefile.stm32 index b57476046c..877b2c11a1 100644 --- a/conf/Makefile.stm32 +++ b/conf/Makefile.stm32 @@ -45,9 +45,7 @@ OPT = s #OPT = 0 -ifndef $(PYTHON) -PYTHON = $(shell which python) -endif +PYTHON ?= $(shell which python) ifneq ($(BOARD_SERIAL),) OOCD_OPTIONS = -c "ft2232_serial $(BOARD_SERIAL)" @@ -266,11 +264,10 @@ upload: $(OBJDIR)/$(TARGET).hex -c shutdown else # jtag via BMP - ifndef $(BMP_UPLOAD_SCRIPT) - BMP_UPLOAD_SCRIPT = $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_jtag_flash.scr - endif +BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_jtag_flash.scr upload: $(OBJDIR)/$(TARGET).elf + @echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)" @echo "Using Black Magic Probe with JTAG" @echo "Using GDB = $(GDB)" @echo " BMP\t$<" @@ -284,10 +281,9 @@ endif else ifeq ($(FLASH_MODE),SWD) # only works if BMP_PORT is defined ifneq ($(BMP_PORT),) - ifndef $(BMP_UPLOAD_SCRIPT) - BMP_UPLOAD_SCRIPT = $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_swd_flash.scr - endif +BMP_UPLOAD_SCRIPT ?= $(PAPARAZZI_SRC)/conf/boards/upload_scripts/bmp_swd_flash.scr upload: $(OBJDIR)/$(TARGET).elf + @echo "Assuming luftboot bootloader: $(ASSUMING_LUFTBOOT)" @echo "Using Black Magic Probe with SWD" @echo "Using GDB = $(GDB)" @echo " BMP\t$<"