Linker warnings usually means something does not get placed where it is supposed to and the most likely result is a broken binary. Linker warnings should be treated as serious problems with the program and should be solved before the program is tested on actual hardware.
29 lines
1.3 KiB
Makefile
29 lines
1.3 KiB
Makefile
# Target triple for the build. Use arm-none-eabi if you are unsure.
|
|
export TARGET_TRIPLE ?= arm-none-eabi
|
|
|
|
# Toolchain prefix, defaults to target triple followed by a dash, you will most likely not need to touch this.
|
|
export PREFIX ?= $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)
|
|
|
|
# we build all cortex boards with the GNU toolchain
|
|
include $(RIOTBOARD)/Makefile.include.gnu
|
|
|
|
# define build specific options
|
|
export CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb -mno-thumb-interwork $(CFLAGS_FPU)
|
|
export CFLAGS_STYLE = -std=gnu99 -Wall -Wstrict-prototypes
|
|
export CFLAGS_LINK = -ffunction-sections -fdata-sections -fno-builtin
|
|
export CFLAGS_DBG = -ggdb -g3
|
|
export CFLAGS_OPT ?= -Os
|
|
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_STYLE) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
|
|
|
|
export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DEBUG)
|
|
export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL).ld -Wl,--fatal-warnings
|
|
export LINKFLAGS += $(CFLAGS_DEBUG) $(CFLAGS_CPU) $(CFLAGS_STYLE) -static -lgcc -nostartfiles
|
|
|
|
# use the nano-specs of the NewLib when available
|
|
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
|
export LINKFLAGS += -specs=nano.specs -lc -lnosys
|
|
endif
|
|
|
|
# export board specific includes to the global includes-listing
|
|
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
|