X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2Fgoodfet.spiflash;h=1005617271bd67837b8700c2ce552a6bfdcff9ab;hp=c47c4dc22679022e9fa7ad2ff9fa2c0e13aab758;hb=e3e1bb605963def746b50f62277180e567d3b615;hpb=fa7c4f1b34ed53c88a678f947eb4b34c6e9807b4 diff --git a/client/goodfet.spiflash b/client/goodfet.spiflash index c47c4dc..1005617 100755 --- a/client/goodfet.spiflash +++ b/client/goodfet.spiflash @@ -10,7 +10,7 @@ import sys; import binascii; import array; -from GoodFET import GoodFETSPIFlash; +from GoodFETSPI import GoodFETSPIFlash; from intelhex import IntelHex; if(len(sys.argv)==1): @@ -126,13 +126,14 @@ if(sys.argv[1]=="flash"): i=start; chars=list(file.read()); + + #N.B., chunksize must be an even fraction of 0x100. chunksize=0x80; while i<=stop: bytes=range(0,chunksize); for j in range(0,chunksize): bytes[j]=ord(chars[i+j]); - #client.SPIpokebyte(i,ord(chars[i])); client.SPIpokebytes(i,bytes); i+=chunksize;