Skip to content

Commit

Permalink
Use maths lib for ESP8266 that gets loaded into ROM, not RAM.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Mar 10, 2016
1 parent b61d388 commit ada5350
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Expand Up @@ -67,7 +67,7 @@ MAKEFLAGS=-j5 # multicore
endif

INCLUDE=-I$(ROOT) -I$(ROOT)/targets -I$(ROOT)/src -I$(ROOT)/gen
LIBS=-lm # Maths
LIBS=
DEFINES=
CFLAGS=-Wall -Wextra -Wconversion -Werror=implicit-function-declaration -fno-strict-aliasing
LDFLAGS=-Winline
Expand Down Expand Up @@ -829,6 +829,14 @@ ifdef USE_MATH
DEFINES += -DUSE_MATH
INCLUDE += -I$(ROOT)/libs/math
WRAPPERSOURCES += libs/math/jswrap_math.c
ifeq ($(FAMILY),ESP8266)
# special ESP8266 maths lib that doesn't go into RAM
LIBS += -lmirom
LDFLAGS += -L$(ROOT)/targets/esp8266
else
# everything else uses normal maths lib
LIBS += -lm
endif
endif

ifdef USE_GRAPHICS
Expand Down
Binary file added targets/esp8266/libmirom.a
Binary file not shown.

0 comments on commit ada5350

Please sign in to comment.