diff --git a/variants/arduino_zero/build_gcc/Makefile b/variants/arduino_zero/build_gcc/Makefile deleted file mode 100644 index 841a76884d47d09eb12928995cdd63b454e8f8b3..0000000000000000000000000000000000000000 --- a/variants/arduino_zero/build_gcc/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory - -#------------------------------------------------------------------------------- -# Rules -#------------------------------------------------------------------------------- - -all: arduino_zero - -.PHONY: arduino_zero -samd21_xpro: - @echo ------------------------------------------------------------------------------------ - @echo --- Making variant arduino_zero - @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_zero.mk -# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_zero.mk - @echo ------------------------------------------------------------------------------------ - -.PHONY: clean -clean: - @echo ------------------------------------------------------------------------------------ - @echo --- Cleaning variant arduino_due_x - @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_arduino_zero.mk $@ -# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_arduino_zero.mk $@ - @echo ------------------------------------------------------------------------------------ - diff --git a/variants/arduino_zero/build_gcc/debug.mk b/variants/arduino_zero/build_gcc/debug.mk deleted file mode 100644 index 5f3e4e0463ee2191a9a08e734f415b66fba767a2..0000000000000000000000000000000000000000 --- a/variants/arduino_zero/build_gcc/debug.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Optimization level -# -O1 Optimize -# -O2 Optimize even more -# -O3 Optimize yet more -# -O0 Reduce compilation time and make debugging produce the expected results -# -Os Optimize for size -OPTIMIZATION = -g -O0 -DDEBUG diff --git a/variants/arduino_zero/build_gcc/gcc.mk b/variants/arduino_zero/build_gcc/gcc.mk deleted file mode 100644 index 7c67fecf469e6f41c711883073593c2f12f681d5..0000000000000000000000000000000000000000 --- a/variants/arduino_zero/build_gcc/gcc.mk +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Tool suffix when cross-compiling -CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi- - -# Compilation tools -AR = $(CROSS_COMPILE)ar -CC = $(CROSS_COMPILE)gcc -CXX = $(CROSS_COMPILE)g++ -AS = $(CROSS_COMPILE)as -NM = $(CROSS_COMPILE)nm -ifeq ($(OS),Windows_NT) -RM=cs-rm -Rf -else -RM=rm -Rf -endif - -SEP=\\ - -# --------------------------------------------------------------------------------------- -# C Flags - -CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses -CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes -CFLAGS += -Wmissing-prototypes -Wmissing-declarations -CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long -CFLAGS += -Wunreachable-code -CFLAGS += -Wcast-align -#CFLAGS += -Wmissing-noreturn -#CFLAGS += -Wconversion - -CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0p -mthumb -mlong-calls -ffunction-sections -fdata-sections -nostdlib -std=c99 -CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT) - -# To reduce application size use only integer printf function. -CFLAGS += -Dprintf=iprintf - -# --------------------------------------------------------------------------------------- -# CPP Flags - -CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code -CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings -CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations -CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long -#CPPFLAGS += -Wmissing-noreturn -#CPPFLAGS += -Wconversion - -CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0p -mthumb -mlong-calls -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -std=c++98 -CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) - -# To reduce application size use only integer printf function. -CPPFLAGS += -Dprintf=iprintf - -# --------------------------------------------------------------------------------------- -# ASM Flags - -ASFLAGS = -mcpu=cortex-m0p -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) diff --git a/variants/arduino_zero/build_gcc/libvariant_arduino_zero.mk b/variants/arduino_zero/build_gcc/libvariant_arduino_zero.mk deleted file mode 100644 index 91ebe38e8affeb9ea6af45282cb48dbebd059d97..0000000000000000000000000000000000000000 --- a/variants/arduino_zero/build_gcc/libvariant_arduino_zero.mk +++ /dev/null @@ -1,184 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Makefile for compiling libArduino -.SUFFIXES: .o .a .c .s - -CHIP=__SAMD21G18A__ -VARIANT=arduino_zero -LIBNAME=libvariant_$(VARIANT) -TOOLCHAIN=gcc - -#------------------------------------------------------------------------------- -# Path -#------------------------------------------------------------------------------- - -# Output directories -OUTPUT_BIN = ../../../cores/arduino - -# Libraries -PROJECT_BASE_PATH = .. -SYSTEM_PATH = ../../../system -CMSIS_ROOT_PATH = $(SYSTEM_PATH)/CMSIS -CMSIS_ARM_PATH=$(CMSIS_ROOT_PATH)/CMSIS/Include -CMSIS_ATMEL_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL -#CMSIS_CHIP_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL/$(CHIP_SERIE) - -ARDUINO_PATH = ../../../cores/arduino -VARIANT_BASE_PATH = ../../../variants -VARIANT_PATH = ../../../variants/$(VARIANT) - -#------------------------------------------------------------------------------- -# Files -#------------------------------------------------------------------------------- - -#vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH) -vpath %.cpp $(PROJECT_BASE_PATH) - -VPATH+=$(PROJECT_BASE_PATH) - -INCLUDES = -#INCLUDES += -I$(PROJECT_BASE_PATH) -INCLUDES += -I$(ARDUINO_PATH) -INCLUDES += -I$(ARDUINO_PATH)/USB -INCLUDES += -I$(SYSTEM_PATH) -INCLUDES += -I$(SYSTEM_PATH)/libsamd -INCLUDES += -I$(SYSTEM_PATH)/USBHost -INCLUDES += -I$(VARIANT_BASE_PATH) -INCLUDES += -I$(VARIANT_PATH) -INCLUDES += -I$(CMSIS_ARM_PATH) -INCLUDES += -I$(CMSIS_ATMEL_PATH) - -#------------------------------------------------------------------------------- -ifdef DEBUG -include debug.mk -else -include release.mk -endif - -#------------------------------------------------------------------------------- -# Tools -#------------------------------------------------------------------------------- - -include $(TOOLCHAIN).mk - -#------------------------------------------------------------------------------- -ifdef DEBUG -OUTPUT_OBJ=debug -OUTPUT_LIB_POSTFIX=dbg -else -OUTPUT_OBJ=release -OUTPUT_LIB_POSTFIX=rel -endif - -OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_$(OUTPUT_LIB_POSTFIX).a -OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT) - -#------------------------------------------------------------------------------- -# C source files and objects -#------------------------------------------------------------------------------- -C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c) - -C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC))) - -# during development, remove some files -C_OBJ_FILTER= - -C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# CPP source files and objects -#------------------------------------------------------------------------------- -CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp) - -CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC))) - -# during development, remove some files -CPP_OBJ_FILTER= - -CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# Assembler source files and objects -#------------------------------------------------------------------------------- -A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s) - -A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC))) - -# during development, remove some files -A_OBJ_FILTER= - -A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# Rules -#------------------------------------------------------------------------------- -all: $(VARIANT) - -$(VARIANT): create_output $(OUTPUT_LIB) - -.PHONY: create_output -create_output: - @echo ------------------------------------------------------------------------------------ - @echo ------------------------- - @echo --- Preparing variant $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN) - @echo ------------------------- -# @echo *$(INCLUDES) -# @echo ------------------------- -# @echo *$(C_SRC) -# @echo ------------------------- -# @echo *$(C_OBJ) -# @echo ------------------------- -# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) -# @echo ------------------------- -# @echo *$(CPP_SRC) -# @echo ------------------------- -# @echo *$(CPP_OBJ) -# @echo ------------------------- -# @echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) -# @echo ------------------------- -# @echo *$(A_SRC) -# @echo ------------------------- - - -@mkdir $(OUTPUT_PATH) 1>NUL 2>&1 - @echo ------------------------------------------------------------------------------------ - -$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c -# @"$(CC)" -v -c $(CFLAGS) $< -o $@ - @"$(CC)" -c $(CFLAGS) $< -o $@ - -$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp -# @"$(CC)" -c $(CPPFLAGS) $< -o $@ - @"$(CC)" -xc++ -c $(CPPFLAGS) $< -o $@ - -$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s - @"$(AS)" -c $(ASFLAGS) $< -o $@ - -$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ)) - @"$(AR)" -v -r "$(OUTPUT_BIN)/$@" $^ - @"$(NM)" "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt" - - -.PHONY: clean -clean: - @echo ------------------------------------------------------------------------------------ - @echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o] - -@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1 - -@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1 - @echo ------------------------------------------------------------------------------------ - diff --git a/variants/arduino_zero/build_gcc/release.mk b/variants/arduino_zero/build_gcc/release.mk deleted file mode 100644 index 0d15157f4f7f9a167d11b351dec063a2b8229896..0000000000000000000000000000000000000000 --- a/variants/arduino_zero/build_gcc/release.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2011 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Optimization level -# -O1 Optimize -# -O2 Optimize even more -# -O3 Optimize yet more -# -O0 Reduce compilation time and make debugging produce the expected results -# -Os Optimize for size -OPTIMIZATION = -Os diff --git a/variants/samd21_xpro/build_gcc/Makefile b/variants/samd21_xpro/build_gcc/Makefile deleted file mode 100644 index dfbbcb935c9d2d37101ea413df51a484cadff236..0000000000000000000000000000000000000000 --- a/variants/samd21_xpro/build_gcc/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -SUBMAKE_OPTIONS=--no-builtin-rules --no-builtin-variables --no-print-directory - -#------------------------------------------------------------------------------- -# Rules -#------------------------------------------------------------------------------- - -all: samd21_xpro - -.PHONY: samd21_xpro -samd21_xpro: - @echo ------------------------------------------------------------------------------------ - @echo --- Making variant samd21_xpro - @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_samd21_xpro.mk -# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_samd21_xpro.mk - @echo ------------------------------------------------------------------------------------ - -.PHONY: clean -clean: - @echo ------------------------------------------------------------------------------------ - @echo --- Cleaning variant arduino_due_x - @$(MAKE) DEBUG=1 $(SUBMAKE_OPTIONS) -f libvariant_samd21_xpro.mk $@ -# @$(MAKE) $(SUBMAKE_OPTIONS) -f libvariant_samd21_xpro.mk $@ - @echo ------------------------------------------------------------------------------------ - diff --git a/variants/samd21_xpro/build_gcc/debug.mk b/variants/samd21_xpro/build_gcc/debug.mk deleted file mode 100644 index 5f3e4e0463ee2191a9a08e734f415b66fba767a2..0000000000000000000000000000000000000000 --- a/variants/samd21_xpro/build_gcc/debug.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Optimization level -# -O1 Optimize -# -O2 Optimize even more -# -O3 Optimize yet more -# -O0 Reduce compilation time and make debugging produce the expected results -# -Os Optimize for size -OPTIMIZATION = -g -O0 -DDEBUG diff --git a/variants/samd21_xpro/build_gcc/gcc.mk b/variants/samd21_xpro/build_gcc/gcc.mk deleted file mode 100644 index 7c67fecf469e6f41c711883073593c2f12f681d5..0000000000000000000000000000000000000000 --- a/variants/samd21_xpro/build_gcc/gcc.mk +++ /dev/null @@ -1,82 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Tool suffix when cross-compiling -CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi- - -# Compilation tools -AR = $(CROSS_COMPILE)ar -CC = $(CROSS_COMPILE)gcc -CXX = $(CROSS_COMPILE)g++ -AS = $(CROSS_COMPILE)as -NM = $(CROSS_COMPILE)nm -ifeq ($(OS),Windows_NT) -RM=cs-rm -Rf -else -RM=rm -Rf -endif - -SEP=\\ - -# --------------------------------------------------------------------------------------- -# C Flags - -CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses -CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes -CFLAGS += -Wmissing-prototypes -Wmissing-declarations -CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long -CFLAGS += -Wunreachable-code -CFLAGS += -Wcast-align -#CFLAGS += -Wmissing-noreturn -#CFLAGS += -Wconversion - -CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0p -mthumb -mlong-calls -ffunction-sections -fdata-sections -nostdlib -std=c99 -CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) -D$(VARIANT) - -# To reduce application size use only integer printf function. -CFLAGS += -Dprintf=iprintf - -# --------------------------------------------------------------------------------------- -# CPP Flags - -CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code -CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings -CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations -CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long -#CPPFLAGS += -Wmissing-noreturn -#CPPFLAGS += -Wconversion - -CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0p -mthumb -mlong-calls -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -std=c++98 -CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP) - -# To reduce application size use only integer printf function. -CPPFLAGS += -Dprintf=iprintf - -# --------------------------------------------------------------------------------------- -# ASM Flags - -ASFLAGS = -mcpu=cortex-m0p -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES) diff --git a/variants/samd21_xpro/build_gcc/libvariant_samd21_xpro.mk b/variants/samd21_xpro/build_gcc/libvariant_samd21_xpro.mk deleted file mode 100644 index 042983062aedae334db83b7c73fb58f4282e0559..0000000000000000000000000000000000000000 --- a/variants/samd21_xpro/build_gcc/libvariant_samd21_xpro.mk +++ /dev/null @@ -1,184 +0,0 @@ -# -# Copyright (c) 2014 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Makefile for compiling libArduino -.SUFFIXES: .o .a .c .s - -CHIP=__SAMD21J18A__ -VARIANT=samd21_xpro -LIBNAME=libvariant_$(VARIANT) -TOOLCHAIN=gcc - -#------------------------------------------------------------------------------- -# Path -#------------------------------------------------------------------------------- - -# Output directories -OUTPUT_BIN = ../../../cores/arduino - -# Libraries -PROJECT_BASE_PATH = .. -SYSTEM_PATH = ../../../system -CMSIS_ROOT_PATH = $(SYSTEM_PATH)/CMSIS -CMSIS_ARM_PATH=$(CMSIS_ROOT_PATH)/CMSIS/Include -CMSIS_ATMEL_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL -#CMSIS_CHIP_PATH=$(CMSIS_ROOT_PATH)/Device/ATMEL/$(CHIP_SERIE) - -ARDUINO_PATH = ../../../cores/arduino -VARIANT_BASE_PATH = ../../../variants -VARIANT_PATH = ../../../variants/$(VARIANT) - -#------------------------------------------------------------------------------- -# Files -#------------------------------------------------------------------------------- - -#vpath %.h $(PROJECT_BASE_PATH) $(SYSTEM_PATH) $(VARIANT_PATH) -vpath %.cpp $(PROJECT_BASE_PATH) - -VPATH+=$(PROJECT_BASE_PATH) - -INCLUDES = -#INCLUDES += -I$(PROJECT_BASE_PATH) -INCLUDES += -I$(ARDUINO_PATH) -INCLUDES += -I$(ARDUINO_PATH)/USB -INCLUDES += -I$(SYSTEM_PATH) -INCLUDES += -I$(SYSTEM_PATH)/libsamd -INCLUDES += -I$(SYSTEM_PATH)/USBHost -INCLUDES += -I$(VARIANT_BASE_PATH) -INCLUDES += -I$(VARIANT_PATH) -INCLUDES += -I$(CMSIS_ARM_PATH) -INCLUDES += -I$(CMSIS_ATMEL_PATH) - -#------------------------------------------------------------------------------- -ifdef DEBUG -include debug.mk -else -include release.mk -endif - -#------------------------------------------------------------------------------- -# Tools -#------------------------------------------------------------------------------- - -include $(TOOLCHAIN).mk - -#------------------------------------------------------------------------------- -ifdef DEBUG -OUTPUT_OBJ=debug -OUTPUT_LIB_POSTFIX=dbg -else -OUTPUT_OBJ=release -OUTPUT_LIB_POSTFIX=rel -endif - -OUTPUT_LIB=$(LIBNAME)_$(TOOLCHAIN)_$(OUTPUT_LIB_POSTFIX).a -OUTPUT_PATH=$(OUTPUT_OBJ)_$(VARIANT) - -#------------------------------------------------------------------------------- -# C source files and objects -#------------------------------------------------------------------------------- -C_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.c) - -C_OBJ_TEMP = $(patsubst %.c, %.o, $(notdir $(C_SRC))) - -# during development, remove some files -C_OBJ_FILTER= - -C_OBJ=$(filter-out $(C_OBJ_FILTER), $(C_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# CPP source files and objects -#------------------------------------------------------------------------------- -CPP_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.cpp) - -CPP_OBJ_TEMP = $(patsubst %.cpp, %.o, $(notdir $(CPP_SRC))) - -# during development, remove some files -CPP_OBJ_FILTER= - -CPP_OBJ=$(filter-out $(CPP_OBJ_FILTER), $(CPP_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# Assembler source files and objects -#------------------------------------------------------------------------------- -A_SRC=$(wildcard $(PROJECT_BASE_PATH)/*.s) - -A_OBJ_TEMP=$(patsubst %.s, %.o, $(notdir $(A_SRC))) - -# during development, remove some files -A_OBJ_FILTER= - -A_OBJ=$(filter-out $(A_OBJ_FILTER), $(A_OBJ_TEMP)) - -#------------------------------------------------------------------------------- -# Rules -#------------------------------------------------------------------------------- -all: $(VARIANT) - -$(VARIANT): create_output $(OUTPUT_LIB) - -.PHONY: create_output -create_output: - @echo ------------------------------------------------------------------------------------ - @echo ------------------------- - @echo --- Preparing variant $(VARIANT) files in $(OUTPUT_PATH) $(OUTPUT_BIN) - @echo ------------------------- -# @echo *$(INCLUDES) -# @echo ------------------------- -# @echo *$(C_SRC) -# @echo ------------------------- -# @echo *$(C_OBJ) -# @echo ------------------------- -# @echo *$(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) -# @echo ------------------------- -# @echo *$(CPP_SRC) -# @echo ------------------------- -# @echo *$(CPP_OBJ) -# @echo ------------------------- -# @echo *$(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) -# @echo ------------------------- -# @echo *$(A_SRC) -# @echo ------------------------- - - -@mkdir $(OUTPUT_PATH) 1>NUL 2>&1 - @echo ------------------------------------------------------------------------------------ - -$(addprefix $(OUTPUT_PATH)/,$(C_OBJ)): $(OUTPUT_PATH)/%.o: %.c -# @"$(CC)" -v -c $(CFLAGS) $< -o $@ - @"$(CC)" -c $(CFLAGS) $< -o $@ - -$(addprefix $(OUTPUT_PATH)/,$(CPP_OBJ)): $(OUTPUT_PATH)/%.o: %.cpp -# @"$(CC)" -c $(CPPFLAGS) $< -o $@ - @"$(CC)" -xc++ -c $(CPPFLAGS) $< -o $@ - -$(addprefix $(OUTPUT_PATH)/,$(A_OBJ)): $(OUTPUT_PATH)/%.o: %.s - @"$(AS)" -c $(ASFLAGS) $< -o $@ - -$(OUTPUT_LIB): $(addprefix $(OUTPUT_PATH)/, $(C_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(CPP_OBJ)) $(addprefix $(OUTPUT_PATH)/, $(A_OBJ)) - @"$(AR)" -v -r "$(OUTPUT_BIN)/$@" $^ - @"$(NM)" "$(OUTPUT_BIN)/$@" > "$(OUTPUT_BIN)/$@.txt" - - -.PHONY: clean -clean: - @echo ------------------------------------------------------------------------------------ - @echo --- Cleaning $(VARIANT) files [$(OUTPUT_PATH)$(SEP)*.o] - -@$(RM) $(OUTPUT_PATH) 1>NUL 2>&1 - -@$(RM) $(OUTPUT_BIN)/$(OUTPUT_LIB) 1>NUL 2>&1 - @echo ------------------------------------------------------------------------------------ - diff --git a/variants/samd21_xpro/build_gcc/release.mk b/variants/samd21_xpro/build_gcc/release.mk deleted file mode 100644 index 0d15157f4f7f9a167d11b351dec063a2b8229896..0000000000000000000000000000000000000000 --- a/variants/samd21_xpro/build_gcc/release.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (c) 2011 Arduino. All right reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -# Optimization level -# -O1 Optimize -# -O2 Optimize even more -# -O3 Optimize yet more -# -O0 Reduce compilation time and make debugging produce the expected results -# -Os Optimize for size -OPTIMIZATION = -Os