diff --git a/.gitmodules b/.gitmodules index f184df9f24..7c2ad4a84d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -32,7 +32,7 @@ [submodule "firmware/controllers/lua/luaaa"] path = firmware/controllers/lua/luaaa url = https://github.com/rusefi/luaaa - branch = rusefi_prod_2019 + branch = rusefi_prod_2021_11_12 [submodule "firmware/ext/openblt"] path = firmware/ext/openblt url = https://github.com/rusefi/openblt diff --git a/firmware/config/stm32f4ems/efifeatures.h b/firmware/config/stm32f4ems/efifeatures.h index f73f1c2aec..1dbb5ad938 100644 --- a/firmware/config/stm32f4ems/efifeatures.h +++ b/firmware/config/stm32f4ems/efifeatures.h @@ -270,7 +270,7 @@ // small memory F40x can't fit perf trace #define ENABLE_PERF_TRACE FALSE - #define LUA_USER_HEAP 13000 + #define LUA_USER_HEAP 15000 #define LUA_SYSTEM_HEAP 12000 #endif diff --git a/firmware/controllers/engine_controller.cpp b/firmware/controllers/engine_controller.cpp index c22500b552..c98900e10d 100644 --- a/firmware/controllers/engine_controller.cpp +++ b/firmware/controllers/engine_controller.cpp @@ -753,7 +753,7 @@ void initEngineContoller(DECLARE_ENGINE_PARAMETER_SUFFIX) { * UNUSED_SIZE constants. */ #ifndef RAM_UNUSED_SIZE -#define RAM_UNUSED_SIZE 4800 +#define RAM_UNUSED_SIZE 4000 #endif #ifndef CCM_UNUSED_SIZE #define CCM_UNUSED_SIZE 2400 diff --git a/firmware/controllers/lua/lua.cpp b/firmware/controllers/lua/lua.cpp index 22a30c0bc4..5791e9e3b9 100644 --- a/firmware/controllers/lua/lua.cpp +++ b/firmware/controllers/lua/lua.cpp @@ -327,7 +327,7 @@ static bool runOneLua(lua_Alloc alloc, const char* script) { } void LuaThread::ThreadTask() { - initSystemLua(); + //initSystemLua(); while (!chThdShouldTerminateX()) { bool wasOk = runOneLua(myAlloc<0>, config->luaScript); diff --git a/firmware/controllers/lua/lua_hooks.cpp b/firmware/controllers/lua/lua_hooks.cpp index 80cd379e9f..148fae9cf0 100644 --- a/firmware/controllers/lua/lua_hooks.cpp +++ b/firmware/controllers/lua/lua_hooks.cpp @@ -9,6 +9,9 @@ #include "can_msg_tx.h" #include "settings.h" #include + +// We don't want to try and use the STL on a microcontroller +#define LUAAA_WITHOUT_CPP_STDLIB #include "luaaa.hpp" #include "lua_hooks_util.h" using namespace luaaa; diff --git a/firmware/controllers/lua/luaaa b/firmware/controllers/lua/luaaa index 499699790e..a7854a5928 160000 --- a/firmware/controllers/lua/luaaa +++ b/firmware/controllers/lua/luaaa @@ -1 +1 @@ -Subproject commit 499699790e6064e2f536fe5bdbff715a8cf1e5c2 +Subproject commit a7854a5928c2366def3dc2c6c581564e40329b23