From 43b9a2d3df162930752c0b9d128ecfceac905a9c Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Tue, 22 Jun 2021 17:12:24 +0200 Subject: [PATCH] dump: do not hard-code constants --- tools/lib/dump.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/lib/dump.py b/tools/lib/dump.py index 8d6b1059..5d2ea724 100644 --- a/tools/lib/dump.py +++ b/tools/lib/dump.py @@ -5,7 +5,8 @@ import struct from . import avr -FILL_BYTE = b'\0' # used to fill memory gaps in the dump +FILL_BYTE = b'\0' # used to fill memory gaps in the dump +DUMP_MAGIC = 0x55525547 # XFLASH dump magic class CrashReason(enum.IntEnum): MANUAL = 0 @@ -151,7 +152,7 @@ def decode_dump(path): # decode the header structure magic, regs_present, crash_reason, pc, sp = struct.unpack('