2018-09-25 18:31:29 +02:00
|
|
|
|
2018-09-25 20:32:56 +02:00
|
|
|
TARGET = hello
|
|
|
|
C_SRCS = $(wildcard *.c)
|
2023-08-20 15:00:51 +02:00
|
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
CFLAGS += -O2 -g
|
2018-09-25 18:31:29 +02:00
|
|
|
|
2023-08-20 15:00:51 +02:00
|
|
|
BOARD=iss
|
|
|
|
LINK_TARGET=link
|
2020-06-18 12:32:41 +02:00
|
|
|
RISCV_ARCH:=rv32i
|
|
|
|
RISCV_ABI:=ilp32
|
2023-08-20 15:00:51 +02:00
|
|
|
LDFLAGS += -g -Wl,--wrap=printf
|
2021-04-09 11:19:05 +02:00
|
|
|
|
2023-08-20 15:00:51 +02:00
|
|
|
compiler := $(shell which riscv32-unknown-elf-gcc)
|
|
|
|
TOOL_DIR=$(dir $(compiler))
|
2018-09-25 18:31:29 +02:00
|
|
|
|
2023-08-20 15:00:51 +02:00
|
|
|
TRIPLET=riscv32-unknown-elf
|
|
|
|
BSP_BASE = ../bare-metal-bsp
|
|
|
|
include $(BSP_BASE)/env/common-gcc.mk
|
2021-04-09 11:19:05 +02:00
|
|
|
|
2023-08-20 15:00:51 +02:00
|
|
|
$(TARGET).vlog:$(TARGET)
|
|
|
|
riscv32-unknown-elf-objcopy -O verilog $(TARGET) $(TARGET).vlog
|