X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=frprog.py;h=8afad3f01e1f4ecb9dbe0181bd41afcc76dd6205;hb=8c5456a034353e922d4afe23b737973e825de4b6;hp=f6a741846fe4bcd2798e1225edae2a4abd61eca2;hpb=254be031fd624c96ae36205a2bf33d2a45e5f781;p=pyfrprog.git diff --git a/frprog.py b/frprog.py index f6a7418..8afad3f 100755 --- a/frprog.py +++ b/frprog.py @@ -118,6 +118,7 @@ class FlashSequence(object): self.address = address self.data = data +# list of all our address/data pairs to flash flashseqs = [] # check command line arguments @@ -164,6 +165,7 @@ print "The following flash sequences have been read in:" for seq in flashseqs: print hex(seq.address) + ":", seq.data + print "Initializing serial port..." tty = SerialPort(DEVICE, 100, INIT_BAUDRATE) @@ -184,7 +186,18 @@ print "OK, trying to set baudrate..." cmdBAUDRATE(REAL_BAUDRATE) tty = SerialPort(DEVICE, 100, REAL_BAUDRATE) +# let the fun begin! +for seq in flashseqs: + 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) + +# some tests here....... """ # execute (existing) program in ram cmdCALL(0x00033ffc) @@ -262,7 +275,7 @@ print "Received Checksum:", last_checksum print """ - +""" # write some data in the iram and try to execute it data_wr =[ 0x9B,0x00, @@ -286,3 +299,4 @@ cmdWRITE(0x00030000, len(data_wr), data_wr) print "Received Checksum:", last_checksum print cmdCALL(0x00030000) +"""