Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dumpflash/ecc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def calc(self, body):
p4 = 0
p4_ = 0
for i in range(0, len(body), 1):
ch = ord(body[i])
ch = body[i]
bit0 = ch & 0x1
bit1 = (ch >> 1) & 0x1
bit2 = (ch >> 2) & 0x1
Expand Down
6 changes: 3 additions & 3 deletions dumpflash/flashimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def check_ecc(self, start_page = 0, end_page = -1):

count += 1
body = data[0:self.SrcImage.PageSize]
oob_ecc0 = ord(data[self.SrcImage.PageSize])
oob_ecc1 = ord(data[self.SrcImage.PageSize+1])
oob_ecc2 = ord(data[self.SrcImage.PageSize+2])
oob_ecc0 = data[self.SrcImage.PageSize]
oob_ecc1 = data[self.SrcImage.PageSize+1]
oob_ecc2 = data[self.SrcImage.PageSize+2]

if (oob_ecc0 == 0xff and oob_ecc1 == 0xff and oob_ecc2 == 0xff) or (oob_ecc0 == 0x00 and oob_ecc1 == 0x00 and oob_ecc2 == 0x00):
continue
Expand Down