From d31166f932b65ad1decabeac83509d3a8c141e1a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 22 Apr 2015 15:45:34 +0200 Subject: [PATCH] board: nucleo-f334: adapt to common board Makefile --- boards/nucleo-f334/Makefile.include | 59 ++++------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) diff --git a/boards/nucleo-f334/Makefile.include b/boards/nucleo-f334/Makefile.include index ab42686905..6637da3c5b 100644 --- a/boards/nucleo-f334/Makefile.include +++ b/boards/nucleo-f334/Makefile.include @@ -3,57 +3,14 @@ export CPU = stm32f3 export CPU_MODEL = stm32f334r8 #define the default port depending on the host OS -OS := $(shell uname) -ifeq ($(OS),Linux) - PORT ?= /dev/ttyACM0 -else ifeq ($(OS),Darwin) - PORT ?= $(shell ls -1 /dev/tty.usbmodem* | head -n 1) -else - $(info CAUTION: No flash tool for your host system found!) - # TODO: add support for windows as host platform -endif -export PORT +PORT_LINUX ?= /dev/ttyACM0 +PORT_DARWIN ?= $(shell ls -1 /dev/tty.usbmodem* | 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 -# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ -export CXXUWFLAGS += -export CXXEXFLAGS += +# this board uses openocd +include $(RIOTBOARD)/Makefile.include.openocd -# define build specific options -export CPU_USAGE = -mcpu=cortex-m4 -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 -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