diff --git a/boards/ESP8266.blocklist b/boards/ESP8266.blocklist new file mode 100644 index 000000000..59268bfc6 --- /dev/null +++ b/boards/ESP8266.blocklist @@ -0,0 +1,3 @@ +[ + {"class":"E","name":"FFT"} +] diff --git a/boards/ESP8266_BOARD.py b/boards/ESP8266_BOARD.py index 8bf3ccec0..c3484eeaa 100644 --- a/boards/ESP8266_BOARD.py +++ b/boards/ESP8266_BOARD.py @@ -31,6 +31,7 @@ ], 'makefile' : [ 'DEFINES+=-DSAVE_ON_FLASH_MATH', + 'BLACKLIST=boards/ESP8266.blocklist', # force some stuff to be removed to save space 'USE_DEBUGGER=0', # We can't use debugger as RTOS needs jsiIdle to keep exiting ] } diff --git a/src/jswrap_espruino.c b/src/jswrap_espruino.c index 6e6fd9b3a..d4f1f0a8e 100644 --- a/src/jswrap_espruino.c +++ b/src/jswrap_espruino.c @@ -429,6 +429,8 @@ JsVarFloat jswrap_espruino_convolve(JsVar *arr1, JsVar *arr2, int offset) { return conv; } + +#ifndef ESP8266 // ESP8266 seems unable to leave this out of the firmware, even with gc-sections/flto! #if defined(SAVE_ON_FLASH_MATH) || defined(BANGLEJS) #define FFTDATATYPE double #else @@ -608,6 +610,7 @@ void jswrap_espruino_FFT(JsVar *arrReal, JsVar *arrImag, bool inverse) { _jswrap_espruino_FFT_setData(arrImag, vImag, 0, pow2); } +#endif //!ESP8266 /*JSON{ "type" : "staticmethod", "ifndef" : "SAVE_ON_FLASH",