Check in compiled debug ROM.
[riscv-isa-sim.git] / debug_rom / Makefile
index a6da5a82db6b4327d9ea658cacfb0304ad55aae9..17cc95e320ae319e1f46d5a29e1f5568dbc32b19 100644 (file)
@@ -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