source: rtos_arduino/trunk/arduino_lib/hardware/arduino/samd/cores/validation/validation_usb_device/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
49CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0plus -mthumb -mlong-calls -ffunction-sections -nostdlib -std=c99
50CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(DEVICE) -D$(VARIANT)
51
52# To reduce application size use only integer printf function.
53CFLAGS += -Dprintf=iprintf
54
55
56
57# ---------------------------------------------------------------------------------------
58# CPP Flags
59
60CPPFLAGS += -Wall -Wchar-subscripts -Wcomment -Wformat=2
61CPPFLAGS += -Wmain -Wparentheses -Wcast-align -Wunreachable-code
62CPPFLAGS += -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused
63CPPFLAGS += -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef
64CPPFLAGS += -Wshadow -Wpointer-arith -Wwrite-strings
65CPPFLAGS += -Wsign-compare -Waggregate-return -Wmissing-declarations
66CPPFLAGS += -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations
67CPPFLAGS += -Wpacked -Wredundant-decls -Winline -Wlong-long
68
69#-fno-rtti -fno-exceptions
70CPPFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m0plus -mthumb -mlong-calls -ffunction-sections -fdata-sections -std=c++98
71CPPFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(DEVICE) -D$(VARIANT)
72
73# To reduce application size use only integer printf function.
74CPPFLAGS += -Dprintf=iprintf
75
76
77
78# ---------------------------------------------------------------------------------------
79# ASM Flags
80
81ASFLAGS = -mcpu=cortex-m0plus -mthumb -Wall -g $(OPTIMIZATION) $(INCLUDES)
82
83
84
85# ---------------------------------------------------------------------------------------
86# LD Flags
87
88LDFLAGS= -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
89
Note: See TracBrowser for help on using the repository browser.