X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=pyfrprog.git;a=blobdiff_plain;f=frprog.py;h=da4f399dcdbdc179a4d63b50f984e77bd0962768;hp=cc250050eebeb2af08cab80ad151c12712badda8;hb=681cf4a0c4e1c888b23ef56cec098b7e0bb3c4df;hpb=b9fee154b7467b52b9c17f3f4d98c7a9b26e82ea diff --git a/frprog.py b/frprog.py index cc25005..da4f399 100755 --- a/frprog.py +++ b/frprog.py @@ -15,7 +15,6 @@ last_checksum = 0 def sendByte(byte): time.sleep(0.001) # just to get sure, wait 1ms tty.write(chr(byte)) - tty.flush() def sendWord(word): sendByte(word & 0xFF) @@ -188,8 +187,15 @@ tty = SerialPort(DEVICE, 100, REAL_BAUDRATE) # let the fun begin! for seq in flashseqs: - print "Flashing", len(seq.data), "bytes at address", hex(seq.address) - cmdWRITE(seq.address, len(seq.data), seq.data) + if(seq.address <= 0x40000): + addr = seq.address + else: + continue + print "RAMing", len(seq.data), "bytes at address", hex(addr) + cmdWRITE(addr, len(seq.data), seq.data) + tty.flush() + +cmdCALL(0x30000); sys.exit(0) @@ -271,7 +277,7 @@ print "Received Checksum:", last_checksum print """ - +""" # write some data in the iram and try to execute it data_wr =[ 0x9B,0x00, @@ -295,3 +301,4 @@ cmdWRITE(0x00030000, len(data_wr), data_wr) print "Received Checksum:", last_checksum print cmdCALL(0x00030000) +"""