From 8c5456a034353e922d4afe23b737973e825de4b6 Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Sun, 13 Dec 2009 08:28:39 +0100 Subject: [PATCH] actually we have to write it in IRAM, thus we have to skip addresses for 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 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frprog.py b/frprog.py index cc25005..8afad3f 100755 --- 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) +""" -- 2.25.1