made riscv init more sane

This commit is contained in:
Bryan McShea
2024-01-24 17:42:08 -05:00
parent 461269ed32
commit 86fda4d6fc
7 changed files with 95 additions and 55 deletions

View File

@@ -38,12 +38,12 @@ fn run_qemu(target: &Target, gdb: Option<Option<u16>>) {
let handle = std::thread::spawn(move || {
qemu.stdin(Stdio::null());
qemu.stdout(Stdio::null());
let exit_status = qemu.status().unwrap();
qemu.status().unwrap();
});
gdb.status().unwrap();
handle.join().unwrap();
} else {
let exit_status = qemu.status().unwrap();
qemu.status().unwrap();
// process::exit(exit_status.code().unwrap_or(-1));
}
}

View File

@@ -40,8 +40,9 @@ impl Target {
let mut cmd = Command::new("qemu-system-riscv64");
cmd.arg("-nographic");
cmd.arg("-semihosting");
cmd.args(["-machine", "sifive_u"]);
cmd.args(["-machine", "virt"]);
cmd.args(["-bios", "none"]);
cmd.args(["-smp", "4"]);
cmd.args(["-kernel", &self.qemu_bin_path()]);
cmd
}