porting elua to new platform

classic Classic list List threaded Threaded
3 messages Options
Oliver Mueller Oliver Mueller
Reply | Threaded
Open this post in threaded view
|

porting elua to new platform

hi,
i'm trying to figure out the approach to port lua to a new platform.(a
freescale powerpc)
in the page about porting eLua i didn't find a good strategy of how to
use a restricted set of features.
has anybody any experience with the following topics:
- configure eLua to not use floating point
- using lua with a *very* limited os (non-posix)
- using lua without a file system

any hints are greatly appreciated,
cheers,
oliver
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: porting elua to new platform

Hi,

On Tue, Nov 9, 2010 at 2:18 PM, Oliver Mueller <[hidden email]> wrote:
> hi,
> i'm trying to figure out the approach to port lua to a new platform.(a
> freescale powerpc)
> in the page about porting eLua i didn't find a good strategy of how to
> use a restricted set of features.

Restriced set of features on a PPC? I remember those were quite beefy.
What CPU are you using?

> has anybody any experience with the following topics:
> - configure eLua to not use floating point

Sure, there's already support for compiling eLua in "integer mode",
using 'target=lualong' at compile time. If your can also link against
a C library that has different versions for floating point and integer
mode (something not currently supported in eLua) you might gain quite
a bit of Flash space in the process.

> - using lua with a *very* limited os (non-posix)

Lua itself doesn't really need an OS. It compiles on bare-metal
platforms without problems, as long as you don't link in the OS
library.

> - using lua without a file system

Again, Lua doesn't really need a file system.You'll be severly
restricted without one (no file I/O, no ability to load modules), but
you can run standard Lua without an OS.

My advice is to start from here:

http://www.eluaproject.net/en_building.html#configuring

and disable as many components/modules as you can. I'll have a clear
idea if you tell me what are the actual constraints of your hardware
platform.

Best,
Bogdan
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Oliver Mueller-2 Oliver Mueller-2
Reply | Threaded
Open this post in threaded view
|

Re: porting elua to new platform

hello bogdan,
thanks for your quick answer.

>
> Restriced set of features on a PPC? I remember those were quite beefy.
> What CPU are you using?

it's a MPC5668 with 592k of ram and 2MB of flash.
but most of the space will be occupied with other applications which
won't leave a lot of room for eLua.

>
> Sure, there's already support for compiling eLua in "integer mode",
> using 'target=lualong' at compile time. If your can also link against
> a C library that has different versions for floating point and integer
> mode (something not currently supported in eLua) you might gain quite
> a bit of Flash space in the process.
>
>> - using lua with a *very* limited os (non-posix)
>
> Lua itself doesn't really need an OS. It compiles on bare-metal
> platforms without problems, as long as you don't link in the OS
> library.

nice. i was under the impression that some kind of os support was
necessary ...but even better like this.
>
>> - using lua without a file system
>
> Again, Lua doesn't really need a file system.You'll be severly
> restricted without one (no file I/O, no ability to load modules), but
> you can run standard Lua without an OS.
>
that wouldn't be a problem. i plan to possibly compile lua-code on the
pc and send it over to the embedded target to run it there.

> My advice is to start from here:
>
> http://www.eluaproject.net/en_building.html#configuring
>

...exactly what i was looking for.
thanks for your support!

oliver

> and disable as many components/modules as you can. I'll have a clear
> idea if you tell me what are the actual constraints of your hardware
> platform.
>
> Best,
> Bogdan
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>



--
tel +49 163 680 7658
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev