From 0b02208793a0c47b4597e67944ce2fbb1c15bb5d Mon Sep 17 00:00:00 2001 From: Vadim Kaushan Date: Sat, 12 Oct 2019 16:38:28 +0300 Subject: [PATCH] Add BluePill target with DFU --- Makefile | 8 +++++++- src/targets.mk | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a2f5dc2..92539bb 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ BUILD_DIR ?= ./build all: DAP42.bin DAP42DC.bin KITCHEN42.bin \ DAP103.bin DAP103-DFU.bin \ - DAP103-BLUEPILL.bin \ + DAP103-BLUEPILL.bin DAP103-BLUEPILL-DFU.bin \ DAP103-NUCLEO-STBOOT.bin \ BRAINv3.3.bin \ DAP42K6U.bin @@ -75,6 +75,12 @@ DAP103-BLUEPILL.bin: | $(BUILD_DIR) $(Q)$(MAKE) TARGET=STM32F103-BLUEPILL -C src/ $(Q)cp src/DAP42.bin $(BUILD_DIR)/$(@) +DAP103-BLUEPILL-DFU.bin: | $(BUILD_DIR) + @printf " BUILD $(@)\n" + $(Q)$(MAKE) TARGET=STM32F103-BLUEPILL-DFUBOOT -C src/ clean + $(Q)$(MAKE) TARGET=STM32F103-BLUEPILL-DFUBOOT -C src/ + $(Q)cp src/DAP42.bin $(BUILD_DIR)/$(@) + BRAINv3.3.bin: | $(BUILD_DIR) @printf " BUILD $(@)\n" $(Q)$(MAKE) TARGET=BRAINV3.3 -C src/ clean diff --git a/src/targets.mk b/src/targets.mk index 15a3357..54c03c9 100644 --- a/src/targets.mk +++ b/src/targets.mk @@ -64,6 +64,14 @@ ifeq ($(TARGET),STM32F103-BLUEPILL) DEFS += -DDFU_AVAILABLE=0 ARCH = STM32F1 endif +ifeq ($(TARGET),STM32F103-BLUEPILL-DFUBOOT) + TARGET_COMMON_DIR := ./stm32f103 + TARGET_SPEC_DIR := ./stm32f103/bluepill + LDSCRIPT ?= ./stm32f103/stm32f103x8-dfuboot.ld + DEFS += -DDFU_AVAILABLE=1 + ARCH = STM32F1 + DFU_VID_PID := 1209:db42 +endif ifeq ($(TARGET),STM32F103-DFUBOOT) TARGET_COMMON_DIR := ./stm32f103 TARGET_SPEC_DIR := ./stm32f103/stlinkv2-dongle