ESP8266 (Where is Lua used?)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ESP8266 (Where is Lua used?)

Roberto Waltman-3
The ESP8266 module is a low-cost wifi interface for "The Internet Of
Things."
(Sorry, neologisms like these make me sneeze...)

These guys replaced the '8266 original built-in firmware with Lua, to
convert it into a stand alone IP sensor.
Here:
http://importhack.wordpress.com/2014/11/22/how-to-use-ep8266-esp-01-as-a-sensor-web-client/

--
Roberto Waltman

Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

Paul E. Merrell, J.D.
On Sun, Nov 23, 2014 at 10:28 PM, Roberto Waltman <[hidden email]> wrote:

> These guys replaced the '8266 original built-in firmware with Lua, to
> convert it into a stand alone IP sensor.
> Here:
> http://importhack.wordpress.com/2014/11/22/how-to-use-ep8266-esp-01-as-a-sensor-web-client/

That has to be eLua rather than Lua. Lua requires an operating system
(but can be compiled and run on any known platform). eLua will boot on
microprocessor's bare metal. The two are very closely related and
share a lot of code, but are quite different because eLua runs on bare
metal. E.g., eLua requires its own add-on modules and can't use the
standard Lua's modules. See <http://www.eluaproject.net/>.

Best regards,

Paul

Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

Enrico Colombini
On 24/11/2014 9.26, Paul Merrell wrote:
> That has to be eLua rather than Lua. Lua requires an operating system
> (but can be compiled and run on any known platform).

eLua is very convenient, but running Lua on bare metal with only minor
changes is quite possible; many of us did that. Of course you have to
provide an allocator and I/O functions (adapting modules requires work
and may or may not pose additional problems).

--
   Enrico

Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

Jerome Vuarand
In reply to this post by Paul E. Merrell, J.D.
2014-11-24 8:26 GMT+00:00 Paul Merrell <[hidden email]>:
> That has to be eLua rather than Lua. Lua requires an operating system
> (but can be compiled and run on any known platform).

This is not true. You can compile Lua for an embedded target without
an operating system. All you need is a standard C library, which many
if not all modern microcontroller toolchains provide. What eLua adds
on top of Lua is some microcontroller-oriented libraries, and specific
build configurations and patches so that Lua runs better on some
specific platforms. I'm not trying to minimize the work involved in
eLua, just fixing a mistake.

So this project might run eLua, or it might simply compile the
standard Lua in an appropriate way for the ESP8266 processor. It's
hard to tell because the firmware on nodemcu's Github is actually a
binary image, I can't find the source code (which by itself feels a
little suspicious to me).

Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

Paul E. Merrell, J.D.
On Mon, Nov 24, 2014 at 3:15 AM, Jerome Vuarand
<[hidden email]> wrote:

> This is not true. You can compile Lua for an embedded target without
> an operating system. All you need is a standard C library, which many
> if not all modern microcontroller toolchains provide. What eLua adds
> on top of Lua is some microcontroller-oriented libraries, and specific
> build configurations and patches so that Lua runs better on some
> specific platforms. I'm not trying to minimize the work involved in
> eLua, just fixing a mistake.
>
> So this project might run eLua, or it might simply compile the
> standard Lua in an appropriate way for the ESP8266 processor. It's
> hard to tell because the firmware on nodemcu's Github is actually a
> binary image, I can't find the source code (which by itself feels a
> little suspicious to me).

Thanks for the education!

Best regards,

Paul


--
[Notice not included in the above original message:  The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]

Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

BogdanM
Hmmm. This makes me wonder if eLua shouold be ported to this thing. I don't know if it'd be necessarily better, but at least it'd be open source. I'm certainly tempted.

On Mon, Nov 24, 2014 at 12:15 PM, Paul Merrell <[hidden email]> wrote:
On Mon, Nov 24, 2014 at 3:15 AM, Jerome Vuarand
<[hidden email]> wrote:

> This is not true. You can compile Lua for an embedded target without
> an operating system. All you need is a standard C library, which many
> if not all modern microcontroller toolchains provide. What eLua adds
> on top of Lua is some microcontroller-oriented libraries, and specific
> build configurations and patches so that Lua runs better on some
> specific platforms. I'm not trying to minimize the work involved in
> eLua, just fixing a mistake.
>
> So this project might run eLua, or it might simply compile the
> standard Lua in an appropriate way for the ESP8266 processor. It's
> hard to tell because the firmware on nodemcu's Github is actually a
> binary image, I can't find the source code (which by itself feels a
> little suspicious to me).

Thanks for the education!

Best regards,

Paul


--
[Notice not included in the above original message:  The U.S. National
Security Agency neither confirms nor denies that it intercepted this
message.]


Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

KHMan
In reply to this post by Jerome Vuarand
On 11/24/2014 7:15 PM, Jerome Vuarand wrote:

> 2014-11-24 8:26 GMT+00:00 Paul Merrell:
>> That has to be eLua rather than Lua. Lua requires an operating system
>> (but can be compiled and run on any known platform).
>
> This is not true. You can compile Lua for an embedded target without
> an operating system. All you need is a standard C library, which many
> if not all modern microcontroller toolchains provide. What eLua adds
> on top of Lua is some microcontroller-oriented libraries, and specific
> build configurations and patches so that Lua runs better on some
> specific platforms. I'm not trying to minimize the work involved in
> eLua, just fixing a mistake.
>
> So this project might run eLua, or it might simply compile the
> standard Lua in an appropriate way for the ESP8266 processor. It's
> hard to tell because the firmware on nodemcu's Github is actually a
> binary image, I can't find the source code (which by itself feels a
> little suspicious to me).

A recent enthusiast group is [1], they have been making themselves
known amongst hardware blogs lately, this are mostly Western or
English speakers who want to hack the ESP8266. ESP8266 looks very
hackable, 1 or 2 years down the road I'm sure we'll see a lot of
amazing stuff...

Linked board/module page is from ElectroDragon's wiki [2]. I have
sourced stuff from them often, they do put quite a bit of effort
into their wiki pages, compared to many other vendors.

It looks like there is 248KB Flash space for user application. [1]
says it uses a 80MHz Tensilica Xtensa LX3, and has blocks of 32KB
and 80KB RAM.

[3] Claims Lua 5.1.4. Given the Tensilica and SDK availability, I
suppose it's standard Lua 5.1.4. The developer is probably
Chinese, there is a Tencent QQ group at the end of the firmware
page [1]. Doesn't look like open source to me, but it's not a
problem since there is an SDK and gcc available (see [2]).

[1] http://www.esp8266.com/
[2] http://www.electrodragon.com/w/Wi07c
[3] https://github.com/nodemcu/nodemcu-firmware

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


Reply | Threaded
Open this post in threaded view
|

Re: ESP8266 (Where is Lua used?)

scargill
This post was updated on .
In reply to this post by Roberto Waltman-3
If I may update you here, the author is indeed China, this is not a commercial project (not for now anyway) and the software still has issues - i.e. memory issues and it it not (again for now) open source - but then if you look at the other attempts which are - they don't work that well yet. It is not a complete implementation of LUA but a subset. RAM at this point is a big issue with only a few K to work with. However code is stored in FLASH and it is possible therefore to boot up into LUA and into your own routines. I've made a simple TCP/IP listener and that works aside from a slow memory loss which is being looked at now.

Having tried all the other firmware attempts I have high hopes for this one. I keep updates on the subject on my own blog but beware this site is not about LUA, it is about home control and related.