From 7113c17100f2cfa317f8adf4aebfcea2c00d1e48 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 24 Aug 2017 16:17:54 +0200 Subject: [PATCH] run: update RISC-V run script support * fix build error for bbl upon intial build * set memory to 128 MB in spike * support 'forever' timeout issue #2423 --- tool/builddir/build.conf/run_opt_spike | 4 +++- tool/run/image/bbl | 2 +- tool/run/log/spike | 7 ++++++- tool/run/power_on/spike | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tool/builddir/build.conf/run_opt_spike b/tool/builddir/build.conf/run_opt_spike index ebff089e50..8911fd6e2c 100644 --- a/tool/builddir/build.conf/run_opt_spike +++ b/tool/builddir/build.conf/run_opt_spike @@ -3,5 +3,7 @@ ## Run tool configuration ## -RUN_OPT = --include image/bbl +RUN_OPT = --include image/bbl \ + --include power_on/spike \ + --include log/spike diff --git a/tool/run/image/bbl b/tool/run/image/bbl index 28d6104753..fe4e5a8c70 100644 --- a/tool/run/image/bbl +++ b/tool/run/image/bbl @@ -2,5 +2,5 @@ proc run_image {elf_img} { puts "using '$elf_img' as bbl image" exec rm -f bbl/image.o - exec make IMAGE_ELF=[pwd]/$elf_img bbl + exec -ignorestderr make IMAGE_ELF=[pwd]/$elf_img bbl } diff --git a/tool/run/log/spike b/tool/run/log/spike index 5275f61856..7b7b9c5d5d 100644 --- a/tool/run/log/spike +++ b/tool/run/log/spike @@ -7,10 +7,15 @@ proc run_log { wait_for_re timeout_value } { global spike_spawn_id global output_spawn_id - set timeout 210 set kernel_msg [run_boot_string] set output_spawn_id $spike_spawn_id + if {$wait_for_re == "forever"} { + set timeout -1 + } else { + set timeout $timeout_value + } + expect { -i $output_spawn_id $kernel_msg { } eof { diff --git a/tool/run/power_on/spike b/tool/run/power_on/spike index 536d583755..ea195ae56a 100644 --- a/tool/run/power_on/spike +++ b/tool/run/power_on/spike @@ -18,7 +18,7 @@ proc run_power_on { } { if {![is_spike_available]} { return 0 } - append spike_args " [run_dir]/image.elf " + append spike_args "-m128 [pwd]/debug/bbl " set spike "spike" eval spawn $spike $spike_args