Firmwares/hello-world/Makefile

23 lines
465 B
Makefile

TARGET = hello
C_SRCS = $(wildcard *.c)
HEADERS = $(wildcard *.h)
OPT ?= -O2
CFLAGS += $(OPT) -g
BOARD=iss
LINK_TARGET=link
RISCV_ARCH:=rv32e
RISCV_ABI:=ilp32e
LDFLAGS += -g -Wl,--wrap=printf
compiler := $(shell which riscv64-unknown-elf-gcc)
TOOL_DIR=$(dir $(compiler))
TRIPLET=riscv64-unknown-elf
BSP_BASE = ../bare-metal-bsp
include $(BSP_BASE)/env/common-gcc.mk
$(TARGET).vlog:$(TARGET)
riscv32-unknown-elf-objcopy -O verilog $(TARGET) $(TARGET).vlog