Commit Graph

65 Commits

Author SHA1 Message Date
Johny Mattsson fe6289a6c2 Switch Lua input to event driven instead of polled.
The Lua input timer has been the thorn in the side which prevents a lot of
potential sleeping, unnecessarily.
2015-10-12 13:26:05 +11:00
Johny Mattsson 8bdde6e28d Sorted out linker scripts & options.
Now boots to Lua prompt, but promptly reboots itself before input.
2015-10-12 13:26:04 +11:00
Johny Mattsson cc220d9201 Moved TEXT_SECTION_ATTR macro to its own header. 2015-10-12 13:26:04 +11:00
Johny Mattsson dd38a0a0e6 Imported reworked rtctime support. 2015-07-10 16:16:25 +10:00
Johny Mattsson 2187424928 Imported RTC+sleep timekeeping from an internal DiUS project.
Added Lua module rtctime to interface with it.

This keeps as accurate time as is possible on the ESP8266, including across
deep sleeps (provided rtctime.dsleep() is used rather than node.dsleep()).
Intended to be used together with NTP for high accuracy time keeping. The
API is via rtctime.{get,set}timeofday(), working from Unix epoch.

Note that 160MHz CPU clock is not currently supported by the rtctime code,
as it is only aware of the 52MHz boot clock and the regular 80Mhz default
clock.

See rtctime.h for detailed info on how this all works.
2015-07-10 15:12:31 +10:00
Johny Mattsson b0f9788a6d Move constants to ROM. Frees up 16k+ of RAM.
Accessing 8bit and 16bit constants from ROM rather than RAM comes with a
performance cost, as these loads go through the load/store exception
vector. Any performance critical constants can be forced back into RAM
as RAM_CONST_ATTR.

The entry point has changed from call_user_start() to user_start_trampoline()
in order for the exception handler to be installed early enough.
2015-06-23 15:41:14 +10:00
Johny Mattsson 0c924e56c6 Support for loading sub-32 wide data from irom. 2015-06-23 15:41:14 +10:00
funshine 1c2ee75a00 fix mqtt, do a format when wrong flash size is detected 2015-04-03 00:51:02 +08:00
HuangRui 5c84359b5c ROM flash size can changed with detected size, fixed #283. 2015-03-16 05:40:43 +08:00
funshine 9b472a465b move nodemcu init stage after user_init(), rebuild bin 2015-01-23 13:25:54 +08:00
HuangRui 3c6ebea059 Use safe flash options. 2015-01-06 19:32:17 +08:00
funshine 7e51c5d67e replace SPIWrite with flash_write 2015-01-05 23:57:07 +08:00
funshine ff6e5e9924 build pre-build bin, auto save flash init data 2015-01-05 21:56:55 +08:00
HuangRui 715ff5b7aa NodeMCU firmware can auto detect flash size now. 2014-12-31 02:47:44 +08:00
funshine cdd13b1af3 source file first commit, folder structure refact 2014-12-22 19:35:05 +08:00