Firmwares/hello-world/Makefile

23 lines
639 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)
#HEADERS = $(wildcard *.h)
2021-04-09 11:19:05 +02:00
CFLAGS += -g
2018-09-25 18:31:29 +02:00
BOARD=freedom-e300-hifive1
2018-09-26 08:07:48 +02:00
LINK_TARGET=flash
2020-06-18 12:32:41 +02:00
RISCV_ARCH:=rv32i
RISCV_ABI:=ilp32
2021-04-09 11:19:05 +02:00
LDFLAGS := -Wl,--wrap=scanf -Wl,--wrap=printf -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -g
#TOOL_DIR?=/opt/shared/riscv/FreedomStudio/20180122/SiFive/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin
TOOL_DIR=/opt/shared/riscv/tools/Ubuntu/riscv64-unknown-elf-gcc-8.3.0-2020.04.1-x86_64-linux-ubuntu14/bin
2018-09-25 18:31:29 +02:00
BSP_BASE = ./bsp
include $(BSP_BASE)/env/common.mk
2021-04-09 11:19:05 +02:00
.PHONY: all
all: $(TARGET).dump
$(TARGET).dump: $(TARGET)
$(TOOL_DIR)/$(TRIPLET)-objdump -d -S -C $< > $@