Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LFS support for ESP32 NodeMCU #2801

Merged
merged 32 commits into from
Jul 22, 2019
Merged

LFS support for ESP32 NodeMCU #2801

merged 32 commits into from
Jul 22, 2019

Conversation

jmattsson
Copy link
Member

  • This PR is for the dev branch rather than for master.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • I have thoroughly tested my contribution.
  • The code changes are reflected in the documentation at docs/*.

This is a port of @TerryE's Lua Flash Store support (and an Lua VM resync) from the esp8266 branch done by my colleague @jasaw. By necessity it also includes the change to the module registration syntax, which blows out the size of this PR substantially.

Differences from the esp8266 version:

  • The LFS can be placed in one of two locations: in a partition, or permanently embedded into the firmware image. The latter is an advanced option for those needing to have the Lua bundled together with the NodeMCU firmware for OTA upgrade purposes ($work). The default is to use an LFS partition.
  • The default partition tables have a 64k LFS included by default.
  • The LFS is by default searched for an "init" module, before "init.lc" and "init.lua" is looked for in SPIFFS. This is both for consistency, and to facilitate fully contained firmware images.

Also included, naturally, is the new luac.cross compiler for building LFS images.

A small number of bugs in the LFS internals were corrected as part of this journey. Terry, I'd suggest doing a diff between the two lflash.c files - I believe a few things apply on the 8266 side as well. If I find time I'll try to do it for you and PR that branch too, but right now I suspect you're the one with time! ;)

There are undoubtedly things that could be made prettier, options to be added, etc. I believe this should however be a good starting point. With some luck we won't need to prettify too much before we've managed to join the 8266 and 32 trees :) At this point we haven't carried over the docs yet, as we haven't had time to check them for 8266-specifics.

We've tested this internally, but would love to have others give it a bash too before merge (though it should not have an impact when not used, other than the partition entry).

Oh, and Terry, I really wish you'd included a marker in the header for whether the debug fields were compiled in or not - that mismatch between host & esp was a near endless source of weird behaviour :(

@TerryE
Copy link
Collaborator

TerryE commented Jun 20, 2019

@jmattsson @jasaw, I will take a detailed look at this in a day or so. I am keen that we continue to converge the two architectural variants rather than diverge them. I also have a deeper understanding of the Lua VM now than when I started this journey, and I am using this to sort out some the worse botches introduced in the eLua patch original and the original NodeMCU port.

If you guys are actively working on the firmware, then I'd rather keep you in the loop than let you play catch-up.

Plus add static asserts to fail hard if we get this wrong in the future.
@jmattsson
Copy link
Member Author

Alright, I've added the necessary tweaks for this PR to build cleanly again after the IDF 3.3 upgrade over the weekend. I believe the alignment issue this uncovered could also be triggered on plain dev-esp32, so if this PR isn't about to get merged, we should get the last three commits here across separately.

Technically, we only need a single LONG(0) in there as we only check the
first field for null to determine the end-of-list, but better safe than
sorry. Arguably we should drop an end-of symbol and only iterate to that.
This snuck in from the esp8266 side it seems.
Due to the change in the LOCK_IN_SECTION macro, our system event callbacks
were, well, not called back.
@TerryE
Copy link
Collaborator

TerryE commented Jun 27, 2019

@jmattsson Johny, I find it hard to track the logic and rationale behind why DiUS is making some of these changes, as you don't seem to openly document this in any form off issue / whitepaper / design paper ahead of time. Part of this is clearly also my unfamiliarity with the constraints of how the ESP32 IDF integrates with all of this.

An example here is provisioning. On the ESP8266, I have fixed the location of the PT within the image, this allows me to use a post-link Python script to assemble the image from its components (the firmware, any SPIFFS and LFS images), and if necessary even move and resize the various partitions within the image. As part of this, the LFS image format was slightly changed to make compression more efficient and also to make it easy for a Python script to do LFS image relocation (see tools/nodemcu-partition.py).

Given this, I couldn't see any point in having the cross compiler support the -a option, as this is entirely redundant. I accept that I didn't get any input from DiUS, but I did go through the steps of publicly debating this before making this change. Now I see that the response on the ESP32 is to restore this functionality.

At the moment I feel that the two platforms seems to drifting apart because of our different drivers: I am trying to keep the ESP8266 variant have the fastest performance and maximum RAM and being able to work within a CloudBuilder / Docker environment really optimised for developers who do small scale development, whilst the ESP32 direction is primarily driven by the needs of DiUS. Surely we should be documenting and debating these non-functional drivers ahead of implementation so that we can converge the platform implementations rather than let them drift further apart?

If you do produce this sort of design documentation ahead of implementation, then I would be more than happy to review and discuss this even offline. If you want me to roll up the various issue debates into an aggregate architecture document that I will try to do that.

Time for Skype chat maybe? 😄

@TerryE
Copy link
Collaborator

TerryE commented Jun 27, 2019

  • The LFS can be placed in one of two locations: in a partition, or permanently embedded into the firmware image. The latter is an advanced option for those needing to have the Lua bundled together with the NodeMCU firmware for OTA upgrade purposes ($work). The default is to use an LFS partition.

The ESP8266 implementation already has this functionality, in that we have a Python script that can assemble an image and relocate / resize partitions and load the LFS and SPIFFS partitions with their respective image files. I am not sure what the drivers are for making the LFS image optionally embedded within the firmware partition. Perhaps you can explain the rationale?

  • The default partition tables have a 64k LFS included by default.

This default size is already a setting on user_config.h

  • The LFS is by default searched for an "init" module, before "init.lc" and "init.lua" is looked for in SPIFFS. This is both for consistency, and to facilitate fully contained firmware images.

Making the default LFS init script called init is a sensible suggestion, IMO. Again this isn't a change since this functionality is already facilitated by the LUA_INIT_STRING define in user_config.h

So from my PoV what we have really done is chose to reimplement three existing functions differently, and this just gives use more convergence work to do in the future. I am not saying that way these are implemented in the ESP8266 variant are better and perhpas we should move ESP8266 to the same implementation, but surely if this is the case then we should have to explicit reasons why the existing implementation is deficient and merits changing.

@jmattsson
Copy link
Member Author

On the ESP32, firmware images are both checksummed, and optionally signed (and encrypted). The IDF OTA support only handles application images. Thus, if you need to be able to distribute self-contained firmware (C & Lua), the LFS component must be linked into the application itself, before checksumming, or the system will not boot. This is an advanced use case, which is why the default is to look for the LFS in the designated partition, where you can employ the same approach as on the esp8266 - i.e. remote LFS upgrades only. I never got enough buy-in to PR the full OTA support we're using at DiUS, though it is available in one of the DiUS branches but doing full firmware upgrades on the 8266 is very much not straight forward and again an advanced use case.

I feel that we're talking past each other in many areas here Terry - on the ESP32 there is no such thing as a user_config.h, as all configuration is done through Kconfig (aka make menuconfig). If you have the time, please familiarise yourself with the IDF. Espressif has quite comprehensive documentation available. I am convinced it will make our conversations achieve more in fewer words :D

@devsaurus
Copy link
Member

That's a huge one :) Not sure how to review that...
As a first feedback - compilation of luac.cross fails for me:

/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
 # include <gnu/stubs-32.h>
           ^~~~~~~~~~~~~~~~
compilation terminated.

It seems that the build system tries to compile for 32bit but I only have x84_64 glibc headers installed. Guess I can pull in 32bit glibc, but why doesn't it compile for the native host architecture?

@jasaw
Copy link

jasaw commented Jul 4, 2019

@devsaurus There are pointers in the Proto struct. ESP32 expects those pointers to be 32-bits, which is why we have to compile luac.cross as 32-bit.

@TerryE
Copy link
Collaborator

TerryE commented Jul 4, 2019

@devsaurus There are pointers in the Proto struct. ESP32 expects those pointers to be 32-bits, which is why we have to compile luac.cross as 32-bit.

@jasaw, sorry but this is incorrect. I haven't looked at this part of your port, but the ESP8266 also uses a 32 bit size_t and luac.cross works fine in both 32 and 64 bit versions. It was designed to do this. That's what flashimg.c:flash copy() does. So I can't see the logic of backing this feature out.

I did suggest to Jonny that I am happy to chat on swap emails 1-1 if you needed any b/g context etc. My commits have my email addr and we can chat using Skype or WhatsApp if that works better for you.

Including updated otaupgrade registration.
The 32 and 64 bit builds generate identical outcomes; whatever prompted the
use of 32 bit builds must've been something else.
@jmattsson
Copy link
Member Author

The output from the 64bit and 32bit cross compilers is identical (save for the build timestamp). I've removed the forced 32bit build of it.

Also updated PR branch to build cleanly against latest dev-esp32.

Terry, I diffed the lobject.h you mentioned in email, but the only differences I see are the header includes and a couple of whitespaces compared to the dev branch. As far as I can see it's the latest here already?

@TerryE
Copy link
Collaborator

TerryE commented Jul 11, 2019

Terry, I diffed the lobject.h you mentioned in email

Aside from LFS, the big performance updates that I've made are:

  • The stripping out of the eLua crud in the ROTable` implementation and the lookaside cache. This gives 99%+ 1st probe hit and pretty much removes the O(N) overhead of using ROTables.
  • I profiled the unaligned exception overhead and hotspots. The big difference here was Philip's suggestion to move to -O2 as the ROM strXXX and memXXX routines are optimised for work-aligned fetches so long as both operands start on a word boundary and -O2 does this for string constants. There were a couple of byte fields in ROM-base GCObjects (TStrings and Protos) that were causing a lot of exceptions during GC. So the GET_BYTE_FN() uses dramatically reduce these -- these generate an extra instruction per fetch but remove the non-aligned exception.
  • I was pretty unhappy about the luac.cross make depending on a linker botch to build the master ROM table, to I did some tweaks to remove this nastiness.
  • Also the big source of full scans or ROTables is when the VM does a probe for metafields such as _index. So what I did was to require all tables with metafields to hoist these to the start of the table in collation order. Demoting the normal fields further down the tables isn't a performance issue because of the lookaside cache. I also optimised the access to roughly have the average ROTable access time.

But confession time, I started the lua53 stuff and forgot to publish the PR for these last two 😟 and because of all of the interdependencies, I decided to leave doing this one until later.

@jmattsson
Copy link
Member Author

Alrighty, if nobody yells loudly Real Soon(tm) I'm going to merge this to close the gap and prep for #2836. Definitely playing catchup on the '32 side, but one step at a time and we'll get there :D

We've been loving the LFS stuff here at $work. While not as necessary on the esp32, it's definitely allowed us to write Lua as if we were on a desktop rather than spending time trimming things to make them fit.

@jmattsson jmattsson merged commit eaac369 into nodemcu:dev-esp32 Jul 22, 2019
@jpeletier
Copy link
Contributor

Hi there @jmattsson
After this was merged, make fails with the attached log. If I go back to the previous commit 7cb61a27d20fef3b868e95817089ee71b5b753fc, make is succesful.

Issue: #2843

Error log:

CC build/lua/lzio.o
CC build/lua/lcode.o
CC build/lua/lfunc.o
CC build/lua/ldump.o
AR build/lua/liblua.a
make[2]: Leaving directory '/home/jm/src/nodemcu-firmware-esp32/build/lua'
make[2]: Entering directory '/home/jm/src/nodemcu-firmware-esp32/build/luac_cross'
make[3]: Entering directory '/home/jm/src/nodemcu-firmware-esp32/build/luac_cross'
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../base_nodemcu/linit.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../base_nodemcu/linit.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../uzlib/crc32.c
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../uzlib/uzlib_deflate.c
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lzio.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lzio.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lvm.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lvm.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lundump.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lundump.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltm.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltm.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltablib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltablib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltable.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltable.c:25:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstrlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstrlib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstring.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstring.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lrotable.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lrotable.c:4:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lparser.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lparser.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llimits.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.h:10,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/loadlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/loadlib.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmem.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmem.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmathlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmathlib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llex.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llex.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lgc.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lgc.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lfunc.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lfunc.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldump.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldump.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldo.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldo.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldblib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldblib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lcode.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lcode.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lbaselib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lbaselib.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lauxlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lauxlib.c:9:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lapi.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lapi.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/liolib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/liolib.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/print.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.h:10,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.h:11,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/print.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/loslib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/loslib.c:19:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/lflashimg.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llimits.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/lflashimg.c:17:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/luac.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/luac.c:18:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../base_nodemcu/linit.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../base_nodemcu/linit.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lzio.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lzio.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lvm.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lvm.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lundump.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lundump.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltm.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltm.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltablib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltablib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltable.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ltable.c:25:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstrlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstrlib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstring.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstring.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lrotable.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lrotable.c:4:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lparser.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lparser.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llimits.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.h:10,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lopcodes.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/loadlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/loadlib.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmem.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmem.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmathlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lmathlib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llex.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llex.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lgc.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lgc.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lfunc.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lfunc.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldump.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldump.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldo.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldo.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldblib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldblib.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lcode.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lcode.c:12:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lbaselib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lbaselib.c:13:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lauxlib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lauxlib.c:9:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lapi.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lapi.c:11:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/liolib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/liolib.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/print.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lstate.h:10,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/ldebug.h:11,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/print.c:16:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/loslib.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/loslib.c:19:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/lflashimg.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/llimits.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lobject.h:13,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/lflashimg.c:17:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[  dep] /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/luac.c
In file included from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/lua.h:18:0,
                 from /home/jm/src/nodemcu-firmware-esp32/components/luac_cross/luac.c:18:
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/../lua/luaconf.h:305:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** No rule to make target '/home/jm/src/nodemcu-firmware-esp32/build/luac_cross/luac.d', needed by 'build'.  Stop.
make[3]: Leaving directory '/home/jm/src/nodemcu-firmware-esp32/build/luac_cross'
/home/jm/src/nodemcu-firmware-esp32/components/luac_cross/component.mk:5: recipe for target 'build' failed
make[2]: *** [build] Error 2
make[2]: Leaving directory '/home/jm/src/nodemcu-firmware-esp32/build/luac_cross'
/home/jm/src/nodemcu-firmware-esp32/sdk/esp32-esp-idf/make/project.mk:552: recipe for target 'component-luac_cross-build' failed
make[1]: *** [component-luac_cross-build] Error 2
make[1]: Leaving directory '/home/jm/src/nodemcu-firmware-esp32'
Makefile:18: recipe for target 'all' failed
make: *** [all] Error 2

@nwf
Copy link
Member

nwf commented Jul 22, 2019

@jpeletier That looks like your host doesn't have the libreadline development headers installed?

@jmattsson
Copy link
Member Author

What @nwf said. Try a sudo apt-get install libreadline-dev, assuming you're on something debian/ubuntu-ish. The port of LFS support also brought in the improved cross compiler for the host, hence the new host dependency.

@o07sai
Copy link

o07sai commented Jul 23, 2019

@TerryE @jmattsson
Hi Terry Ellison, jmattsson
I found a bug! Then I wish you can help me!

after excute the command below
-- Configure advertisements of a short name "abcdefg"
bthci.adv.setdata(encoder.fromHex("080861626364656667"), function(err) print(err or "Ok!") end)

then excute
file.list()

at last, reboot!!! (sometimes, it's ok, try one more time.)
excuse my poor English! see the log :
lua: cannot open init.lua

Heap size::55008.
=node.heap()
=node.heap()
56008
_dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
_dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil

rc522.lua       : 15447 bytes
test            : 5 bytes
test100.lua     : 3301 bytes
test4.txt       : 9593 bytes
btpp.lua        : 418 bytes
test.bmp        : 276534 bytes
bmp.lua         : 1140 bytes
~~~File list END~~~
> r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
total: 2412361, used:312746
Total : 2412361 bytes
Used  : 312746 bytes
Remain: 2099615 bytes

> =node.heap()
=node.heap()
55384
> bthci.adv.setdata(encoder.fromHex("080861626364656667"), function(err) print(err or "Ok!") end)
bthci.adv.setdata(encoder.fromHex("080861626364656667"), function(err) print(err or "Ok!") end)
> Ok!
bthci.adv.enable(1, function(err) print(err or "Ok!") end)
bthci.adv.enable(1, function(err) print(err or "Ok!") end)
> Ok!
bthci.adv.enable(1, function(err) print(err or "Ok!") end)
bthci.adv.enable(1, function(err) print(err or "Ok!") end)
> Ok!
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
~~~File list START~~~
rc522.lua       : 15447 bytes
test            : 5 bytes
test100.lua     : 3301 bytes
test4.txt       : 9593 bytes
btpp.lua        : 418 bytes
test.bmp        : 276534 bytes
bmp.lua         : 1140 bytes
~~~File list END~~~
> r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
total: 2412361, used:312746
Total : 2412361 bytes
Used  : 312746 bytes
Remain: 2099615 bytes

>  _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
~~~File list START~~~
rc522.lua       : 15447 bytes
test            : 5 bytes
test100.lua     : 3301 bytes
test4.txt       : 9593 bytes
btpp.lua        : 418 bytes
test.bmp        : 276534 bytes
bmp.lua         : 1140 bytes
~~~File list END~~~
> r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
total: 2412361, used:312746
Total : 2412361 bytes
Used  : 312746 bytes
Remain: 2099615 bytes

>  _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
~~~File list START~~~
rc522.lua       : 15447 bytes
test            : 5 bytes
test100.lua     : 3301 bytes
test4.txt       : 9593 bytes
btpp.lua        : 418 bytes
test.bmp        : 276534 bytes
bmp.lua         : 1140 bytes
~~~File list END~~~
> r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
total: 2412361, used:312746
Total : 2412361 bytes
Used  : 312746 bytes
Remain: 2099615 bytes

>  _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
~~~File list START~~~
rc522.lua       : 15447 bytes
test            : 5 bytes
test100.lua     : 3301 bytes
test4.txt       : 9593 bytes
btpp.lua        : 418 bytes
test.bmp        : 276534 bytes
bmp.lua         : 1140 bytes
~~~File list END~~~
> r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
r,u,t=file.fsinfo() print("Total : "..t.." bytes\r\nUsed  : "..u.." bytes\r\nRemain: "..r.." bytes\r\n") r=nil u=nil t=nil
total: 2412361, used:312746
Total : 2412361 bytes
Used  : 312746 bytes
Remain: 2099615 bytes

>  _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
 _dir=function() local k,v,l print("~~~File ".."list START~~~") for k,v in pairs(file.list()) do l = string.format("%-15s",k) print(l.." : "..v.." bytes") end print("~~~File ".."list END~~~") end _dir() _dir=nil
~~~File list START~~~
�к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к? 0к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к?к??ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6084
load:0x40078000,len:8812
load:0x40080400,len:6392
entry 0x4008072c
�[0;33mW (172) boot: PRO CPU has been reset by WDT.�[0m
�[0;33mW (172) boot: WDT reset info: PRO CPU PC=0x400855ae�[0m
�[0;33mW (172) boot: WDT reset info: APP CPU PC=0x40092cce�[0m
�[0;32mI (178) boot: ESP-IDF v3.2-103-g4aa1058e8-dirty 2nd stage bootloader�[0m
�[0;32mI (185) boot: compile time 16:05:55�[0m
�[0;32mI (190) boot: Enabling RNG early entropy source...�[0m
�[0;32mI (195) boot: SPI Speed      : 40MHz�[0m
�[0;32mI (199) boot: SPI Mode       : DIO�[0m
�[0;32mI (203) boot: SPI Flash Size : 4MB�[0m
�[0;32mI (208) boot: Partition Table:�[0m
�[0;32mI (211) boot: ## Label            Usage          Type ST Offset   Length�[0m
�[0;32mI (219) boot:  0 nvs              WiFi data        01 02 00009000 00006000�[0m
�[0;32mI (226) boot:  1 phy_init         RF data          01 01 0000f000 00001000�[0m
�[0;32mI (234) boot:  2 factory          factory app      00 00 00010000 00180000�[0m
�[0;32mI (241) boot:  3 spiffs           unknown          c2 00 00190000 00270000�[0m
�[0;32mI (249) boot: End of partition table�[0m
�[0;32mI (253) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x42ea4 (274084) map�[0m
�[0;32mI (357) esp_image: segment 1: paddr=0x00052ecc vaddr=0x3ffbdb60 size=0x0282c ( 10284) load�[0m
�[0;32mI (361) esp_image: segment 2: paddr=0x00055700 vaddr=0x40080000 size=0x00400 (  1024) load�[0m
�[0;32mI (364) esp_image: segment 3: paddr=0x00055b08 vaddr=0x40080400 size=0x0a508 ( 42248) load�[0m
�[0;32mI (389) esp_image: segment 4: paddr=0x00060018 vaddr=0x400d0018 size=0xf5458 (1004632) map�[0m
�[0;32mI (738) esp_image: segment 5: paddr=0x00155478 vaddr=0x4008a908 size=0x1056c ( 66924) load�[0m
�[0;32mI (764) esp_image: segment 6: paddr=0x001659ec vaddr=0x400c0000 size=0x00064 (   100) load�[0m
�[0;32mI (780) boot: Loaded app from partition at offset 0x10000�[0m
�[0;32mI (780) boot: Disabling RNG early entropy source...�[0m
�[0;32mI (780) cpu_start: Pro cpu up.�[0m
�[0;32mI (784) cpu_start: Starting app cpu, entry point is 0x400814ac�[0m
�[0;32mI (0) cpu_start: App cpu up.�[0m
�[0;32mI (794) heap_init: Initializing. RAM available for dynamic allocation:�[0m
�[0;32mI (801) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM�[0m
�[0;32mI (807) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM�[0m
�[0;32mI (813) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM�[0m
�[0;32mI (819) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM�[0m
�[0;32mI (825) heap_init: At 3FFDA100 len 00005F00 (23 KiB): DRAM�[0m
�[0;32mI (832) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM�[0m
�[0;32mI (838) heap_init: At 3FFE4350 len 00013CB0 (79 KiB): D/IRAM�[0m
�[0;32mI (844) heap_init: At 4009AE74 len 0000518C (20 KiB): IRAM�[0m
�[0;32mI (850) cpu_start: Pro cpu start user code�[0m
�[0;32mI (196) esp_apptrace: Initialized TRAX on CPU0�[0m
�[0;32mI (198) cpu_start: Starting scheduler on PRO CPU.�[0m
�[0;32mI (28) esp_apptrace: Initialized TRAX on CPU1�[0m
�[0;32mI (0) cpu_start: Starting scheduler on APP CPU.�[0m

Mounting flash filesystem...
mount res: 0, 0
Task task_lua started.
�[0;32mI (725) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m
�[0;32mI (725) BTDM_INIT: BT controller compile version [74c9f57]�[0m
�[0;32mI (735) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m
�[0;32mI (805) phy: phy_version: 4008, 544f89f, Jan 24 2019, 14:54:06, 0, 0�[0m
I (1135) wifi: wifi driver task: 3ffe3b50, prio:23, stack:3584, core=1
I (1135) wifi: wifi firmware version: 2af77cc
I (1145) wifi: config NVS flash: enabled
I (1145) wifi: config nano formating: disabled
�[0;32mI (1145) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m
�[0;32mI (1155) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE�[0m
I (1195) wifi: Init dynamic tx buffer num: 32
I (1195) wifi: Init data frame dynamic rx buffer num: 32
I (1195) wifi: Init management frame dynamic rx buffer num: 32
I (1205) wifi: Init management short buffer num: 32
I (1205) wifi: Init static rx buffer size: 1600
I (1215) wifi: Init static rx buffer num: 10
I (1215) wifi: Init dynamic rx buffer num: 32
NodeMCU ESP32 build unspecified powered by Lua 5.1.4
lua: cannot open init.lua

chilipeppr added a commit to chilipeppr/nodemcu-firmware that referenced this pull request Jul 23, 2019
@o07sai
Copy link

o07sai commented Jul 23, 2019

@jmattsson @TerryE
After this was merged, when the esp32 running, got panic:
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:6520
load:0x40078000,len:11028
load:0x40080400,len:6692
entry 0x40080764
I (28) boot: ESP-IDF v3.3-beta3-97-g890a341db-dirty 2nd stage bootloader
I (28) boot: compile time 15:12:07
I (29) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed : 80MHz
I (39) boot: SPI Mode : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (51) boot: ## Label Usage Type ST Offset Length
I (58) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (73) boot: 2 factory factory app 00 00 00010000 00180000
I (80) boot: 3 lfs unknown c2 01 00190000 00010000
I (88) boot: 4 nodemcuspiffs unknown c2 00 001a0000 00070000
I (95) boot: End of partition table
I (99) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x34978 (215416) map
I (171) esp_image: segment 1: paddr=0x000449a0 vaddr=0x3ffbdb60 size=0x03270 ( 12912) load
I (176) esp_image: segment 2: paddr=0x00047c18 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /home/o07sai/nodemcu-firmware/sdk/esp32-esp-idf/components/freertos/xtensa_vectors.S:1779

I (178) esp_image: segment 3: paddr=0x00048020 vaddr=0x40080400 size=0x07ff0 ( 32752) load
I (198) esp_image: segment 4: paddr=0x00050018 vaddr=0x400d0018 size=0xe22cc (926412) map
0x400d0018: _flash_cache_start at ??:?

I (468) esp_image: segment 5: paddr=0x001322ec vaddr=0x400883f0 size=0x0e308 ( 58120) load
0x400883f0: write_txrate_power_offset at ??:?

I (489) esp_image: segment 6: paddr=0x001405fc vaddr=0x400c0000 size=0x0008c ( 140) load
I (502) boot: Loaded app from partition at offset 0x10000
I (502) boot: Disabling RNG early entropy source...
I (503) cpu_start: Pro cpu up.
I (506) cpu_start: Application information:
I (511) cpu_start: Project name: NodeMCU
I (516) cpu_start: App version: 1.4.0-master_20151229-735-geaac
I (523) cpu_start: Compile time: Jul 23 2019 15:12:08
I (529) cpu_start: ELF file SHA256: 25c6e226706b171d...
I (535) cpu_start: ESP-IDF: v3.3-beta3-97-g890a341db-dirty
I (542) cpu_start: Starting app cpu, entry point is 0x40081648
0x40081648: call_start_cpu1 at /home/o07sai/nodemcu-firmware/sdk/esp32-esp-idf/components/esp32/cpu_start.c:267

I (0) cpu_start: App cpu up.
I (553) heap_init: Initializing. RAM available for dynamic allocation:
Initializing mux 0x3ffe3794
I (562) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
Initializing mux 0x3ffe37c0
I (571) heap_init: At 3FFC75B0 len 00018A50 (98 KiB): DRAM
Initializing mux 0x3ffe37ec
I (579) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
Initializing mux 0x3ffe3818
I (588) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
Initializing mux 0x3ffe3844
I (597) heap_init: At 400966F8 len 00009908 (38 KiB): IRAM
I (603) cpu_start: Pro cpu start user code
Initializing mux 0x3ffaeacc
Initializing mux 0x3ffaeb30
Initializing mux 0x3ffaeb30
Recursive lock: count=1 last non-recursive lock esp_intr_alloc_intrstatus line 581, curr esp_intr_disable line 820
Recursive unlock: count=1 last locked esp_intr_alloc_intrstatus line 581, curr esp_intr_disable line 853
Initializing mux 0x3ffb1738
Initializing mux 0x3ffb1738
Initializing mux 0x3ffb17ac
Initializing mux 0x3ffb17ac
Initializing mux 0x3ffb1830
Initializing mux 0x3ffb1830
Initializing mux 0x3ffb1894
Initializing mux 0x3ffb18f8
Initializing mux 0x3ffb42d4
Initializing mux 0x3ffb7144
Initializing mux 0x3ffb7144
I (217) cpu_start: Starting scheduler on PRO CPU.
Initializing mux 0x3ffbdc10
Initializing mux 0x3ffbd494
I (0) cpu_start: Starting scheduler on APP CPU.
Initializing mux 0x3ffbd71c
Initializing mux 0x3ffbd780
Initializing mux 0x3ffc7e30
Initializing mux 0x3ffc827c
Initializing mux 0x3ffc8600
Initializing mux 0x3ffbd8c0
Recursive lock: count=1 last non-recursive lock esp_intr_alloc_intrstatus line 581, curr esp_intr_disable line 820
Recursive unlock: count=1 last locked esp_intr_alloc_intrstatus line 581, curr esp_intr_disable line 853
Initializing mux 0x3ffbda40
Initializing mux 0x3ffbda40
Initializing mux 0x3ffbc520
Initializing mux 0x3ffbc520
Mounting flash filesystem...
Formatting file system. Please wait...
Initializing mux 0x3ffbdaa4
Initializing mux 0x3ffbdaa4
mount res: -10025, -10025
Initializing mux 0x3ffbdaa4
Initializing mux 0x3ffbdaa4
Formatting: size 0x70000, addr 0x1a0000
Recursive lock: count=1 last non-recursive lock xTaskResumeAll line 2224T,i mceuorurt on mux! xlTaasstk Innocnrement-Trieccku rlsine lock xRecursiumeAllock: cou24, lrrt TaskRe xTaAllesune 22 linOwner4, cdcd couskI1
ERRORTick rtCPURel6aseMutex:ve lo0k3 countc1 la t nondy unloive lo
k xT non-rumeAli l unlock , curIncreskItTiem ltTic2 line urr u
Reck xTaskRnlock: l line 2298
loctialxTasg mux 0x3l lina4
line out on mux! lve locn-recurt=v lock xn-recucrementock xTase 2cre, ctTick linerior6, cusinherskIncrem412T
k line02cd2
RecursiveERRORck: cotCPUR leaseMucked xux kInffbmenc wak line dy unlockr x
skIncnon-reTick li unlock xRecuIncremlock: k line 2626, non-runlockvxTaock xorske 4191, ce lock: kInnt=1enast non-re 2492v
Reocksloc unloc_generit line 51, cked locskPnitritnersi lerit51i
e 4191lizing mTas0x3credb0tT
Initializ626
uxc0x3ffbdlock: imeout on muxnon-re non-re lock e lockncraskntTrem liTic2 line 2rr xTaskr creskPtTiri yDisi2her
Recur ive7unOwnk: cocdcd ount locERROR: skIncrPUReleick linx: mux x3ffbxTfc was ementTi u locked!
L
Recurs-recursk: coulock lasskIncreecursick link xT26, currityDisk hersk riori41Di,inherix askIn41em
tTiur ive lock2 cRecurs ve unlon-recuunt=e lock lock_inxTagenrioc linis5nheritr ine _in1, cureric linecre
ntTicklizing m26
ivimeout oTaskInclast nTick lursive lock rr xTInkInmenmenck line 2622492u
Recursivriorityk: coueri1 last 4ockedOwner Incred couick1l
was alive lounlockent=utex: ick 0i3f bdb6
lastnon-reccursiv unlock xTskPIncritentsink line 26e , c1, curlock xkInkPrmeniticksline 24 li
vReunlocke lockt=c lnt= ocked onaskPrisive losinloritiline ene1, curr T1, cucriRec51sni liene2ic6
veitiali count=x 0x3ffc9n-recursivalizin xTask0ncffcent8
cRecentTic liock: count=rr astskPrior xyDikInheeme liick4127e
Own6, cucdcx cokInc1
ERROick lirtCPURel
ascursive mux 0x3ffbt=fc was non-rdy unloe lock
xast noiorityDsive urit lineaskI1, cmentxickkIine 26nt,ick linnlock x
askPriive unisinherou t=n last locked sivskPrior counti4hlast non-recursive r xTalocncrnitntTnek line e 26,
cucursive loit_genunt= line 51o
-recializi lock Tx3fInc32cenInick lineng mux cx3ffxT32cIncreeout onk linel2st nonecursisive lock: counIn1 last Tick linTaskI6, cuentxTck line 262Disinhr xt linsERROR:ck: coCPURe easeMutn-recux ix3ffbck x wakIncready unck line
626, con-recurkIncrenlock xT lkInc2eme
Recursive 2626,k: counnl1ck st loPriorxTaDisrioeriyDisinh419t line 4191, lock: coskIn5 lasttTick ecursive6lock ursivinit_ge count=ine 51, cu-recursiveit_genxTic line 5e
Tick alizing 6, c0r3fxT939I
fRecu0siTimeoutck: cox! la t non-rcked xve lockremeskIickemine 26k line 26xT, cIncrxTantTrio linDisin6
cERROR: lock CPURelecremenex: mux 0x32fbd, curr alreadcremencked!
Last non-
Recusive uunlock: askInc1 lantTickked e 26kP, orityDnlock xTt linio4ity, cinhexiTRecursie 2626
Recunt=ve locknon-rec=r lae lock-locursive_generxT liInc5ementrr k li_in2t_g, cuic line 5n
ementTlizing mux 0x3
Rc93f4i
dTxmeout crement last non 2626, ive lockskInskImenemickTline 262626Re,ursive lockPriornt=1isist non-rene 4127
kERROR: v26, cuUReleaseIncrem mux ck ffbdb2c wa
Recurady unllock:
Last on-recucked unskPrixTityIncinmenit line 4192, curruxr unlocrexTntTPri linyDisi6
:Rcount=ve lot non-unt=rsive loon-recurIncremock lck line 262neric r xTa51I curr loTicinit_ge24ri
eInitock: cog mux last c9458d
xTasializimentTic0x3ffc 4586
Tiurr xTan mux!ementTnon recursiv6 lock xTive locementTnt= ine 26on,recursive kntTick vPortCP2ReRecursitex: mock0x3ffnt=1c wst loceady unlocriori
yDit non-rt linev4191,ock xTxTkInIncmenenickcl le 2626, curr unlive lock: riority lasnheritrecurs4ve loRk xTasve lockentTict line 262o, recursivskIncr meck_icktline 24c liRec51, ve unlock_init_g=neric llock51
TaskInlizingtTick0x3ff 94b6,
Iurr xTizing meme0x3fck line 2imeouR on muxe lock non-rt=u live loc-recursincremiOwner 2xine 26nt, ck line 26PriorityDxTinhInct lintT4ck
Recursint unlERROR:ount=tCPURellockedtxx: muxcremenbdbck wine 26ea,y unlockask
cremenon-recurse 2626
RecuTaskIncock: cTick l ne 262o, recursilock ck xTPriPrityDtyDnhenhe line 4194
1, ursive lskIncrount=9ila t non-re2urRecursock unlo_init_gnt=1icast lo5k, urr lPri_intyDgennhic line 514
iRecurs vx3ffc9: counim1out on on-recast no lock xsive lcremxntTkIn linentTi6, curr 26as, ncremxTaTicriorit Dis2
Recursive u127c
ERRORIncremtCPUReleasne 262:, cx rx3ffskIfc was alick liunlocked
ecust nonlock: cive unlock xTon-recrement lock ine 26ri,rityDiunlock xTaskPr419ityDisi hersk ncrem41tT
k lursive lo
Recuount=10 lack: co-recu live locked ck_skPt_gritricsinne it, cne 4l91, curt_genskIc linen5T
counia1izing non-0e3frsive l
Ti xTaskon mux!ntTicknon-recu26, culock xskIkInememenickckine 2426
Recurs ve unloiorityunt=1heast locked x7
tLast necursiursive nlock xTariIncisientritkline 41916 curr unlockcxemekPrickitine 24he
Recursive unlRck: cove lo k: counck11 lastkPrioricursivnherit link_4nit, cnerix likIn5rementr ck line 262en
ric lsive51
Initiant=i g mux 0x3ffcursive lotializinIncrem0ntTfck lin
Tim26, cun mux! lIncremn-recursivne 249
RekIncrem unlock linen2=26, curloxked xTiorIncDimenherck line 2127,
curr 0xsdcdcrount 1icERRORe 2626
ReceleaseMlock: mux 0x1ffbst non-realready lock keas
xRecurrioritock: cherit12 ne t191, cecursivekIncremoctTinit_gene26c liRe u1, currolo: count_1elast non-e c1rsInitlock xng mux 0x3ent964k line ializing r xT0x3fncr64cntTice li on mux!
Recurnon-renlock: lock xTaskInlockedtTicskIncre26nt,ick line 262riority isiskIriteline ick7l
nen2r 0x
uLast nskIncrursive ck lin xTas2-recutex: mloc0x3ffskIfc was aTick l unlocked!
RecurntTicknlock: c26, cu r unloocked skPskPritritsinsinit line 4194
1, cusive locIncremet=Ti last n 2626c
Recurslock ockk_initt=eneric non-r5c, sive lock_inaskgenremc liick51i
e 262a, zing muxs0x3cre96bt
In tializin2 mRec0x3ffe unlo
Timcount=n muxt lock non-recIncremelock xTaskIn26em,ntTick laskI2cre, ctTicxTaskPr26ri
Disirsive locke c127t
2LaRecurs-recursock: clock x askIncocked xTck line 262Disinhe unlock Tas1, curitxDiskIherem ntTic4191n
Recurs
vecursi: count:14 lat= ln-recun-recurock loc_initskInerem ntTic51, curr lo, cinitxgenkInc linnt5i
linializingRecur0i3e unlo4k: couiali lng muxc0x3fxc97kI
TimeotTick mux! las6, currecursivecremenxTickInine 26tT
kOwnermentTid count 2=1 last nyDisinursive loc xTa
fRecursivs alreck: couocke l mux 492
Last ned recurPriorinlock xTariIncree n191c lrr x2ask, crementTock line 26io
tyDirsive it lineo41911
Recu non-rlock: ce loc1 TaskInon-rectTick llock l26, curr_genskic linentTick line 249i
ementTili ing mux 0, cuc97x8
TimeoumentTiux last no6-rRcursivve loc xTaskIt=rement non-recu 2626, ock xxTakInriomenyDick line 26in, cur7 xTwner 0xemcd count ineERROR: RecursPURelelock: cx: mux lx3ffbdcked as alrrioritylockede
t line 419e, rsive unskIncxemekInickmline 26 li
e cursive lo unlocunx=askPrionon-recinheri lck x41sk
cremesive lockne 2626= currsx non-rcremenve lock ne 249n
Recneric unlo5k, count=ock_in lockeeric line 5e
ntTica liing mux 0x3ffcx7dckIInrementzing mux 0x626c9Recu
Tive locon mux!t=a t non-rn-recuve lockock xkInkInmenmenck line 2622,26, curr xTarionctyDentnhek line 2 912
R
kLast non26eeCPUReleancremen: mux 0x3ff2dbf, curr lreadyncremened!
urcursivnlock x countc1elast nok liner2ive lock uaskPrioTatyDrionheyDi liher4t line 419x
skInrsive tTick lount=49 l
aInitirementg mux 0x3ffc96last loenerixTaskP i1, cyDisloherin t_gen41ic line 5x
eIursive zing mcou0x31 las40n
Timecursin mux!k xTaskon-recentTicklock x26sk,ncremexTTicIncrem ntT6, curr 249k
aOwnerckecdcd councr1meERTick lPortCPUReleurr xTax: muxementTbdb line 2alreaRe unloce loc
: co non- ecursion-recuck xTalock xemekPrickiline 26he,it linun4191, cuskPxiorkInDiemeheric linne4291
Reursivee unloccount=18 last nolockedrxTve lockrltyD_innhegen lic l41915 , cr xTlocIncniteneneck ine 2516
Recursizing ck: 0o3ft=98a4s
non-alizingve lo0k3xTc98In
TimntTick mux! la6, cur-recursincremen xickkInne 24nt
iOwner 0xc626 courr xnt=1rlast lDisinhxTit line 4ent
ERRncremeortCPURelee 2626
iLast nk -recurrioritnlock xTaitIline ent1, curr e 2skI, cementTioc ine 24ri
1Reast loc lock: coPrio19tyast nonrit lisiv419o, currk_inskIgenemic line 51, curIIcrementzing mux 0x326, currIni non-ring muxe0x3ffcxT08
TTaskIn on muxTick l non-recu
EReOR: vPo lock:eleaseMutex: non0r3fursive loc axready iorityDd!inLast non-r cu91, curnlock xTncrIncntTent line 2ne 2
yRecinheri lik: 419n, cu r xTaskn-recuentTickock e 26_i
aInitirementT mux ix3f2c99, cnoit_genrsive lock x
rr xTasizing ment0x3f li96c
Tim
Recuon mux!nlock:non-re=1rsive locked xTkInIncmenentck l ne 2626, curr r xTaPrin2ReyDntTnhk line ne 6
lERROR:n-recuCPUReleock xTex: mure0x3tTidb lines already u xTaskd!creast nonk lines2ve unlecursivekIncrek: counk 1ine 26lo, ed r unlPrioxTayDiriohetyD linhe41t line 41x1
kIncrsive lock linunt=26
rInitiaIncrememux ck lfc9920 nit_gecursive lo k xTcurr loemeinTicgeneri 2626, 5u
last out on mTaskInct non-Tick live lock xTarr xTrekIntTime tTick li6, curr
Tasursive tyDisicount= linet4127-
unlockeivecd counsk2ncERmentTiPo tCPURele6, currx: mux ncrembdbTi was ne 2492
unlocnon-rect=s ve unlocked xskIkPremeityicsinhee 2 line 4191unlock xTaskPncrritntTsin lint line
RecurRive loce locknt=o nt=22 lastecursiecursik xTask ncrk_intT_gk liic line 51, curralkIn_inmengenck l ne 2451
kRecremene lock: co 2621 last on-recuioritylock xTritIline ent7
Ownere 2626d curr T
aLastiorityDcursivrit link 419skIncre entskIk linentTi6, curr 2626c
cRrsive ve lock:skIncr=m3 lasck linrecursive lr xTlokIninimeneneck lne 2512
Rer rsive nit_ge: count=ne a1t Iniked xTing muxe0x3tTi9a li
e 2626lizing xTas0x3frema98Tick eout on 6ux! lastive loccursivnt=o k xTason-recuentTicl lk xT2skI, cemenxTickPline 26Di,inherix askIn41em
tTick 0xne 2 92u
rERROR: lock: PUReleaseMutelocked xTaskbdbre wntTickeady unl26, cur
xst noncrementive unloc 2626skRecurmentTioc : count=1,last nunlock rTaskPrick x line 4191 lock: cTaskI24rlast nock linrsive loRecursive it_gen: count=e l1, currklo k_iskP_goririciline ri
line 4191ing mu x0x3kIn9afm
0e3ursivecloTimeoutnt= mux! laon-rec-recurslock xck xInckInentmenk line 2ne 2626,r xTaskTacreriotTiyD sinhe24t linec4127v
uner 0x dcd count st ERROR: xTaskCPURelentTickex: mux 0x3ffbdb c wakIncready unlk line
626t
necursiursive : coun x1 last nementTursive lock2x, ckPrioriock xinhkPrt linyD4sieRecuTick llock: cou
Re25 sive uon-rec count=lock tock_ini geskPic line isinherit lin_i4it, curic lineInc
mentTili ing mux 0
fecursiv
RTaskPrie unloisinheunt line 4127e lock xurr xTcreInctTien lick line 24ur
Owner 0xIncd counTi1k
tLa l non-rn-recuve unloock TasskPcrerittTisi herit li6, 4191 unloc xxTskIPrremityTicinheri 492e
4ecursRve unloe lockunt=unt=26 lasted n-recPriori lock loeriinit_ge419ic linr 51ne c1rsGuru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4009537e PS : 0x00060a33 A0 : 0x80083177 A1 : 0x3ffae280
0x4009537e: multi_heap_internal_lock at /home/o07sai/nodemcu-firmware/sdk/esp32-esp-idf/components/heap/multi_heap.c:700
(inlined by) multi_heap_malloc_impl at /home/o07sai/nodemcu-firmware/sdk/esp32-esp-idf/components/heap/multi_heap.c:416

A2 : 0x00000018 A3 : 0x00000060 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x3ffaea00 A11 : 0x00000004 A12 : 0x00000000 A13 : 0xb33fffff
A14 : 0x00000001 A15 : 0x00060823 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000018 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

ELF file SHA256: 25c6e226706b171ddad237c0b448eb1ef94e2e275bcdac55378b647d7738e928

Backtrace:
Stack smashing protect failure!
When I choose the module bthci, the esp32 was reset all the time!
I have not your email, If you want the sdkconfig file, you can send an email to me. o07sai@163.com
Thanks!!!

@jpeletier
Copy link
Contributor

@nwf @jmattsson Thanks! This fixed the issue.
I opened a PR updating the docs to reflect required libraries to build dev-esp32: #2844

@devsaurus
Copy link
Member

@o07sai if you suspect a stack problem then increase the stacksize
make menuconfig → Component config → ESP32-specific → Main task stack size

If the problem persists then please open a new issue with steps to reproduce (sdkconfig, Lua code, etc.).

@o07sai
Copy link

o07sai commented Jul 24, 2019

@devsaurus Thank you. The problem has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants