Skip to content

Commit

Permalink
[gui] Check flash writing offset 4K alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba2k2 committed Dec 7, 2023
1 parent a2ca75e commit 7fb7be7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ltchiptool/gui/panels/flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7fb7be7

Please sign in to comment.