URL
https://opencores.org/ocsvn/usb_dongle_fpga/usb_dongle_fpga/trunk
Subversion Repositories usb_dongle_fpga
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 43 to Rev 44
- ↔ Reverse comparison
Rev 43 → Rev 44
/trunk/sw/dongle.py
40,6 → 40,8
# 14 Nov. 2007 Improved help. |
# 10 Mar. 2008 Forced code to hw flow control settings made linux 1 byte read to 2 bytes |
# as dongle never reads 1 byte at the time |
# 18 Apr. 2008 Added file size boundary check on write to see if remaining size from |
# given offset fits the file size |
#------------------------------------------------------------------------- |
|
import os |
438,7 → 440,7
|
#### global funcs #### |
def usage(s): |
print "Artec USB Dongle programming utility ver. 2.51" |
print "Artec USB Dongle programming utility ver. 2.52" |
print "Usage:" |
print "Write file : ",s," [-vq] -c <name> <file> <offset>" |
print "Readback file : ",s," [-vq] -c <name> [-vq] -r <offset> <length> <file>" |
945,7 → 947,7
wordSize = (size+ (size&1))>> 1 # round byte count up and make word address |
endBlock = don.get_block_no(mode.address+wordSize - 1) |
startBlock = don.get_block_no(mode.address) |
if endBlock > 32: |
if endBlock >= 32: |
print "Given file does not fit into remaining space. File size is %i KB"%(size/1024) |
print "Space left from given offset is %i KB"%((4*1024*1024-mode.address*2)/1024) |
sys.exit() |