fix a bug of dfuse.py
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2011-04-10 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* tool/dfuse.py (DFU_STM32.verify): data can be less than 1KiB.
|
||||
|
||||
2011-02-24 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/usb_prop.c (gnuk_device_SetInterface): Fix argument to
|
||||
|
||||
@@ -282,8 +282,8 @@ class DFU_STM32:
|
||||
while addr < end_addr:
|
||||
block = self.dfuse_read_memory()
|
||||
j = 0
|
||||
for d in block:
|
||||
if d != (ord(data[i*1024+j])&0xff):
|
||||
for c in data[i*1024:i*1024+1024]
|
||||
if (ord(c)&0xff) != block[j]:
|
||||
raise ValueError, "verify failed at %08x" % (addr + i*1024+j)
|
||||
j += 1
|
||||
if i & 0x03 == 0x03:
|
||||
|
||||
Reference in New Issue
Block a user