From 8056653004916b4cea4a7f22b9d814a45d0ee2fe Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 17 Nov 2015 15:43:10 +0100 Subject: [PATCH] soc/tools/remote/server: add --debug parameter --- litex/soc/tools/remote/comm_uart.py | 2 +- litex/soc/tools/remote/server.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/litex/soc/tools/remote/comm_uart.py b/litex/soc/tools/remote/comm_uart.py index 0f20dd16..0f7987d1 100644 --- a/litex/soc/tools/remote/comm_uart.py +++ b/litex/soc/tools/remote/comm_uart.py @@ -45,7 +45,7 @@ class CommUART: for i in range(length_int): value = int.from_bytes(self._read(4), "big") if self.debug: - print("read {:08x} @ {:08x}".format(data, addr + 4*i)) + print("read {:08x} @ {:08x}".format(value, addr + 4*i)) if length is None: return value data.append(value) diff --git a/litex/soc/tools/remote/server.py b/litex/soc/tools/remote/server.py index 8b6e304c..dff47710 100644 --- a/litex/soc/tools/remote/server.py +++ b/litex/soc/tools/remote/server.py @@ -73,6 +73,7 @@ def _get_args(): parser.add_argument("--comm", default="uart", help="comm interface") parser.add_argument("--port", default="2", help="UART port") parser.add_argument("--baudrate", default=115200, help="UART baudrate") + parser.add_argument("--debug", action="store_true", help="enable debug") return parser.parse_args() def main(): @@ -83,7 +84,7 @@ def main(): print("Using CommUART, port: {} / baudrate: {}".format(args.port, args.baudrate)) comm = CommUART(args.port if not args.port.isdigit() else int(args.port), args.baudrate, - debug=False) + debug=args.debug) else: raise NotImplementedError -- 2.30.2