-->
Page 1 of 1

yet less memory?

PostPosted: Fri Feb 13, 2015 4:15 am
by tve
It looks to me as if the 20150212 firmware consumes much more memory than the 20150124 firmware. I have something that is a bit tight in 20150124 and it doesn't even load into the newer one. I've deleted a bunch of the code and it still doesn't fit. I have the feeling that it's not just that the newer firmware uses more heap at start-up but that it uses more heap for the loaded code. I've had to revert.

Re: yet less memory?

PostPosted: Fri Feb 13, 2015 8:15 am
by elac
Same situation here, can't use any firmware > 20150124. Pre-build.
NodeMCU 0.9.5 build 20150213 powered by Lua 5.1.4
lua: not enough memory
> print(node.heap())
16712
> for n,s in pairs(file.list()) do print(n.." size: "..s) end
page.lua size: 4128
dht22.lua size: 2588
init.lua size: 275

Re: yet less memory?

PostPosted: Sat Feb 14, 2015 5:51 am
by axelk
Same issue, but I fixed it by switching off floating point stuff. Additionally, I switched off SSL and some modules already some time ago. Together with using node.compile(), the current version give me more heap than any other before.

Changed settings in ..../nodemcu_firmware/app/include/user_config.h:

// #define CLIENT_SSL_ENABLE
//#define LUA_USE_MODULES_I2C
//#define LUA_USE_MODULES_SPI
//#define LUA_USE_MODULES_MQTT
// #define LUA_USE_MODULES_WS2812
#define LUA_NUMBER_INTEGRAL

I used this helper for re-building the NodeMCU-Firmware:
https://github.com/pfalcon/esp-open-sdk

Axel.

Re: yet less memory?

PostPosted: Mon Feb 16, 2015 2:17 am
by vowstar
Yes, try to compile your LUA code.