board: samr21-xpro: adapt to common board Makefile
This commit is contained in:
parent
4a5924727f
commit
107be4122c
@ -1,54 +1,21 @@
|
|||||||
# define the cpu used by the arduino due board
|
# define the cpu used by SAMR21 Xplained Pro board
|
||||||
export CPU = samd21
|
export CPU = samd21
|
||||||
export CPU_MODEL = samr21g18a
|
export CPU_MODEL = samr21g18a
|
||||||
|
|
||||||
# set the default port
|
#
|
||||||
export PORT ?= /dev/ttyACM0
|
CFLAGS_OPT = -O0
|
||||||
|
|
||||||
# define tools used for building the project
|
# set default port depending on operating system
|
||||||
export PREFIX = arm-none-eabi-
|
PORT_LINUX ?= /dev/ttyACM0
|
||||||
export CC = $(PREFIX)gcc
|
|
||||||
export CXX = $(PREFIX)g++
|
|
||||||
export AR = $(PREFIX)ar
|
|
||||||
export AS = $(PREFIX)as
|
|
||||||
export LINK = $(PREFIX)gcc
|
|
||||||
export SIZE = $(PREFIX)size
|
|
||||||
export OBJCOPY = $(PREFIX)objcopy
|
|
||||||
export DBG = $(PREFIX)gdb
|
|
||||||
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
|
|
||||||
export FLASHER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
|
||||||
export DEBUGGER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
|
||||||
export DEBUGSERVER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
|
||||||
export RESET = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
|
||||||
|
|
||||||
# define build specific options
|
#
|
||||||
export CPU_USAGE = -mcpu=cortex-m0plus
|
|
||||||
FPU_USAGE =
|
|
||||||
export CFLAGS += -ggdb -g3 -std=gnu99 -O0 -Wall -Wstrict-prototypes $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -mthumb -mno-thumb-interwork -nostartfiles
|
|
||||||
export CFLAGS += -ffunction-sections -fdata-sections -fno-builtin
|
|
||||||
export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian
|
|
||||||
export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mno-thumb-interwork -nostartfiles
|
|
||||||
# linkerscript specified in cpu/Makefile.include
|
|
||||||
export LINKFLAGS += -T$(LINKERSCRIPT)
|
|
||||||
export OFLAGS = -O ihex
|
|
||||||
export TERMFLAGS += -p "$(PORT)"
|
|
||||||
export FFLAGS = flash
|
|
||||||
ifneq (,$(SERIAL))
|
|
||||||
export FFLAGS += "-c cmsis_dap_serial $(SERIAL)"
|
|
||||||
endif
|
|
||||||
export DEBUGGER_FLAGS = debug
|
|
||||||
export DEBUGSERVER_FLAGS = debug-server
|
|
||||||
export RESET_FLAGS = reset
|
|
||||||
|
|
||||||
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
|
||||||
export CXXUWFLAGS +=
|
|
||||||
export CXXEXFLAGS +=
|
|
||||||
|
|
||||||
# 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/
|
|
||||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||||
|
|
||||||
|
# setup serial terminal
|
||||||
|
include $(RIOTBOARD)/Makefile.include.serial
|
||||||
|
|
||||||
|
# this board uses openocd
|
||||||
|
include $(RIOTBOARD)/Makefile.include.openocd
|
||||||
|
|
||||||
|
# include cortex defaults
|
||||||
|
include $(RIOTBOARD)/Makefile.include.cortex_common
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
# this CPU implementation is using the new core/CPU interface
|
export CORTEX = cortex-m0
|
||||||
export CFLAGS += -DCOREIF_NG=1
|
|
||||||
|
|
||||||
# this CPU implementation doesn't use CMSIS initialisation
|
# this CPU implementation doesn't use CMSIS initialisation
|
||||||
export CFLAGS += -DDONT_USE_CMSIS_INIT
|
export CFLAGS += -DDONT_USE_CMSIS_INIT
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user