1 # Recursive make is bad, but in this case we're cross compiling which is a
2 # pretty unusual use case.
4 CC
= $(RISCV
)/bin
/riscv64-unknown-elf-gcc
5 OBJCOPY
= $(RISCV
)/bin
/riscv64-unknown-elf-objcopy
10 debug_rom
: debug_rom.o
11 $(CC
) -nostdlib
-nostartfiles
-Tlink.
ld -o
$@
$^
13 debug_rom.raw
: debug_rom
14 $(OBJCOPY
) -O binary
--only-section .text debug_rom debug_rom.raw
17 rm -f debug_rom debug_rom.o debug_rom.raw