mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
18 lines
625 B
Makefile
18 lines
625 B
Makefile
# Target architecture for the build.
|
|
TARGET_ARCH ?= riscv-none-embed
|
|
|
|
# define build specific options
|
|
CFLAGS_CPU = -march=rv32imac -mabi=ilp32 -mcmodel=medlow -msmall-data-limit=8
|
|
CFLAGS_LINK = -nostartfiles -ffunction-sections -fdata-sections
|
|
CFLAGS_DBG ?= -g3
|
|
CFLAGS_OPT ?= -Os
|
|
|
|
LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
|
|
LINKER_SCRIPT ?= $(CPU_MODEL).ld
|
|
LINKFLAGS += -T$(LINKER_SCRIPT)
|
|
|
|
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) $(CFLAGS_LINK)
|
|
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
|
|
# export linker flags
|
|
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
|