Blackdragon1400 |
I want to develop with eLua in a Desktop environment in preparation for porting some libraries to an embedded device, specifically libpcap and libnet. Ideally I would like to run the eLua version of Lua with these networking libraries (and maby a few other generic Lua libraries) added. Is this possible? How would I go about making it work?
If this is a stupid question I am quite new to embedded systems so please go easy on me =) Thanks! |
Hello,
On Thu, Jun 6, 2013 at 1:33 AM, Blackdragon1400 <[hidden email]> wrote: I want to develop with eLua in a Desktop environment in preparation for Not a stupid question at all. If your embedded system happened to be based on Linux, the answer would be "must likely yes". But on a bare-metal system like eLua we don't have the required OS support for running libpcap/libnet, so unfortunately the answer is "no". Best, Bogdan
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Fri, Jun 7, 2013 at 6:25 AM, Bogdan Marinescu <[hidden email]> wrote:
I'll add to this a little bit, since it sounds like you want to use the existing libraries on a desktop version of the eLua sources first before making embedded versions of libraries.
You can compile the eLua sources as a desktop version of Lua. The desktop side for LuaRPC (which is just Lua w/ some specific libraries included, compiled from eLua sources) is an example of this:
As for how one would add these modules you can see the list of module source files in rpc-lua.lua, and I think inc/desktop/platform_conf.h (through LUA_PLATFORM_LIBS_ROM or LUA_PLATFORM_LIBS_REG) may give you what you'd need to compile an extra module into the binary. I've not tried using dynamic loadable modules against the eLua sources.
You'll also want to keep this in mind when working on modules for eLua: http://www.eluaproject.net/doc/v0.9/en_arch_ltr.html
I can't recall if you can get away with not doing this for compiling the luarpc binary on the desktop or not. Now, as for getting versions of the mentioned libraries or others going on a small MCU target, you may be in for a fair bit of rewriting or re-implementing depending on how memory-hungry they are and what their dependencies are.
James Snyder Biomedical Engineering Northwestern University http://fanplastic.org/key.txt ph: (847) 448-0386 _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Blackdragon1400 |
Great, I'll give that a try.
Thanks! |
Free forum by Nabble | Edit this page |