updates makefiles to work with bsp
This commit is contained in:
50
lwc/Makefile
50
lwc/Makefile
@@ -10,27 +10,45 @@ export REPO_HOME = ${PWD}
|
||||
|
||||
export ALG ?= ascon
|
||||
|
||||
#hash or aead
|
||||
export API ?= aead
|
||||
export ARCH ?= generic
|
||||
#generic, rv32 or rv64
|
||||
export ARCH ?= rv32
|
||||
#nist, rv32 or rv64m if imp is nist does not allow for ASCON_RVXX_TYPE
|
||||
export IMP ?= nist
|
||||
export ISE ?= xalu
|
||||
#rvxx requires a ACSCON_RVXX_TYPEX
|
||||
#export CONF ?= -DASCON_RV32_TYPE1 # -DASCON_RV32_TYPE1 or -DASCON_RV32_TYPE2 (with custom instrs)
|
||||
|
||||
export CONF ?=
|
||||
TARGET = ${ALG}_${API}_${IMP}
|
||||
ISA?=gc_zbb_zbkb_zbkx
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
C_SRCS = $(wildcard *.c)
|
||||
HEADERS = $(wildcard *.h)
|
||||
OPT ?= -O0
|
||||
CFLAGS += $(OPT) -g
|
||||
#CFLAGS += -DDRIVER_BYPASS_TEST
|
||||
CFLAGS += -DDRIVER_BYPASS_TIME #Time throws a trap somewhere
|
||||
|
||||
sw-build :
|
||||
@make --directory="${REPO_HOME}/src" build
|
||||
sw-run :
|
||||
@make --directory="${REPO_HOME}/src" run
|
||||
sw-scan :
|
||||
@make --directory="${REPO_HOME}/src" scan
|
||||
sw-clean :
|
||||
@make --directory="${REPO_HOME}/src" clean
|
||||
BOARD=iss
|
||||
LINK_TARGET=link
|
||||
RISCV_ARCH:=rv32$(ISA)
|
||||
ifeq ($(ISA),e)
|
||||
RISCV_ABI:=ilp32e
|
||||
else
|
||||
RISCV_ABI:=ilp32
|
||||
endif
|
||||
LDFLAGS += -g -Wl,--wrap=printf
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
compiler := $(shell which riscv64-unknown-elf-gcc)
|
||||
TOOL_DIR=$(dir $(compiler))
|
||||
|
||||
clean :
|
||||
@rm --force --recursive ${REPO_HOME}/build/*
|
||||
TRIPLET=riscv64-unknown-elf
|
||||
BSP_BASE = ../bare-metal-bsp
|
||||
|
||||
all: ${TARGET}.elf
|
||||
|
||||
include ${REPO_HOME}/src/Makefile
|
||||
CFLAGS += ${GCC_FLAGS}
|
||||
|
||||
include $(BSP_BASE)/env/common-gcc.mk
|
||||
|
||||
# =============================================================================
|
||||
|
Reference in New Issue
Block a user