flash-arty: Support hex values for address
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 4 Jun 2020 13:13:45 +0000 (23:13 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 4 Jun 2020 13:13:45 +0000 (23:13 +1000)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
openocd/flash-arty

index 97193c7460f3ebb9bb636a161b48b7c07f5c41f6..14c91866b67165d3bffb9bb72caf7367cd815805 100755 (executable)
@@ -21,7 +21,7 @@ def flash(config, flash_proxy, address, data, set_qe=False):
 
 parser = argparse.ArgumentParser()
 parser.add_argument("file", help="file to write to flash")
-parser.add_argument("-a", "--address", help="offset in flash", type=int, default=0)
+parser.add_argument("-a", "--address", help="offset in flash", type=lambda x: int(x,0), default=0)
 parser.add_argument("-f", "--fpga", help="a35 or a100", default="a35")
 args = parser.parse_args()