Commit Graph

71 Commits

Author SHA1 Message Date
Terry Ellison 94abbe70cb
Fix #2430 node.input() not working (#2469) 2018-08-27 12:46:51 +01:00
Gregor Hartmann 91656c3d76 create luac.cross.{integer|float} (#2450)
Use separate names for the integer and float  `luac.cross` binaries.  Also adds local/lua directory which is already supported by tools makefile to build LFS image.
2018-08-11 18:28:01 +01:00
Nathaniel Wesley Filardo a57fe552e8 app/lua/luac_cross: WRAPCC CC here, too (#2453)
Not that Lua takes very long to compile, but allowing for ccache here
should still help the builder(s) consume a little less time and power.
2018-08-11 13:50:12 +02:00
TerryE 7956a47bb4 Add Cygwin support for app/lua/luac_cross make and spiffsimg 2018-07-04 15:31:15 +01:00
TerryE 4f21224d56 LFS patch updates following review II and testing 2018-06-22 22:29:16 +01:00
TerryE 4f7af452a8 corrections to dev merge 2018-04-20 02:34:52 +01:00
Terry Ellison 6db7414270
Merge branch 'dev' into dev-LFS 2018-04-19 16:43:55 +01:00
TerryE 88bd9e01d3 LFS patch updates following review 2018-04-19 16:27:47 +01:00
Johny Mattsson 085f35da73 Tie in the EGC with the SDK's heap knowledge. (#2319)
Added `node.egc.meminfo()` to expose LVM usage (to make the regular
`node.egc.ON_MEM_LIMIT` option usable).

Extended the `node.egc.ON_MEM_LIMIT` option to also take negative limits,
in which case that's taken as a request to keep a certain amount of heap
available for non-Lua use.
2018-04-06 14:52:03 +02:00
TerryE d78c54accd Fix Lua stack corruption problem 2018-03-26 03:44:10 +01:00
TerryE 4ae52c232c Alpha working wersion for third party evaluation 2018-03-17 00:43:52 +00:00
TerryE e00d927a02 Tweaks to the Remote GDB interface to make it usable 2018-03-17 00:43:52 +00:00
TerryE 4141e69003 Move luac.cross build into standard make hierarchy 2018-03-17 00:43:52 +00:00
Johny Mattsson 452778eda8 Fix batch multi-line UART input discarding all but first line (#2217)
* Only load a single non-empty line from the uart at a time.

* Don't fall behind in processing of uart buffer.
2018-01-04 22:50:39 +01:00
Philip Gladstone feab8b2208 Various minor bits of cleanup (#1647)
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
*  Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
2016-12-25 10:45:34 +11:00
Philip Gladstone ebb537c502 Version of printf that doesn't suffer from buffer overflows (#1564) 2016-10-27 09:38:47 +03:00
Philip Gladstone f9533ed85a Reduced LUAL_BUFFERSIZE to 256. Should free up some stack (#1530) 2016-10-16 21:18:03 +09:00
Arnim Läuger ecf8bd98d6 Add FatFs and SD card support (#1397)
* Add FatFs
* enable BUILD_FATFS for all-module build
* push vfs into rest of firmware
* align maximum filename length
* increase timeout for acmd41 during card initialization
* switch from DOS to Unix path semantics chdrive() is substituted by chdir()
* update to fatfs R.012a incl. patches 1-6
* add callback for rtc provisioning in file
* update docs
2016-09-05 20:17:13 +02:00
Philip Gladstone 99cd2177bb Make struct.unpack wrapped in setlist actually work (#1486)
Fixes #1434.
2016-09-05 11:16:27 +10:00
philip 84487d300b Remove unusedcode 2016-03-20 12:54:16 -04:00
TerryE 76ff541244 Prevent UART input race without extra lua_started flag 2016-03-11 00:41:40 +00:00
TerryE 46ea2aa42e Make the wifi.smart functions options and remove wofs and upgrade
AFAIK no one uses the wifi.startsmart() and wifi.stopsmart().  Removing
them frees up an extra 20-25K of Flash to use as filesystem.  So I have
added a new config define WIFI_SMART_ENABLE which is enabled by default
so the default functionality is the same, but if this is commented out
then this code is omitted.

I have also removed wofs and upgrade from this build as we no longer
support these.
2016-02-26 17:23:38 +00:00
devsaurus f149b60c7f enable -std=gnu11 for lua dir 2016-01-24 00:02:27 +01:00
Johny Mattsson a6c0873a28 Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
Terry Ellison 1462d00e9f Merge pull request #842 from jmattsson/module-ltr-cleanup
Cleanup: LTR module registration
2015-12-19 23:22:18 +00:00
Johny Mattsson 4e8ef87d03 Reworked module registration, removed modules.h
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a

  NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);

line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
2015-12-16 16:09:16 +11:00
Terry Ellison 0386ae6559 Merge pull request #804 from DiUS/panic
Do not allow execution to continue after a PANIC
2015-12-12 15:36:00 +00:00
Johny Mattsson 6b6456be47 Major cleanup of module registration.
As per #810 & #796, only LUA_OPTIMIZE_MEMORY=2 & MIN_OPT_LEVEL=2 are
supported when building. This commit effects that limitation.

With this change modules/auxmods.h no longer needs to be updated for
every new module, nor do module writers need to cater for a hypothetical
LUA_OPTIMIZE_MEMORY < 2 scenario.
2015-12-12 15:03:40 +11:00
Nick Andrew e9ee9a57d1 Remove the lobject.c:88 assertion failures
When lua assertions are enabled, normal operation results in many:

lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)

It comes from using the pvalue() macro for 3 pointer types, where
pvalue() also checks the type of pointer and complains through the
assertion where the type == 4 (TLIGHTUSERDATA).

Use the correct macro according to the type of data being compared
to eliminate this assertion error.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-12-06 01:42:29 +11:00
TerryE e71a2dd64a Fix ECG case in concat where stack top not recalculated 2015-12-03 19:16:30 +00:00
Johny Mattsson 0fbf442158 Do not allow execution to continue after a PANIC!
It really does not improve things...
2015-12-01 18:11:38 +11:00
devsaurus 1c2fad5330 re-add detection of CR as newline 2015-11-22 13:00:40 +01:00
devsaurus 69f3a6f177 skip CR in interactive mode 2015-11-18 22:07:53 +01:00
TerryE 83d06b667d Port of strip debug patch to the SDK 1.4-baseline dev 2015-11-08 23:46:08 +00:00
TerryE 0beee5c1ae Minor tweaks to luac.cross for SDK 1.4 support
plus Add extra logic to handle different loci path in luac.cross
for handling 32 bit or great hex integers Also add a helpfull hint in the
build tool to point out the Lua and lfs depencencies.
2015-11-03 22:45:43 +00:00
TerryE 307323d1ff Add luac.cross capability to nodeMCU 2015-11-03 21:37:14 +00:00
TerryE a08626d84f Add minimum debug library providing traceback() and getregistry() functions 2015-11-03 21:34:42 +00:00
Johny Mattsson bf8ed500bf Moved node.key() & node.led() support into node module.
It was piggybacking on the Lua readline timer which no longer exists.

Also cleaned up injection of Lua commands via CoAP & node.input().
2015-10-12 13:26:05 +11:00
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 21c4e11020 Enable dynamic build dates, plus print SDK version. 2015-10-12 13:26:05 +11:00
HuangRui 71469dd70f Merge branch 'dev' of https://github.com/nodemcu/nodemcu-firmware
Conflicts:
	app/include/user_version.h
	app/modules/node.c
	app/modules/wifi.c
2015-05-15 08:13:46 +08:00
cal 06193090e6 LUAL_BUFFERSIZE back to 1K and warning notice added 2015-04-05 16:14:52 +02:00
funshine d5731dd9bd merge from dev 2015-03-20 20:15:38 +08:00
devsaurus 3124bcf357 Merge remote-tracking branch 'upstream/dev' into dev 2015-03-15 22:06:30 +01:00
Vowstar e3c31d0629 Merge pull request #280 from nodemcu/master
Merge master to dev096.
2015-03-15 20:04:55 +08:00
funshine f510e658d5 merge master solve conflicts 2015-03-15 15:01:07 +08:00
Erant 0a4049767a Fix getFSF to abide by the function contract 2015-03-14 09:00:25 -07:00
devsaurus 76a499313f Merge remote-tracking branch 'upstream/dev' into dev 2015-03-07 21:54:37 +01:00
funshine 8369f74bd0 comment out math.fmod to reduce code size 2015-03-06 17:00:37 +08:00
funshine 13b08cdacf add macro to control built-in lib for lua, add libm.a 2015-03-06 15:55:24 +08:00