update luaaa (#3540)

* lua update

* no stdlib mode

* turn off system luaaa for now since it makes luaaa sad

* let user heap do a little

* gitmodules

* memory shuffling

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2021-11-12 19:10:05 -08:00 committed by GitHub
parent dffab7abff
commit a831bec797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 5 deletions

2
.gitmodules vendored
View File

@ -32,7 +32,7 @@
[submodule "firmware/controllers/lua/luaaa"] [submodule "firmware/controllers/lua/luaaa"]
path = firmware/controllers/lua/luaaa path = firmware/controllers/lua/luaaa
url = https://github.com/rusefi/luaaa url = https://github.com/rusefi/luaaa
branch = rusefi_prod_2019 branch = rusefi_prod_2021_11_12
[submodule "firmware/ext/openblt"] [submodule "firmware/ext/openblt"]
path = firmware/ext/openblt path = firmware/ext/openblt
url = https://github.com/rusefi/openblt url = https://github.com/rusefi/openblt

View File

@ -270,7 +270,7 @@
// small memory F40x can't fit perf trace // small memory F40x can't fit perf trace
#define ENABLE_PERF_TRACE FALSE #define ENABLE_PERF_TRACE FALSE
#define LUA_USER_HEAP 13000 #define LUA_USER_HEAP 15000
#define LUA_SYSTEM_HEAP 12000 #define LUA_SYSTEM_HEAP 12000
#endif #endif

View File

@ -753,7 +753,7 @@ void initEngineContoller(DECLARE_ENGINE_PARAMETER_SUFFIX) {
* UNUSED_SIZE constants. * UNUSED_SIZE constants.
*/ */
#ifndef RAM_UNUSED_SIZE #ifndef RAM_UNUSED_SIZE
#define RAM_UNUSED_SIZE 4800 #define RAM_UNUSED_SIZE 4000
#endif #endif
#ifndef CCM_UNUSED_SIZE #ifndef CCM_UNUSED_SIZE
#define CCM_UNUSED_SIZE 2400 #define CCM_UNUSED_SIZE 2400

View File

@ -327,7 +327,7 @@ static bool runOneLua(lua_Alloc alloc, const char* script) {
} }
void LuaThread::ThreadTask() { void LuaThread::ThreadTask() {
initSystemLua(); //initSystemLua();
while (!chThdShouldTerminateX()) { while (!chThdShouldTerminateX()) {
bool wasOk = runOneLua(myAlloc<0>, config->luaScript); bool wasOk = runOneLua(myAlloc<0>, config->luaScript);

View File

@ -9,6 +9,9 @@
#include "can_msg_tx.h" #include "can_msg_tx.h"
#include "settings.h" #include "settings.h"
#include <new> #include <new>
// We don't want to try and use the STL on a microcontroller
#define LUAAA_WITHOUT_CPP_STDLIB
#include "luaaa.hpp" #include "luaaa.hpp"
#include "lua_hooks_util.h" #include "lua_hooks_util.h"
using namespace luaaa; using namespace luaaa;

@ -1 +1 @@
Subproject commit 499699790e6064e2f536fe5bdbff715a8cf1e5c2 Subproject commit a7854a5928c2366def3dc2c6c581564e40329b23