Skip to content

Commit

Permalink
Fixes #1643 - Thanks to projectkk2glider for his help on this one
Browse files Browse the repository at this point in the history
Conflicts:
	radio/src/lua.cpp
	radio/src/opentx.cpp
  • Loading branch information
bsongis committed Sep 5, 2014
1 parent 04f9eb5 commit 500602e
Show file tree
Hide file tree
Showing 8 changed files with 412 additions and 214 deletions.
14 changes: 12 additions & 2 deletions radio/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 = YES

#------- END BUILD OPTIONS ---------------------------

# Define programs and commands.
Expand Down Expand Up @@ -1116,6 +1120,12 @@ MATH_LIB = -lm
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += $(MATH_LIB)

ifeq ($(NANO), YES)
# use newlib-nano for linking
NEWLIB_NANO_FLAGS = --specs=nano.specs -u _printf_float
CPPDEFS += -DNANO
endif

# Define Messages
# English
MSG_BEGIN = -------- begin --------
Expand Down Expand Up @@ -1324,7 +1334,7 @@ FOXLIB=-L/usr/local/lib \
-Wl,-rpath,$(FOXPATH)/src/.libs

simu: $(LUADEP) stamp_header $(BOARDSRC) $(CPPSRC) Makefile simu.cpp targets/simu/simpgmspace.cpp *.h tra lbm eeprom.bin
g++ $(CPPFLAGS) $(INCFLAGS) simu.cpp $(BOARDSRC) $(CPPSRC) $(LUASRC) targets/simu/simpgmspace.cpp -MD -DSIMU -O0 -o simu $(FOXINC) $(FOXLIB) -pthread -fexceptions
g++ $(CPPFLAGS) $(INCFLAGS) simu.cpp $(BOARDSRC) $(CPPSRC) $(LUASRC) targets/simu/simpgmspace.cpp -MD -DSIMU -DLUA_USE_APICHECK -O0 -o simu $(FOXINC) $(FOXLIB) -pthread -fexceptions

eeprom.bin:
dd if=/dev/zero of=$@ bs=1 count=2048
Expand Down Expand Up @@ -1390,7 +1400,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.
Expand Down

0 comments on commit 500602e

Please sign in to comment.