source: rtos_arduino/trunk/arduino_lib/hardware/arduino/samd/cores/validation/validation_core/build_gcc/gcc.mk@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 3.7 KB
Line 
1#
2# Copyright (c) 2014 Arduino. All right reserved.
3#
4# This library is free software; you can redistribute it and/or
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
8#
9# This library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12# See the GNU Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public
15# License along with this library; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17#
18
19# Compilation tools
20AR = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-ar
21CC = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-gcc
22#CXX = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-g++
23CXX = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-gcc
24AS = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-as
25GDB = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-gdb
26SIZE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-size
27NM = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-nm
28OBJCOPY = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-objcopy
29
30RM=rm -Rf
31
32SEP=\\
33
34# ---------------------------------------------------------------------------------------
35# C Flags
36
37CFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int
38CFLAGS += -Werror-implicit-function-declaration -Wmain -Wparentheses
39CFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
40CFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
41CFLAGS += -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings
42CFLAGS += -Wsign-compare -Waggregate-return -Wstrict-prototypes
43CFLAGS += -Wmissing-prototypes -Wmissing-declarations
44CFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
45CFLAGS += -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wlong-long
46CFLAGS += -Wunreachable-code
47CFLAGS += -Wcast-align
48
49# -flto
50CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0plus -mthumb -mlong-calls -ffunction-sections -nostdlib -std=c99
51CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(DEVICE) -D$(VARIANT)
52
53# To reduce application size use only integer printf function.
54CFLAGS += -Dprintf=iprintf
55# -u _scanf_float -u _printf_float
56
57
58
59# ---------------------------------------------------------------------------------------
60# CPP Flags
61
62CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2
63CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code
64CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
65CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
66CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings
67CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations
68CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
69CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
70
71#-fno-rtti -fno-exceptions -flto
72CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0plus -mthumb -mlong-calls -ffunction-sections -fdata-sections -std=c++98
73CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(DEVICE)
74
75# To reduce application size use only integer printf function.
76CPPFLAGS += -Dprintf=iprintf
77
78
79
80# ---------------------------------------------------------------------------------------
81# ASM Flags
82
83ASFLAGS = -mcpu=cortex-m0plus -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES)
84
85
86
87# ---------------------------------------------------------------------------------------
88# LD Flags
89
90#--nostartfiles -flto
91LDFLAGS= -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols
92
Note: See TracBrowser for help on using the repository browser.