From b9fee154b7467b52b9c17f3f4d98c7a9b26e82ea Mon Sep 17 00:00:00 2001 From: theStack Date: Sun, 13 Dec 2009 08:08:53 +0100 Subject: [PATCH] flashing will be done now in a simple loop --- frprog.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frprog.py b/frprog.py index f6a7418..cc25005 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,14 @@ print "OK, trying to set baudrate..." cmdBAUDRATE(REAL_BAUDRATE) 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) +sys.exit(0) + +# some tests here....... """ # execute (existing) program in ram cmdCALL(0x00033ffc) -- 2.25.1