X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=frprog.py;h=b7371c1cfa226c6d2b14877d936a7fa32a3438fe;hb=3d2bcfa368af1ffb347209c34a433df16554dde7;hp=f6a741846fe4bcd2798e1225edae2a4abd61eca2;hpb=254be031fd624c96ae36205a2bf33d2a45e5f781;p=pyfrprog.git diff --git a/frprog.py b/frprog.py index f6a7418..b7371c1 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,20 @@ 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 <= 0x40000): + addr = seq.address + else: + continue + print "RAMing", len(seq.data), "bytes at address", hex(addr) + cmdWRITE(addr, len(seq.data), seq.data) + +cmdCALL(0x30000); +sys.exit(0) + +# some tests here....... """ # execute (existing) program in ram cmdCALL(0x00033ffc) @@ -262,7 +277,7 @@ print "Received Checksum:", last_checksum print """ - +""" # write some data in the iram and try to execute it data_wr =[ 0x9B,0x00, @@ -286,3 +301,4 @@ cmdWRITE(0x00030000, len(data_wr), data_wr) print "Received Checksum:", last_checksum print cmdCALL(0x00030000) +"""