diff --git a/tools/flash2.py b/tools/flash2.py index 8264640c017e59e9a4038cf4f090dfd695cc96d5..a9f8f694fa9ae82fae9912508a093577ca8da4d9 100755 --- a/tools/flash2.py +++ b/tools/flash2.py @@ -24,6 +24,7 @@ args = parser.parse_args() f_r1 = args.file_R1 f_r2 = args.file_R2 f_out = args.output_file +f_opt = args.flash2_options paths = os.path.split(f_out) path_head = paths[0] @@ -33,16 +34,21 @@ print( "###" ) print( "f_r1: %s" % f_r1) print( "f_r2: %s" % f_r2) print( "f_out: %s" % f_out) +print( "flash2 options: %s" % f_opt) print( "path_head: %s" % path_head) print( "path_file: %s" % path_file) -exit_code = subprocess.call(['%s/flash2' % args.flash2_dir, + +cmd = ['%s/flash2' % args.flash2_dir, f_r1, f_r2, "-d", path_head, "-o", path_file, "-t", "1", - # + shlex.split(args.flash2_options) -]) +] +cmd += shlex.split( f_opt ) +print( "# %s" % cmd ) + +exit_code = subprocess.call( cmd ) if exit_code > 0: raise EnvironmentError("Flash2 failed")