Commit Graph

108 Commits

Author SHA1 Message Date
Johny Mattsson 1965a12efc
Minor Lua fixes. (#3467)
Discovered over on the dev-esp32-idf4 branch.

- Off by one error in loadLFS, leading to slight memory leak and
  potential corruption.

- Insufficient return value check in loadLFS, where uzlib may return
  one of two success conditions, one of which would result in an
  out-of-bounds access and related pain.

- One case of a side effect within a lua_assert(), leading to
  silently broken LFS image handling when compiling without asserts
  enabled, the issue showing up as module names being shuffled around.

- Incorrect encoding of TValues in LFS when 64bit numbers in use.
2021-11-19 22:50:27 +01:00
Gregor Hartmann 4023df7e60
fix regression in luaL_typerror and Change NTest so it can run tests on the host emulating node.task.post (#3357)
* Change NTest so it can run tests on the host emulating node.task.post
* Add executing first host test
* Regression: fix luaL_typerror
2021-01-09 22:25:22 +01:00
M.K 9a26e0a94b
Makefiles: Validate LUA selection or refer to the other Makefile. (#3269) 2021-01-06 03:57:50 +01:00
Nathaniel Wesley Filardo b1d318de62
NFC: Backport luaL_testudata to Lua 5.1 (#3352)
And move luaL_checkudata to it, as in 5.3.
2020-12-24 08:39:08 +01:00
Gregor Hartmann ad8f82c6e2
fix search path for lua require (#3336) 2020-11-25 19:07:17 +00:00
Philip Gladstone f67792e0d3
Add support for using doubles in the LUA53 build. (#3225) 2020-11-07 22:38:40 +01:00
Philip Gladstone 606f91664b
First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
Terry Ellison a92da3c33c
Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
Terry Ellison 1f2e5bba4a
Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
Gregor cad576a23b fix build 2020-06-09 22:26:52 +02:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
sergio fd3f0ddad4 Add flag to disable start-up banner (#3026) 2020-06-09 22:26:52 +02:00
Matsievskiy S.V 1759ebb360 fix lfs upload issue 2020-06-09 22:26:06 +02:00
Terry Ellison 08426e48f1 Rebased against current dev, tweaks for clean compile 2020-06-09 22:26:06 +02:00
Terry Ellison 6d81dd6c0a Rebased against current dev 2020-06-09 22:26:06 +02:00
Terry Ellison ce2e50c651 Updates following JM review 2020-06-09 22:26:06 +02:00
Terry Ellison e7c29fe38e Lua 5.1 to 5.3 realignement phase 1 2020-06-09 22:26:06 +02:00
Terry Ellison 98c2c0520d
Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
Johny Mattsson f7a545b951
Evict c_types.h, tidy up a other c_prefixes. (#2841) 2019-07-23 14:22:38 +10:00
Johny Mattsson 526d21dab4 Major cleanup - c_whatever is finally history. (#2838)
The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
app/libc has now been cut down to the bare minimum overrides to shadow the 
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
but it's no worse than it has been before.

This enables our source files to compile successfully using the standard header files, 
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
memwhatever()s. These end up, through macro and linker magic, mapped to the 
appropriate SDK or ROM functions.
2019-07-22 00:58:21 +03:00
Terry Ellison d6980ad802
SDK 3.0 tranche3 (#2761)
Force libpp.a into iRAM, and backout redundant IRAM_DATA_ATTR changes
2019-05-19 14:38:23 +01:00
Terry Ellison f1b5dfc34e
SDK-3.0 tranche updates (#2757)
includes some dRAM -> iRAM optimisations
2019-05-17 13:04:19 +01:00
Terry Ellison 1990f95740
Updated ROTables 1st tranch (#2742)
Updated ROTables
2019-05-08 14:08:20 +03:00
Terry Ellison 9a47107920
SDK 3.0 release (#2692)
* Rebaseline firmware to non-OS SDK version 3.0
* Note that SDK version 3.0 introduces the concept of a Flash Partition Table(PT).  This is located at Flash offset 0x10000 in our firmware build.
* The firmware is now PT aware with both LFS and SPIFFS taking their partition size and location from the PT
* A new tool `tools/nodemcu-partition.py` is now used to initialise these data and can also download LFS and SPIFFS images to these partitions.
2019-04-05 16:01:45 +01:00
Terry Ellison 3f5ae99e42
Fix unaligned load/store exception in luaR_findentry (#2702) 2019-03-24 22:47:29 +00:00
Philip Gladstone a90de79c26 Minor fix to allow building of luac.cross.int (#2697)
* Minor fix to allow building of luac.cross.int
* Reapply some changes lost due to merge damage
2019-03-21 09:56:30 +01:00
ziggurat29 f801bf126d fixes #2677 minor syntax issues with some dummy variables that bracket the rodata section (#2678) 2019-02-23 20:49:30 +01:00
ziggurat29 62789da0bb added MSVC project configuration for host-side tools (#2665)
Added MSVC project configuration (@ziggurat29) and support of MinGW (@TerryE) for host-side`luac.cross` tool
2019-02-23 14:09:29 +00:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Arnim Läuger 09533fdf23 set default value for summary var to unbreak standalone builds (#2618) 2019-01-24 21:29:32 +01:00
Javier Peletier c6653b5921 fix number2integer conversion in ESP8266 for floating-point builds (#2609) 2019-01-15 13:00:37 +00:00
Arnim Läuger 031fd0a913 Reduce default make verbosity (#2583) 2018-12-09 21:39:43 +01:00
Terry Ellison 401fa56b86
Minor Luac fixes (#2579) 2018-12-03 21:41:50 +00:00
galjonsfigur d5aca39f48 Fix build problem with luac.cross when DEVELOPMENT_USE_GDB is used (#2569) 2018-11-23 18:02:07 +00:00
Terry Ellison 5f67de8d48
Optimise ROTable accesses and interface (#2505)
-  Optimise ROTable accesses and interface

This includes some refinements to the ROTable cache which remove the linker cludges on the CROSS_COMPILE builds.  Also keyhole tweaks to some of the Lua VM code to implrove runtimes.

I also noticed some compile time warnings during the build; the change to uz_unzip.c doesn't impact the compiled code, but does remove the compiler warnings.
2018-10-13 17:14:33 +03:00
Nathaniel Wesley Filardo 3c824d7a81 Cron fixes, part 2 (+) (#2515)
* Restore WRAPCC when building Lua
* Fix several parsing bugs
2018-10-10 17:36:00 +01:00
Terry Ellison 172fb276ca
Add compression to LFS images (#2448)
* Merge of LFS compress, optimize against current dev
* Fixes to LFS compress patch
2018-09-29 16:57:51 +03:00
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