lua-users home
lua-l archive

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


Hi there!

LuaChip is still underway - but the project that was supposed to finance the
development was moved over to another chip (PIC18) what is not usable for
Lua. So to Luachip hardware sits in my office and is just waiting for time
;-)

Andre had a great idea of considering the generation of native code instead
of attempting to squeeze in the interpreter - a non-trivial task by any
measure.

Granted, it's quite feasible to translate Lua bytecode to native code (ummm
... more on this later this month). But it's not helpful in your case,
because you are not aiming for speed. You really only want to save space.

That's exactly the idea I explore in picoLua, a Lua bytecode to PIC16xxx assembly translator:

http://lapsi.eletro.ufrgs.br/~socal/projects/picoLua

Obviously many Lua constructions are lost and/or not supported, but the core language/LVM is very easily mapped to the PIC's RISC-like instruction set.

There are even some extensions to allow inline assembly, direct access to the PIC registers, and so on. And it is, of course, implemented in Lua. But unfortunately I wasn't able to compile itself to PIC :)

Francisco