actually we have to write it in IRAM, thus we have to skip addresses for
authorBernhard Urban <lewurm@gmx.net>
Sun, 13 Dec 2009 07:28:39 +0000 (08:28 +0100)
committerBernhard Urban <lewurm@gmx.net>
Sun, 13 Dec 2009 07:28:39 +0000 (08:28 +0100)
section >= 0x148000 and also have to calculate a other writeaddress as
given in the mhx file. however, we need those addresses later for the
real flashing part (through pkernel)

frprog.py

index cc250050eebeb2af08cab80ad151c12712badda8..8afad3f01e1f4ecb9dbe0181bd41afcc76dd6205 100755 (executable)
--- a/frprog.py
+++ b/frprog.py
@@ -188,8 +188,12 @@ 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 >= 0x148000):
+               continue
+       print "RAMing", len(seq.data), "bytes at address", hex(seq.address)
+       cmdWRITE(seq.address - flashseqs[0].address + 0x30000, len(seq.data), seq.data)
+
+cmdCALL(0x30000);
 sys.exit(0)
 
 
@@ -271,7 +275,7 @@ print "Received Checksum:", last_checksum
 print
 """
 
-
+"""
 # write some data in the iram and try to execute it
 data_wr =[
                0x9B,0x00,
@@ -295,3 +299,4 @@ cmdWRITE(0x00030000, len(data_wr), data_wr)
 print "Received Checksum:", last_checksum
 print
 cmdCALL(0x00030000)
+"""