mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
board: fox: adapt to common board Makefile
This commit is contained in:
parent
e691fc6432
commit
e450631aa8
@ -3,60 +3,17 @@ export CPU = stm32f1
|
||||
export CPU_MODEL = stm32f103re
|
||||
|
||||
# set default port depending on operating system
|
||||
OS := $(shell uname)
|
||||
ifeq ($(OS),Linux)
|
||||
PORT ?= /dev/ttyUSB1
|
||||
else ifeq ($(OS),Darwin)
|
||||
PORT ?= $(shell ls -1 /dev/tty.usbserial* | head -n 1)
|
||||
else
|
||||
$(info CAUTION: No PORT was defined for your host platform!)
|
||||
# TODO: add support for windows as host platform
|
||||
endif
|
||||
export PORT
|
||||
PORT_LINUX ?= /dev/ttyUSB1
|
||||
PORT_DARWIN ?= $(shell ls -1 /dev/tty.usbserial* | head -n 1)
|
||||
|
||||
# define tools used for building the project
|
||||
export PREFIX = arm-none-eabi-
|
||||
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
|
||||
# setup serial terminal
|
||||
include $(RIOTBOARD)/Makefile.include.serial
|
||||
|
||||
# define build specific options
|
||||
export CPU_USAGE = -mcpu=cortex-m3
|
||||
export FPU_USAGE =
|
||||
export CFLAGS += -ggdb -g3 -std=gnu99 -Os -Wall -Wstrict-prototypes $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -mthumb -mno-thumb-interwork -nostartfiles
|
||||
export CFLAGS += -ffunction-sections -fdata-sections -fno-builtin
|
||||
|
||||
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
||||
export CXXUWFLAGS +=
|
||||
export CXXEXFLAGS +=
|
||||
|
||||
export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian
|
||||
export LINKFLAGS += -ggdb -g3 -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mno-thumb-interwork -nostartfiles
|
||||
# $(LINKERSCRIPT) is specified in cpu/Makefile.include
|
||||
export LINKFLAGS += -T$(LINKERSCRIPT)
|
||||
export OFLAGS = -O ihex
|
||||
export TERMFLAGS += -p "$(PORT)"
|
||||
export FFLAGS = flash
|
||||
export DEBUGGER_FLAGS = debug
|
||||
export DEBUGSERVER_FLAGS = debug-server
|
||||
export RESET_FLAGS = reset
|
||||
|
||||
# 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/ -I$(RIOTBASE)/drivers/at86rf231/include -I$(RIOTBASE)/sys/net/include
|
||||
# this board uses openocd
|
||||
include $(RIOTBOARD)/Makefile.include.openocd
|
||||
|
||||
# include board dependencies
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
|
||||
# include cortex defaults
|
||||
include $(RIOTBOARD)/Makefile.include.cortex_common
|
||||
|
Loading…
Reference in New Issue
Block a user