aboutsummaryrefslogtreecommitdiff
path: root/debug_rom
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-04-22 15:11:26 -0700
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:10 -0700
commitddc061f0fb3c08e172818891aad9247fd0fb2da9 (patch)
tree784b95cf0071fe3c6675a83c2f434bfebbf38263 /debug_rom
parentd20be46eb4ffb94a9e7b2916dbc59a3666f21877 (diff)
downloadspike-ddc061f0fb3c08e172818891aad9247fd0fb2da9.zip
spike-ddc061f0fb3c08e172818891aad9247fd0fb2da9.tar.gz
spike-ddc061f0fb3c08e172818891aad9247fd0fb2da9.tar.bz2
Check in compiled debug ROM.
Not everybody will have a cross-compiled toolchain set up when they build spike.
Diffstat (limited to 'debug_rom')
-rw-r--r--debug_rom/Makefile9
-rw-r--r--debug_rom/debug_rom.c18
2 files changed, 24 insertions, 3 deletions
diff --git a/debug_rom/Makefile b/debug_rom/Makefile
index a6da5a8..17cc95e 100644
--- a/debug_rom/Makefile
+++ b/debug_rom/Makefile
@@ -7,11 +7,14 @@ OBJCOPY = $(RISCV)/bin/riscv64-unknown-elf-objcopy
%.o: %.S
$(CC) -c $<
-debug_rom: debug_rom.o
- $(CC) -nostdlib -nostartfiles -Tlink.ld -o $@ $^
+debug_rom.c: debug_rom.raw
+ xxd -i $^ > $@
debug_rom.raw: debug_rom
$(OBJCOPY) -O binary --only-section .text debug_rom debug_rom.raw
+debug_rom: debug_rom.o
+ $(CC) -nostdlib -nostartfiles -Tlink.ld -o $@ $^
+
clean:
- rm -f debug_rom debug_rom.o debug_rom.raw
+ rm -f debug_rom debug_rom.o debug_rom.raw debug_rom.c
diff --git a/debug_rom/debug_rom.c b/debug_rom/debug_rom.c
new file mode 100644
index 0000000..9d67df5
--- /dev/null
+++ b/debug_rom/debug_rom.c
@@ -0,0 +1,18 @@
+unsigned char debug_rom_raw[] = {
+ 0x6f, 0x00, 0x40, 0x05, 0xf3, 0x24, 0x00, 0xf1, 0x23, 0x24, 0x90, 0x10,
+ 0xf3, 0x24, 0x00, 0x79, 0x93, 0xf4, 0x04, 0x40, 0x63, 0x94, 0x04, 0x08,
+ 0xf3, 0x24, 0x00, 0xf0, 0x63, 0xc6, 0x04, 0x00, 0x83, 0x24, 0xc0, 0x43,
+ 0x6f, 0x00, 0x80, 0x01, 0x93, 0x94, 0x14, 0x00, 0x63, 0xc6, 0x04, 0x00,
+ 0x83, 0x34, 0x80, 0x43, 0x6f, 0x00, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,
+ 0x73, 0x24, 0x00, 0x79, 0x13, 0x74, 0x84, 0x00, 0x63, 0x04, 0x04, 0x00,
+ 0x6f, 0x00, 0x40, 0x05, 0x73, 0x24, 0x20, 0x79, 0x73, 0x00, 0x00, 0x10,
+ 0x73, 0x10, 0x24, 0x79, 0x73, 0x24, 0x00, 0x79, 0x13, 0x74, 0x74, 0x00,
+ 0x13, 0x04, 0xd4, 0xff, 0x63, 0x16, 0x04, 0x02, 0x73, 0x24, 0x00, 0xf0,
+ 0x63, 0x46, 0x04, 0x00, 0x23, 0x2e, 0x90, 0x42, 0x67, 0x00, 0x00, 0x40,
+ 0x13, 0x14, 0x14, 0x00, 0x63, 0x46, 0x04, 0x00, 0x23, 0x3c, 0x90, 0x42,
+ 0x67, 0x00, 0x00, 0x40, 0x13, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x40,
+ 0x73, 0x24, 0x00, 0xf1, 0x23, 0x20, 0x80, 0x10, 0x73, 0xe0, 0x01, 0x79,
+ 0x73, 0x24, 0x00, 0x79, 0x13, 0x74, 0x04, 0x40, 0xe3, 0x0c, 0x04, 0xfe,
+ 0x6f, 0xf0, 0x1f, 0xfc
+};
+unsigned int debug_rom_raw_len = 172;