lua-users home
lua-l archive

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


On Thu, Dec 06, 2012 at 03:12:55PM +0000, Verma, Ruchika wrote:
> Actually, The idea is that most of our application(no OS, running on bare metal) which is written in c++ is going to talk to the hardware. We want some scripting capability to handle some high level stuff and directly communicate with the c++ application. It is mostly to provide some degree of flexibility and reconfigurability in the C++ application through the use of scripts. We only need some basic functionality from the scripts. Does Lua seems like a good fit? Do you think it will work on STM32L with 48KB RAM. Also, in terms of tools, what all tools do I require for the same. I assume that if I compile lua code to bytecodes before putting it on the processor, I may save some memory and then VM/elua is going to interpret the bytecodes. I will be cross-compiling from windows.

Having developed software for the STM32 myself, I can say that Lua is a
better fit for it than C++ is.  Although the idea of running a GCed
language in something that has ~48kB of RAM does tend to fill me with
terror, but no more than people writing real-time µcontroller code in
C++.

Code size is probably not going to be a problem for you on the STM32
range, as they have much more XIP Flash than they do RAM, so the usual
trick of stripping out the Lua compiler to make the code smaller is not
likely to gain you much, especially given that Lua bytecode is often
larger than minimised sources.

B.