1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

Added NANO option in Makefile (default: NANO=NO)

This commit is contained in:
bsongis 2014-09-14 13:42:40 +02:00
parent 329458e138
commit 22ec446d16

View file

@ -289,6 +289,10 @@ USB = JOYSTICK
# NO - normal behaviour, show real channel values
CHANNELS_MONITOR_INV_HIDE = NO
# Use newlib-nano
# Values = NO, YES
NANO = NO
#------- END BUILD OPTIONS ---------------------------
# Define programs and commands.
@ -718,6 +722,12 @@ ifeq ($(PCB), TARANIS)
EXTRABOARDSRC += targets/taranis/usbd_storage_msd.cpp
endif
ifeq ($(NANO), YES)
# use newlib-nano for linking
NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float
CPPDEFS += -DNANO
endif
ifneq ($(LUA), NO)
ifeq ($(LUA), YES)
CPPDEFS += -DLUA_MODEL_SCRIPTS
@ -1389,7 +1399,7 @@ OBJS = $(TMP:.s=.o)
@echo
@echo $(MSG_COMPILING) $@
$(CC) $(ARMCPPFLAGS) $< -o allsrc.o
$(CC) $(OBJS) allsrc.o -mcpu=cortex-m3 -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch,--gc-sections -o $@
$(CC) $(OBJS) allsrc.o -mcpu=cortex-m3 -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch,--gc-sections $(NEWLIB_NANO_FLAGS) -o $@
endif
# Target: clean project.