File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1+ """API for cross platform flashing"""
2+
3+ __version__ = "1.0.2"
Original file line number Diff line number Diff line change 1212import serial
1313from tqdm import tqdm
1414
15+ from . import __version__
16+
1517FLASH_WRITER_FILE_DEFAULT = "Flash_Writer_SCIF_rzboard.mot"
1618BL2_FILE_DEFAULT = "bl2_bp-rzboard.srec"
1719FIP_FILE_DEFAULT = "fip-rzboard.srec"
@@ -60,7 +62,7 @@ def __init__(self):
6062 self .write_system_image ()
6163 else :
6264 argparser .error (
63- "Please specify which image(s) to flash.\n \n Examples :\n \t "
65+ f "Please specify which image(s) to flash.\n \n v { __version__ } Examples :\n \t "
6466 "\n \t Using default path of files in flash_rzboard.py dir\n \t "
6567 "./flash_util.py --bootloader\n \t "
6668 "./flash_util.py --bootloader --qspi\n \t "
@@ -213,9 +215,14 @@ def argparse_and_override_defaults(self):
213215 help = "Flash to QSPI (default is eMMC)." ,
214216 )
215217
218+ # Debug / help
216219 argparser .add_argument (
217220 "--debug" , action = "store_true" , help = "Enable debug output (buffer printing)"
218221 )
222+ argparser .add_argument (
223+ "--version" , "-v" , action = "version" ,
224+ help = "Show version." , version = f"%(prog)s { __version__ } ,"
225+ )
219226
220227 self .__args = argparser .parse_args ()
221228 self .handle_path_overrides ()
You can’t perform that action at this time.
0 commit comments