mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
tools/flterm.py: cleanup kernel-adr argument parsing
This commit is contained in:
parent
d8fd4fe725
commit
a9d40e790c
1 changed files with 2 additions and 2 deletions
|
@ -286,12 +286,12 @@ def _get_args():
|
||||||
parser.add_argument("--port", default="2", help="serial port")
|
parser.add_argument("--port", default="2", help="serial port")
|
||||||
parser.add_argument("--speed", default=115200, help="serial baudrate")
|
parser.add_argument("--speed", default=115200, help="serial baudrate")
|
||||||
parser.add_argument("--kernel", default=None, help="kernel image")
|
parser.add_argument("--kernel", default=None, help="kernel image")
|
||||||
parser.add_argument("--kernel-adr", default="0x40000000", help="kernel address")
|
parser.add_argument("--kernel-adr", type=lambda a: int(a, 16), default=0x40000000, help="kernel address")
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = _get_args()
|
args = _get_args()
|
||||||
flterm = Flterm(args.kernel, int(args.kernel_adr, 16))
|
flterm = Flterm(args.kernel, args.kernel_adr)
|
||||||
flterm.open(args.port, args.speed)
|
flterm.open(args.port, args.speed)
|
||||||
flterm.start()
|
flterm.start()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue