aboutsummaryrefslogtreecommitdiff
path: root/hw/rx/rx-gdbsim.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/rx/rx-gdbsim.c')
-rw-r--r--hw/rx/rx-gdbsim.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 285549c79b..b1d7c2488f 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -106,6 +106,16 @@ static void rx_gdbsim_init(MachineState *machine)
rxc->xtal_freq_hz, &error_abort);
object_property_set_bool(OBJECT(&s->mcu), "load-kernel",
kernel_filename != NULL, &error_abort);
+
+ if (!kernel_filename) {
+ if (machine->firmware) {
+ rom_add_file_fixed(machine->firmware, RX62N_CFLASH_BASE, 0);
+ } else if (!qtest_enabled()) {
+ error_report("No bios or kernel specified");
+ exit(1);
+ }
+ }
+
qdev_realize(DEVICE(&s->mcu), NULL, &error_abort);
/* Load kernel and dtb */