Merge pull request #1356 from haukepetersen/fix_sam3x_newlibnano
cpu - sam3x8e: added switch for newlib-nano specs
This commit is contained in:
commit
d52df839cd
@ -1,4 +1,3 @@
|
||||
|
||||
# define the cpu used by the arduino due board
|
||||
export CPU = sam3x8e
|
||||
|
||||
@ -30,7 +29,7 @@ export PORT
|
||||
# define build specific options
|
||||
export CPU_USAGE = -mcpu=cortex-m3
|
||||
export CFLAGS += -ggdb -g3 -std=gnu99 -Os -Wall -Wstrict-prototypes $(CPU_USAGE) -mlittle-endian -mthumb -mthumb-interwork -nostartfiles
|
||||
export CFLAGS += -DREENTRANT_SYSCALLS_PROVIDED
|
||||
export CFLAGS += -flto -ffunction-sections -fdata-sections -fno-builtin
|
||||
export ASFLAGS += -ggdb -g3 -mcpu=cortex-m4 $(FPU_USAGE) -mlittle-endian
|
||||
export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mthumb-interwork -nostartfiles
|
||||
# linkerscript specified in cpu/Makefile.include
|
||||
@ -38,11 +37,10 @@ export LINKFLAGS += -T$(LINKERSCRIPT)
|
||||
export OFLAGS += -O binary
|
||||
export FFLAGS += -e -w -v -b bin/$(BOARD)/$(APPLICATION).hex
|
||||
|
||||
# additional compiler and linker flags to enable newlib-nano and optimize for it
|
||||
# CAREFUL: newlib-nano is not supported by the ubuntu arm-none-eabi- toolchain, so its disabled by default
|
||||
#export CFLAGS += -flto -ffunction-sections -fdata-sections -fno-builtin
|
||||
#export LINKFLAGS += -specs=nano.specs -lc -lnosys
|
||||
|
||||
# use the nano-specs of the NewLib when available
|
||||
ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0)
|
||||
export LINKFLAGS += -specs=nano.specs -lc -lnosys
|
||||
endif
|
||||
|
||||
# export board specific includes to the global includes-listing
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user