From dd543150b45c8dc45a5837a6ce6c7d61c8525c52 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 5 Jul 2018 23:18:56 +0900 Subject: [PATCH] rule.mk: Add dfu-programmer version check again - ubuntu 18.04 still uses old 0.6.1 --- tmk_core/rules.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index ca933826..978f3c06 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -427,9 +427,14 @@ dfu: $(TARGET).hex done @echo +ifeq ($(shell dfu-programmer --version 2>&1 | grep -q 0.7; echo $$?),0) dfu-programmer $(MCU) erase --force +else + dfu-programmer $(MCU) erase +endif + dfu-programmer $(MCU) flash $(TARGET).hex - dfu-programmer $(MCU) reset + dfu-programmer $(MCU) reset || true # ignore exit code dfu-start: dfu-programmer $(MCU) reset -- 2.46.2