From 98ead6d41ac4fd6cbfca660a9989b019a87ea112 Mon Sep 17 00:00:00 2001 From: IOsetting Date: Sun, 22 Jan 2023 01:58:23 +0800 Subject: [PATCH] fix: suppress firmware update dialog --- Misc/{flash.jlink => jlink-command} | 0 Misc/jlink-script | 14 ++++++++++++++ rules.mk | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) rename Misc/{flash.jlink => jlink-command} (100%) create mode 100644 Misc/jlink-script diff --git a/Misc/flash.jlink b/Misc/jlink-command similarity index 100% rename from Misc/flash.jlink rename to Misc/jlink-command diff --git a/Misc/jlink-script b/Misc/jlink-script new file mode 100644 index 0000000..0fe14dd --- /dev/null +++ b/Misc/jlink-script @@ -0,0 +1,14 @@ +int InitEMU(void) { + JLINK_SYS_Report("--InitEMU()--"); + // Silence confirm updating firmware dialog boxes that appear when uploading + JLINK_ExecCommand("SuppressInfoUpdateFW"); + JLINK_ExecCommand("DisableAutoUpdateFW"); + // Uncomment to hide flash windows + //JLINK_ExecCommand("DisableInfoWinFlashDL"); + //JLINK_ExecCommand("DisableInfoWinFlashBPs"); + return 0; +} +int ConfigTargetSettings(void) { + JLINK_SYS_Report("--ConfigTargetSettings()--"); + return 0; +} diff --git a/rules.mk b/rules.mk index 8da933f..a03b880 100644 --- a/rules.mk +++ b/rules.mk @@ -107,7 +107,7 @@ clean: flash: ifeq ($(FLASH_PROGRM),jlink) - $(JLINKEXE) -device $(JLINK_DEVICE) -if swd -speed 4000 -CommanderScript $(TOP)/Misc/flash.jlink + $(JLINKEXE) -device $(JLINK_DEVICE) -if swd -speed 4000 -JLinkScriptFile $(TOP)/Misc/jlink-script -CommanderScript $(TOP)/Misc/jlink-command else ifeq ($(FLASH_PROGRM),pyocd) $(PYOCD_EXE) erase -t $(PYOCD_DEVICE) --chip --config $(TOP)/Misc/pyocd.yaml $(PYOCD_EXE) load $(BDIR)/$(PROJECT).hex -t $(PYOCD_DEVICE) --config $(TOP)/Misc/pyocd.yaml