lua-users home
lua-l archive

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


Frederic Rudman wrote:
> 
> >Sounds really strange - Lua on a TMS320 DSP.  Like using a Porsche
> >to plow a field.  You may get it done but you won't be satisfied.
> 
> Hi! I'm not sure I understood that analogy

Hmm... if that's not correct English I'm lost.

> With Lua, it may be possible to simply update the software 1 module at the
> time, each module being really small. Further, the full bios containing the
> update/burn modules never need to be "reburned" since the new way of
> updating modules (i.e. the Lua modules) will be to simply save them in
> regular eeprom memory: no muss, no fuss, no relinking!

[Ever thought about having the entries to the BIOS at fixed locations?]

Some things to consider with Lua:

 - The "compiled" code is not executed directly.  It's parsed again
   (but by a much simpler and faster parser) and suitable data structures
   are build on the heap.  So every string, number, function, ... is
   copied to RAM before execution.
 - Lua does not support "banked memory".  It wants its memory flat.
 - Lua uses garbage collection (GC).  It roughly needs twice the memory
   than actually used by the application.
 - Because of the GC it's hard to get real-time behavior.
 - Out of memory handling in Lua is fragile.
 - 32k-words is really small for Lua (especially with 16bit chars).
   You can't do very much.
 - You lose all benefits of a DSP.  Your apps will crawl compared to
   native code.  DSPs are not designed to run high level scripting
   languages.  TI has to struggle really hard to get reasonable results
   out of their C compilers for these CPUs...

> I realize that it's not a glamorous application, but for us, Lua may be a
> great solution if we can get it to work!!!

Good luck.  But honestly, I think you are on the wrong way.

Ciao, ET.