added further exit function, so the board restarts after reset
[pyfrprog.git] / pkernel / kernel.py
index e495a86b693f10d2a9557d15a57f1052898e5ca4..8bf955b377dd0ec822f430910f666829292d0684 100755 (executable)
@@ -56,18 +56,10 @@ def pkernWRITE(address, size, data):
        sendDWord(address)
        sendWord(size)
 
-       if (recvByte() != 0x04):
-               raise Exception
-       print "Received Metadata."
-
        # write binary stream of data
        for i in range(0, size):
                sendByte(data[i])
 
-       if (recvByte() != 0x08):
-               raise Exception
-       print "Received Data."
-
        if (recvByte() != 0x28):
                raise Exception
        print "Flashing done."
@@ -144,6 +136,9 @@ for seq in flashseqs:
        print "Flashing", len(seq.data), "bytes at address", hex(seq.address)
        pkernWRITE(seq.address, len(seq.data), seq.data)
 
-sendByte(0x99);
-
+"""
+sendByte(0x99) #exit and wait
 print "Reset your board now to run code from Flash"
+"""
+
+sendByte(0x97) #exit and restart