]> defiant.homedns.org Git - pyshared.git/commitdiff
Bootloader fixes
authorErik Andresen <erik@vontaene.de>
Sun, 5 Nov 2017 20:06:32 +0000 (21:06 +0100)
committerErik Andresen <erik@vontaene.de>
Sun, 5 Nov 2017 20:06:32 +0000 (21:06 +0100)
bootloader.py

index 298a13e7227fed1c818d7f8fd3da0d69c2dd87d3..a23828710b81a6a9c650ac28d7533a40c8bbc735 100755 (executable)
@@ -92,7 +92,6 @@ class bootloader:
                                self.boot_addr = int(data.encode("hex"), 16)
                        elif typ == 1: # End of File Record
                                print "Addr (rest) 0x%x" % buf_addr
-                               buf_addr+=self.pagesize
                                diff = self.pagesize-len(buf)
                                buf+=chr(0xff)*diff # fill with 0xff
                                handle(buf_addr, buf[:self.pagesize])
@@ -133,8 +132,6 @@ class bootloader:
                t1 = time()
                self.compare(filename)
                print "Time: %.1fs" % (time() - t1)
-               print "Jump:"
-               self.jump(self.boot_addr)
 
        def write(self, s):
                dev = i2c(self.i2c_addr)
@@ -193,6 +190,5 @@ if __name__ == "__main__":
                if len(args) > 1:
                        loader.load(args[1])
                if options.bJump:
-                       print "Jump:"
+                       print "Jump to Program"
                        loader.jump(0x0)
-