projects
/
pyfrprog.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added further exit function, so the board restarts after reset
[pyfrprog.git]
/
pkernel
/
kernel.py
diff --git
a/pkernel/kernel.py
b/pkernel/kernel.py
index e495a86b693f10d2a9557d15a57f1052898e5ca4..8bf955b377dd0ec822f430910f666829292d0684 100755
(executable)
--- a/
pkernel/kernel.py
+++ b/
pkernel/kernel.py
@@
-56,18
+56,10
@@
def pkernWRITE(address, size, data):
sendDWord(address)
sendWord(size)
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])
# 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."
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)
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"
print "Reset your board now to run code from Flash"
+"""
+
+sendByte(0x97) #exit and restart