From: Florent Kermarrec Date: Tue, 17 Nov 2015 14:43:10 +0000 (+0100) Subject: soc/tools/remote/server: add --debug parameter X-Git-Tag: 24jan2021_ls180~2048 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8056653004916b4cea4a7f22b9d814a45d0ee2fe;p=litex.git soc/tools/remote/server: add --debug parameter --- 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