From 1be9c6e9c5afe3e4b2fe680876e6091ef0309d18 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 25 Jun 2017 15:18:08 +0200 Subject: [PATCH] stm32_mem.py: Set address before writing to inhibit bootloader overwrite. --- scripts/stm32_mem.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/stm32_mem.py b/scripts/stm32_mem.py index 9f2e228..780da32 100755 --- a/scripts/stm32_mem.py +++ b/scripts/stm32_mem.py @@ -39,6 +39,16 @@ def stm32_erase(dev, addr): if status.bState == dfu.STATE_DFU_DOWNLOAD_IDLE: break +def stm32_set_address(dev, addr): + set_address_cmd = struct.pack("