Add button tests
This is implemented by connecting the DTR pin of the serial device to the BTN_UP pin of the watch. Also, make it possible to flash different applications with the Makefile. Resolves #4
This commit is contained in:
@@ -83,7 +83,7 @@ S_SOURCES := $(call find_important, $(SOURCEDIR), '*.s')
|
||||
SPP_SOURCES := Bsp/Mcu/$(DEVICE_TYPE).S
|
||||
SOURCES = $(C_SOURCES) $(S_SOURCES) $(SPP_SOURCES) $(CPP_SOURCES)
|
||||
|
||||
APPS := ./Application/main ./Test/pass ./Test/fail ./Test/timeout ./Test/clock ./Test/stop ./Test/no_start ./Test/lptim ./Test/set_time ./Test/periodic_alarms ./Test/wakeup_irq
|
||||
APPS := ./Application/main ./Test/pass ./Test/fail ./Test/timeout ./Test/clock ./Test/stop ./Test/no_start ./Test/lptim ./Test/set_time ./Test/periodic_alarms ./Test/wakeup_irq ./Test/button
|
||||
APP_ELFS = $(addsuffix .elf, $(APPS))
|
||||
APP_MAPS = $(addsuffix .map, $(APPS))
|
||||
APP_BINS = $(addsuffix .bin, $(APPS))
|
||||
@@ -223,22 +223,22 @@ $(FONT_GEN_DIR)/large_digits.h $(FONT_GEN_DIR)/large_digits.c: Gen/fixedfont-to-
|
||||
#
|
||||
|
||||
STM32FLASH_DEVICE = /dev/ttyUSB0
|
||||
FLASH_BIN ?= $(OUTPUT_BIN)
|
||||
|
||||
.PHONY: flash
|
||||
flash: $(OUTPUT_BIN)
|
||||
@echo "FLASH $(OUTPUT_BIN)"
|
||||
$(STM32_PROG) --connect port=SWD reset=Hwrst -w $(OUTPUT_BIN) 0x8000000 -v --go
|
||||
$(STM32_PROG) --connect port=SWD reset=Hwrst -w $(FLASH_BIN) 0x8000000 -v --go
|
||||
|
||||
.PHONY: jlink
|
||||
jlink: $(OUTPUT_BIN)
|
||||
@echo "FLASH $(OUTPUT_BIN)"
|
||||
JLinkExe -device $$(echo $(DEVICE_TYPE) | tr '[:lower:]' '[:upper:]') -if SWD \
|
||||
-speed auto -autoconnect 1 -CommanderScript cmd.jlink
|
||||
|
||||
./jlink.sh $(DEVICE_TYPE) $(FLASH_BIN)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(OBJS) $(OUTPUT_BIN) $(OUTPUT_ELF) $(FONT_C_FILES) $(FONT_H_FILES) $(OUTPUT_MAP) $(addsuffix .su,$(basename $(OBJS)))
|
||||
rm -f $(OBJS) $(OUTPUT_BIN) $(OUTPUT_ELF) $(FONT_C_FILES) $(FONT_H_FILES) $(OUTPUT_MAP) $(APPS) $(APP_ELFS) $(APP_MAPS) $(APP_BINS) $(APP_OBJS) $(addsuffix .su,$(basename $(ALL_OBJS)))
|
||||
|
||||
|
||||
# Please do not delete my files.
|
||||
.SECONDARY: $(ALL_OBJS) $(APP_ELFS)
|
||||
|
||||
Reference in New Issue
Block a user