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)
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():
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