configs: Add --semi-path option to baremetal.py
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 15 Apr 2020 07:54:26 +0000 (08:54 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 21 Apr 2020 15:34:01 +0000 (15:34 +0000)
This is to make it possible to configure the semihosting
root directory via commandline.

Change-Id: If5167abc19eb8d78db37ebc854c336fe778a8a6f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27951
Tested-by: kokoro <noreply+kokoro@google.com>
configs/example/arm/baremetal.py

index 87e89528417088efc8664f70dae6ed35b36cfa84..36928ec9081e9f3e536599d48af55169c8de5b68 100644 (file)
@@ -110,6 +110,7 @@ def create(args):
             stdin=args.semi_stdin,
             stdout=args.semi_stdout,
             stderr=args.semi_stderr,
+            files_root_dir=args.semi_path,
             cmd_line = " ".join([ args.kernel ] + args.args)
         )
 
@@ -223,6 +224,10 @@ def main():
     parser.add_argument("--semi-stderr", type=str, default="stderr",
                         help="Standard error for semihosting " \
                         "(default: gem5's stderr)")
+    parser.add_argument('--semi-path', type=str,
+                        default="",
+                        help=('Search path for files to be loaded through '
+                              'Arm Semihosting'))
     parser.add_argument("args", default=[], nargs="*",
                         help="Semihosting arguments to pass to benchmark")
     parser.add_argument("-P", "--param", action="append", default=[],