How do I run eLua on my computer?

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

How do I run eLua on my computer?

This post has NOT been accepted by the mailing list yet.
Hi there,

I have developed some pure-Lua libraries and I'd like to check if they work correctly in eLua.

The first lib I'd like to try is inspect.lua (https://github.com/kikito/inspect.lua). I would like to adapt it to eLua's idiosincrasies (for example, I want to make it print romtables correctly).

But I have no idea about how to go about it. The embedded world is something that I have yet not delved into.

Can I install eLua in my computer? The docs I found seemed to indicate that it can must compiled against one of several targets, replacing the operative system even. What I would need is some kind of elua executable, which can be executed from the command line. Maybe I need to execute it over some kind of emulated chip?

I have a battery of automated tests which are tested against Lua5.1, Lua5.2 & LuaJIT on Travis-CI:

https://travis-ci.org/kikito/inspect.lua

The tests in question rely on LuaRocks and the testing library "busted". You can see the .travis.yml conf script here:

https://github.com/kikito/inspect.lua/blob/eLua/.travis.yml

As you can see in that file, after getting a lua executable, I configure luarocks so that it uses different executables and paths, and then install the rocks I need.

Can I make eLua work more or less similarly to Lua & LuaJIT, there in a reasonable amount of time? If not, is there any other way I can test the library without actually needing specific equipment?

Thanks a lot,

Enrique (kikito)
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: How do I run eLua on my computer?

This post has NOT been accepted by the mailing list yet.
Hi Kikito,

There's a (very much undocummented) way to run eLua in a "simulator" environment under Linux, would that work for you?

Best,
Bogdan
kikito kikito
Reply | Threaded
Open this post in threaded view
|

Re: How do I run eLua on my computer?

This post has NOT been accepted by the mailing list yet.
Hi, thanks for answering.

> There's a (very much undocummented) way to run eLua in a "simulator" environment under Linux, would that work for you?

It depends on the simulator. The automated tests are run on Travis-CI, which provides (virtualized) Linux machines. So I can install any software I need for the tests. But in order to make them work I would need the simulator to be scriptable - I would need to tell it "copy these Lua files on the emulator, run this script, and give me the results back" in a non-interactive way. And I can not depend on any external hardware at all.

Would this be feasible?
raman raman
Reply | Threaded
Open this post in threaded view
|

Re: How do I run eLua on my computer?

This post has NOT been accepted by the mailing list yet.

Dear Kikito,

> I need for the tests. But in order to make them work I would need the
> simulator to be scriptable - I would need to tell it "copy these Lua files
> on the emulator, run this script, and give me the results back" in a
> non-interactive way. And I can not depend on any external hardware at all.

The eLua simulator is an elf file you can run directly on your GNU/Linux.
You'll need i686-gcc to generate the executables. You can get the toolchain
from codesourcery.

The eLua simulator is exactly like regular eLua on an MCU but it runs in
user space. Of course, you can't access any MCU specific peripherals but
you can access term, elua, pd and cpu platform modules.

There's no way to instruct the simulator to behave in a non-interactive way.
You'll still have to launch Lua from the eLua shell and write your programs
interactively.

R
kikito kikito
Reply | Threaded
Open this post in threaded view
|

Re: How do I run eLua on my computer?

This post has NOT been accepted by the mailing list yet.
> There's no way to instruct the simulator to behave in a non-interactive way.

Well, that's a bummer.

I will see what I can do with the pointers you gave me anyway. Thanks a lot, R!

Kikito