From 697b4a6d4df91bfa3b00c5f627dd82fd7375e366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 9 Jul 2019 16:13:47 +0200 Subject: [PATCH] [scripts] Remove unused EPSILON_DEVICE_BENCH flag --- ion/src/device/n0110/drivers/board.cpp | 2 +- scripts/platform.device.mak | 3 --- scripts/targets.device.mak | 22 ++++++---------------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/ion/src/device/n0110/drivers/board.cpp b/ion/src/device/n0110/drivers/board.cpp index c166582bd..3881dd9f5 100644 --- a/ion/src/device/n0110/drivers/board.cpp +++ b/ion/src/device/n0110/drivers/board.cpp @@ -229,7 +229,7 @@ void initClocks() { class RCC::APB2ENR apb2enr(0); // Reset value apb2enr.setADC1EN(true); apb2enr.setSYSCFGEN(true); - apb2enr.setUSART6EN(true); // TODO if EPSILON_DEVICE_BENCH? + apb2enr.setUSART6EN(true); // TODO required if building bench target only? RCC.APB2ENR()->set(apb2enr); // Configure clocks in sleep mode diff --git a/scripts/platform.device.mak b/scripts/platform.device.mak index dc2f70192..f49212340 100644 --- a/scripts/platform.device.mak +++ b/scripts/platform.device.mak @@ -5,9 +5,6 @@ EPSILON_BOOT_PROMPT = update BUILD_DIR = build/$(PLATFORM)/$(MODEL) -EPSILON_DEVICE_BENCH ?= 1 -SFLAGS += -DEPSILON_DEVICE_BENCH=$(EPSILON_DEVICE_BENCH) - $(BUILD_DIR)/python/port/port.o: CXXFLAGS += -DMP_PORT_USE_STACK_SYMBOLS=1 include scripts/platform.device.$(MODEL).mak diff --git a/scripts/targets.device.mak b/scripts/targets.device.mak index e75b969ff..456993e0a 100644 --- a/scripts/targets.device.mak +++ b/scripts/targets.device.mak @@ -59,29 +59,19 @@ openocd: # The flasher target is defined here because otherwise $(src) has not been # fully filled -ifeq ($(EPSILON_DEVICE_BENCH),0) $(BUILD_DIR)/flasher.%.$(EXE): LDFLAGS += -Lion/src/$(PLATFORM)/flasher $(BUILD_DIR)/flasher.%.$(EXE): LDSCRIPT = ion/src/$(PLATFORM)/shared/ram.ld flasher_objs = $(call object_for,$(src) $(flasher_src) $(ion_device_dfu_xip_src)) $(BUILD_DIR)/flasher.light.$(EXE): $(BUILD_DIR)/ion/src/$(PLATFORM)/flasher/display_light.o $(flasher_objs) $(BUILD_DIR)/flasher.verbose.$(EXE): $(BUILD_DIR)/ion/src/$(PLATFORM)/flasher/display_verbose.o $(flasher_objs) -else -$(BUILD_DIR)/flasher.%.$(EXE): - @echo "Error: flasher.elf requires EPSILON_DEVICE_BENCH=0" -endif #TODO Do not build all apps... Put elsewhere? -ifeq ($(EPSILON_DEVICE_BENCH),1) $(BUILD_DIR)/bench.ram.$(EXE): LDFLAGS += -Lion/src/$(PLATFORM)/bench $(BUILD_DIR)/bench.ram.$(EXE): LDSCRIPT = ion/src/$(PLATFORM)/shared/ram.ld $(BUILD_DIR)/bench.flash.$(EXE): LDSCRIPT = ion/src/$(PLATFORM)/$(MODEL)/internal_flash.ld $(BUILD_DIR)/bench.%.$(EXE): $(call object_for,$(src) $(bench_src) $(ion_device_dfu_xip_src)) -else -$(BUILD_DIR)/bench.ram.$(EXE): - @echo "Error: bench.*.bin requires EPSILON_DEVICE_BENCH=1" -endif -ifeq ($(EPSILON_DEVICE_BENCH)$(EPSILON_ONBOARDING_APP)$(EPSILON_BOOT_PROMPT),01update) +ifeq ($(EPSILON_ONBOARDING_APP)$(EPSILON_BOOT_PROMPT),1update) .PHONY: %_two_binaries %_two_binaries: %.elf @echo "Building an internal and an external binary for $<" @@ -92,7 +82,7 @@ ifeq ($(EPSILON_DEVICE_BENCH)$(EPSILON_ONBOARDING_APP)$(EPSILON_BOOT_PROMPT),01u $(Q) printf "\xFF\xFF\xFF\xFF" >> $(basename $<).internal.bin else %_two_binaries: - @echo "Error: two_binaries requires EPSILON_DEVICE_BENCH=0 EPSILON_ONBOARDING_APP=1 EPSILON_BOOT_PROMPT=update" + @echo "Error: two_binaries requires EPSILON_ONBOARDING_APP=1 EPSILON_BOOT_PROMPT=update" endif .PHONY: binpack @@ -100,14 +90,14 @@ binpack: rm -rf build/binpack mkdir -p build/binpack make clean - make -j8 EPSILON_DEVICE_BENCH=0 $(BUILD_DIR)/flasher.light.bin + make -j8 $(BUILD_DIR)/flasher.light.bin cp $(BUILD_DIR)/flasher.light.bin build/binpack make clean - make -j8 EPSILON_DEVICE_BENCH=1 $(BUILD_DIR)/bench.flash.bin - make -j8 EPSILON_DEVICE_BENCH=1 $(BUILD_DIR)/bench.ram.bin + make -j8 $(BUILD_DIR)/bench.flash.bin + make -j8 $(BUILD_DIR)/bench.ram.bin cp $(BUILD_DIR)/bench.ram.bin $(BUILD_DIR)/bench.flash.bin build/binpack make clean - make -j8 EPSILON_DEVICE_BENCH=0 EPSILON_ONBOARDING_APP=1 EPSILON_BOOT_PROMPT=update $(BUILD_DIR)/epsilon_two_binaries + make -j8 EPSILON_ONBOARDING_APP=1 EPSILON_BOOT_PROMPT=update $(BUILD_DIR)/epsilon_two_binaries cp $(BUILD_DIR)/epsilon.internal.bin $(BUILD_DIR)/epsilon.external.bin build/binpack make clean cd build && for binary in flasher.light.bin bench.flash.bin bench.ram.bin epsilon.internal.bin epsilon.external.bin; do shasum -a 256 -b binpack/$${binary} > binpack/$${binary}.sha256;done