mirror of
				https://github.com/digistump/DigistumpArduino.git
				synced 2025-11-03 13:04:48 -08:00 
			
		
		
		
	switch to setup for Arduino Boards Manager
This commit is contained in:
		
							
								
								
									
										63
									
								
								digistump-sam/system/libsam/build_gcc/gcc.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								digistump-sam/system/libsam/build_gcc/gcc.mk
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,63 @@
 | 
			
		||||
#
 | 
			
		||||
#  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
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Tool suffix when cross-compiling
 | 
			
		||||
CROSS_COMPILE = $(ARM_GCC_TOOLCHAIN)/arm-none-eabi-
 | 
			
		||||
 | 
			
		||||
# Compilation tools
 | 
			
		||||
AR = $(CROSS_COMPILE)ar
 | 
			
		||||
CC = $(CROSS_COMPILE)gcc
 | 
			
		||||
AS = $(CROSS_COMPILE)as
 | 
			
		||||
NM = $(CROSS_COMPILE)nm
 | 
			
		||||
ifeq ($(OS),Windows_NT)
 | 
			
		||||
RM=cs-rm -Rf
 | 
			
		||||
#RM=del /s /f
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
# To reduce application size use only integer printf function.
 | 
			
		||||
CFLAGS += -Dprintf=iprintf
 | 
			
		||||
 | 
			
		||||
CFLAGS += --param max-inline-insns-single=500 -mcpu=cortex-m3 -mthumb -mlong-calls -ffunction-sections -fdata-sections -std=c99
 | 
			
		||||
CFLAGS += $(OPTIMIZATION) $(INCLUDES) -D$(CHIP)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# ---------------------------------------------------------------------------------------
 | 
			
		||||
# ASM Flags
 | 
			
		||||
 | 
			
		||||
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -a -g $(INCLUDES)
 | 
			
		||||
		Reference in New Issue
	
	Block a user