Firmwares/riscv-bldc-forced-commutation/Makefile

27 lines
806 B
Makefile
Raw Permalink Normal View History

2018-09-25 18:31:29 +02:00
TARGET = riscv-bldc
C_SRCS = $(wildcard src/*.c) $(BSP_BASE)/drivers/fe300prci/fe300prci_driver.c $(BSP_BASE)/drivers/plic/plic_driver.c
CXX_SRCS = $(wildcard src/*.cpp)
HEADERS = $(wildcard src/*.h)
2018-09-25 20:32:56 +02:00
CFLAGS = -g -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -DNO_INIT -I./src
2018-09-25 18:31:29 +02:00
CXXFLAGS = -fno-use-cxa-atexit
LDFLAGS = -Wl,--wrap=printf
LDFLAGS += -g -lstdc++ -fno-use-cxa-atexit -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=medany
2018-09-25 18:31:29 +02:00
BOARD=freedom-e300-hifive1
LINK_TARGET=flash
RISCV_ARCH=rv32imac
RISCV_ABI=ilp32
TOOL_DIR?=/opt/riscv/FreedomStudio/20180122/SiFive/riscv64-unknown-elf-gcc-20171231-x86_64-linux-centos6/bin
BSP_BASE = ./bsp
include $(BSP_BASE)/env/common.mk
.PHONY: all
all: $(TARGET).dump
$(TARGET).dump: $(TARGET)
$(TOOL_DIR)/$(TRIPLET)-objdump -d -S -C $< > $@