Skip to content

Commit

Permalink
Remove Espruino's built-in strcpy/etc
Browse files Browse the repository at this point in the history
            Remove Espruino's built-in maths
            Add basic Taylor series sin and atan for when we're trying to save memory
  • Loading branch information
gfwilliams committed Mar 4, 2016
1 parent b57e842 commit 9781bac
Show file tree
Hide file tree
Showing 65 changed files with 106 additions and 12,217 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,6 +1,9 @@
1v86 : Compile Telnet server into linux by default, Add '--telnet' command-line option to enable it
Fix lock 'leak' in Telnet when Telnet is turned off
Create errors for unterminated expressions (fix #814)
Remove Espruino's built-in strcpy/etc
Remove Espruino's built-in maths
Add basic Taylor series sin and atan for when we're trying to save memory

1v85 : Ensure HttpServerResponse.writeHead actually sends the header right away
- enables WebSocket Server support from JS
Expand Down
47 changes: 1 addition & 46 deletions Makefile
Expand Up @@ -67,7 +67,7 @@ MAKEFLAGS=-j5 # multicore
endif

INCLUDE=-I$(ROOT) -I$(ROOT)/targets -I$(ROOT)/src -I$(ROOT)/gen
LIBS=
LIBS=-lm # Maths
DEFINES=
CFLAGS=-Wall -Wextra -Wconversion -Werror=implicit-function-declaration -fno-strict-aliasing
LDFLAGS=-Winline
Expand Down Expand Up @@ -829,48 +829,6 @@ ifdef USE_MATH
DEFINES += -DUSE_MATH
INCLUDE += -I$(ROOT)/libs/math
WRAPPERSOURCES += libs/math/jswrap_math.c
ifndef LINUX
SOURCES += \
libs/math/acosh.c \
libs/math/asin.c \
libs/math/asinh.c \
libs/math/atan.c \
libs/math/atanh.c \
libs/math/cbrt.c \
libs/math/chbevl.c \
libs/math/clog.c \
libs/math/cmplx.c \
libs/math/const.c \
libs/math/cosh.c \
libs/math/drand.c \
libs/math/exp10.c \
libs/math/exp2.c \
libs/math/exp.c \
libs/math/fabs.c \
libs/math/floor.c \
libs/math/isnan.c \
libs/math/log10.c \
libs/math/log2.c \
libs/math/log.c \
libs/math/mtherr.c \
libs/math/polevl.c \
libs/math/pow.c \
libs/math/powi.c \
libs/math/round.c \
libs/math/setprec.c \
libs/math/sin.c \
libs/math/sincos.c \
libs/math/sindg.c \
libs/math/sinh.c \
libs/math/sqrt.c \
libs/math/tan.c \
libs/math/tandg.c \
libs/math/tanh.c \
libs/math/unity.c
#libs/math/mod2pi.c
#libs/math/mtst.c
#libs/math/dtestvec.c
endif
endif

ifdef USE_GRAPHICS
Expand Down Expand Up @@ -1548,8 +1506,6 @@ endif

ifdef STM32
DEFINES += -DSTM32 -DUSE_STDPERIPH_DRIVER=1 -D$(CHIP) -D$(BOARD) -D$(STLIB)
DEFINES += -DFAKE_STDLIB
# FAKE_STDLIB is for Espruino - it uses its own standard library so we don't have to link in the normal one + get bloated
INCLUDE += -I$(ROOT)/targets/stm32
ifndef BOOTLOADER
SOURCES += \
Expand All @@ -1565,7 +1521,6 @@ INCLUDE += -I$(ROOT)/targets/linux
SOURCES += \
targets/linux/main.c \
targets/linux/jshardware.c
LIBS += -lm # maths lib
LIBS += -lpthread # thread lib for input processing
ifdef OPENWRT_UCLIBC
LIBS += -lc
Expand Down
6 changes: 3 additions & 3 deletions boards/HYSTM32_28.py
Expand Up @@ -39,10 +39,10 @@
'adc' : 3,
'dac' : 0,
'saved_code' : {
'address' : 0x08000000 + ((128-4)*1024),
'address' : 0x08000000 + ((128-3)*1024),
'page_size' : 1024, # size of pages
'pages' : 4, # number of pages we're using
'flash_available' : 128-4 # 6 used for code
'pages' : 3, # number of pages we're using
'flash_available' : 128-3 # 3 used for code
},
};

Expand Down
6 changes: 3 additions & 3 deletions boards/OLIMEXINO_STM32.py
Expand Up @@ -39,10 +39,10 @@
'adc' : 3,
'dac' : 0,
'saved_code' : {
'address' : 0x08000000 + ((128-6)*1024),
'address' : 0x08000000 + ((128-4)*1024),
'page_size' : 1024, # size of pages
'pages' : 6, # number of pages we're using
'flash_available' : 128-6 # 6 used for code
'pages' : 4, # number of pages we're using
'flash_available' : 128-4 # 4 used for code
},
};

Expand Down
32 changes: 0 additions & 32 deletions libs/math/README

This file was deleted.

167 changes: 0 additions & 167 deletions libs/math/acosh.c

This file was deleted.

0 comments on commit 9781bac

Please sign in to comment.