Firmwares/hello-world/Makefile

23 lines
465 B
Makefile
Raw Normal View History

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)
2023-11-27 10:13:22 +01:00
OPT ?= -O2
CFLAGS += $(OPT) -g
2018-09-25 18:31:29 +02:00
2023-08-20 15:00:51 +02:00
BOARD=iss
LINK_TARGET=link
2023-11-27 10:13:22 +01:00
RISCV_ARCH:=rv32e
RISCV_ABI:=ilp32e
2023-08-20 15:00:51 +02:00
LDFLAGS += -g -Wl,--wrap=printf
2021-04-09 11:19:05 +02:00
2023-11-27 10:13:22 +01:00
compiler := $(shell which riscv64-unknown-elf-gcc)
2023-08-20 15:00:51 +02:00
TOOL_DIR=$(dir $(compiler))
2018-09-25 18:31:29 +02:00
2023-11-27 10:13:22 +01:00
TRIPLET=riscv64-unknown-elf
2023-08-20 15:00:51 +02:00
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