So far I see the same. I have built from source and see the same (always good to reproduce) so I am now slowly adjusting it to my preferred setup (removing many modules). If I remove all unneeded modules then it starts the wakeup failure again so this is a binary search here, and each test that does not fail in a minute needs to run for a few hours to be taken as "probably good".
So it does not seem to be a size issue. My (failing) module is smaller in fw size and memory footprint than the working one. Maybe if too many modules are removed (as I do) the boot goes a bit faster and does not allow enough time for some startup settling of some signals?
It will be a while before I have a clearer picture, but right now I can run my wireless sensors with the known good fw. I am leaving two version running overnight now.
BTW, I enable/disable modules in app/include/user_modules.h.
cheers
[26 Apr update] Maybe someone is still interested... I was running many tests for a few days now. Tracking the dev branch I found that things worked later than the 20150311 release until the 18th, and stopped with this commit:
https://github.com/nodemcu/nodemcu-firm ... a78ff5f72eIt does not look like a size problem, I has larger and smaller images working or failing.
However, it does look like a timing issue though. At some point, to see what is going on, I enabled DEVELOP_VERSION in /app/include/user_config.h. The result was that
- it is very chatty [bad]
- the uart stays at 74880 (not 9600) [good]
- it does not crash [very good]
I then built HEAD of dev with similar results. Fails as is and works with DEVELOP_VERSION.
My latest tests adds a one line display at the start and one can see how it takes much longer to reach the app.
My current test program:
Code: Select allnow = tmr.now()/1000000
heap = node.heap()
count = collectgarbage("count")*1024
print (string.format("%.3f: used %d, heap %d", now, count, heap))
magic_pin = 1 -- gpio5, LOW on this pin will stop the program
gpio.mode (magic_pin, gpio.INPUT, gpio.PULLUP);
if 0 == gpio.read (magic_pin) then
print ("aborting by magic")
else
print ("will wake up in 2s\n")
node.dsleep(2*1000000, 4)
end
The display using HEAD of dev as is
and with debug enabled
More that 10 times slower. And a lot of heap lost, so I may not be able to use this hack to run my app (but I will try).
I suspect that the debug prints allows some timing to go "right". Maybe the flash speed measurement? Waiting for a gpio to settle? I am guessing.
Any help from the developers will be appreciated.cheers