From 7fb7be78bf57415b1b13d0d8c26225f9fef84a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 7 Dec 2023 22:18:37 +0100 Subject: [PATCH] [gui] Check flash writing offset 4K alignment --- ltchiptool/gui/panels/flash.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ltchiptool/gui/panels/flash.py b/ltchiptool/gui/panels/flash.py index e1da7e3..5efb279 100644 --- a/ltchiptool/gui/panels/flash.py +++ b/ltchiptool/gui/panels/flash.py @@ -213,6 +213,8 @@ def OnUpdate(self, target: wx.Window = None): errors.append("File does not exist") else: self.FileType.ChangeValue(self.detection.title) + if self.offset % 0x1000: + errors.append(f"Offset (0x{self.offset:X}) is not 4 KiB-aligned") if auto: self.family = self.detection.family if not need_offset: