Lua Interpreter

Hello!
Since we need to recompile the whole firmware to add new apps for now, I’m trying to add a Lua interpreter. The goal is to run Lua scripts placed directly on the SD Card to prototype new apps and potentially add small features, without the need of recompile and reinstall the firmware everytime.

I’m not really experienced in C though, and I encounter some errors (see the following screenshot). These errors happen at the end of firmware compilation. The Lua source headers are included correctly, so it seem to be linking issue, as I understand it. But I don’t have any clue about how to resolve it in that environment :confused:

That being said, I have two questions:

  • What do you think about integrating Lua for quick app prototyping and avoid recompiling the whole firmware?
  • Does anyone understand the errors and can help me with this?

Thanks in advance for any help or advice!

Here is my custom firmware repository: https://github.com/hubertgdev/flipperzero-firmware
=> See the wip/lua branch to see the integration attempt and reproduce the errors :slight_smile:
Lua sources are in lua-5.4.4, and I created a test app in applications/lua_test

i believe this is already in the process of being developed in terms of “flipper application package” files which can be dropped into a folder to avoid needing to recompile

Sure, but I think integrate a Python or Lua interpreter may be a good way to provide simplicity. even more because the API is still in development and not documented yet :slight_smile:

The Lua interpreter is too large to use. It barely fits into RAM and leaves a tiny amount of usable RAM space for your actual code

That.s a bad news, I guess the errors are not related to that, but I wasn’t expecting that it would be too heavy even if it worked.
Thanks for your answer!