lua-users home
lua-l archive

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


Hi All,
 
thanks a lot for the helpful replies. I tried compiling LUA and it is true that I end up at over 30K but less than 64K of code. that is compiling in thumb mode so I suspect that it will be even more if I try ARM mode. I have tried with the IAR EW compiler, still have to try the GCC.
 
Now, the firmware would be running LUA code in an interrupt. How would this be done to keep things thread-safe (nested interrupts?), and is it realistic to call a LUA function from an interrupt routine being called at 30kHz?
 
It somehow makes more sense to me to compile the LUA code on my host PC to something that can be run very efficiently on the ARM platform, like native code, but then I'm not sure how difficult it is to compile LUA code to native ARM directly.
 
Thanks,
Bert


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> What parts of the LUA source code do I need for making
> this work and what can I safely remove?
> This is for Lua 4.0, but may get you started:
>
> http://www.lua.org/notes/ltn002.html

Yes, and Lua 5.x this is even easier. See etc/noparser.c
This will save you some 30% of the core code.
--lhf


Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.