soc/tools/remoter/server: fix exit on KeyboardInterrupt
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 17 Nov 2015 14:31:23 +0000 (15:31 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 17 Nov 2015 14:31:23 +0000 (15:31 +0100)
litex/soc/tools/remote/comm_uart.py
litex/soc/tools/remote/server.py

index 06dea93dd1128a6848f1372bce1056b591090961..0f20dd16028dc4f75151e0623a3ca4578dba0c5e 100644 (file)
@@ -56,7 +56,7 @@ class CommUART:
         length = len(data)
         self._write([self.msg_type["write"], length])
         self._write(list((addr//4).to_bytes(4, byteorder="big")))
-        for i, value in enumerate(range(data)):
+        for i, value in enumerate(data):
             self._write(list(value.to_bytes(4, byteorder="big")))
             if self.debug:
                 print("write {:08x} @ {:08x}".format(value, addr + 4*i))
index f8058686e112eb04be6de0cca1fbc501ecde36e1..8b6e304ce87a3d768b2b17ff073256a46660731e 100644 (file)
@@ -67,10 +67,6 @@ class RemoteServer(EtherboneIPC):
         self.serve_thread.setDaemon(True)
         self.serve_thread.start()
 
-    def join(self, writer_only=False):
-        if not hasattr(self, "serve_thread"):
-            return
-        self.serve_thread.join()
 
 def _get_args():
     parser = argparse.ArgumentParser()
@@ -95,8 +91,9 @@ def main():
     server.open()
     server.start()
     try:
-        server.join(True)
-    except KeyboardInterrupt: # FIXME
+        import time
+        while True: time.sleep(100)
+    except KeyboardInterrupt:
         pass
 
 if __name__ == "__main__":