lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I've put Lua in embedded systems three times so far-- once in a
managed Ethernet switch, once in a box that manages digital audio
networks with SNMP, and once in an environmental monitoring and
control system.  All three times, I've had the luxury of beefy
processors running under an operating system (vxWorks and Linux).  But
now I'm targeting something smaller, and before I dive in too deeply,
I'd like to see if anyone has any wisdom they can offer.

The target is a ColdFire (specifically a MCF52258).  It has 64k of
RAM, and there is no operating system.  Right now, I'm not looking for
Lua to run the main-line code, but I guess it could eventually be used
for that.  The primary use would be for the end user to execute
scripts based on events in the system.

So the questions are:

1.  What is the current state of making an integer-only Lua?  Yes, I
know you change a macro and "double" becomes "int".  But the last time
I tried this (back in Lua 4.x days), I remember there being... issues.
 I welcome those who have made an integer-only Lua  to comment on
their experience regarding this.

2.  With 64k of RAM I obviously want to be frugal.  So, are there any
tweaks to the Lua configuration that others who have targeted small
systems can recommend? I'm specifically concerned with what happens
when tables grow-- as I remember the allocation strategy involves
growing by powers of two, but I'm too lazy to look up the exact
mechanism right now.  The point being that I am willing to trade
performance for memory frugality, and would like suggestions and
experience related to that.

Thanks!