aboutsummaryrefslogtreecommitdiff
path: root/debug_rom/Makefile
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/Makefile
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/Makefile')
-rw-r--r--debug_rom/Makefile9
1 files changed, 6 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