mirror of https://github.com/rusefi/rusefi-1.git
use static buffer for lua heap, enable on f429 (#2619)
* static buffer for lua * enable lua for 429
This commit is contained in:
parent
d6fc3f9a01
commit
a62b7bedb2
|
@ -44,8 +44,6 @@
|
|||
#define SC_BUFFER_SIZE 4000
|
||||
#endif
|
||||
|
||||
#define EFI_LUA FALSE
|
||||
|
||||
/**
|
||||
* if you have a 60-2 trigger, or if you just want better performance, you
|
||||
* probably want EFI_ENABLE_ASSERTS to be FALSE. Also you would probably want to FALSE
|
||||
|
@ -264,9 +262,14 @@
|
|||
|
||||
#define EFI_CONSOLE_USB_DEVICE SDU1
|
||||
|
||||
// F42x has more memory, so we can use compressed USB MSD image (requires 32k of memory)
|
||||
// F42x has more memory, so we can:
|
||||
// - use compressed USB MSD image (requires 32k of memory)
|
||||
// - use Lua interpreter (requires ~20k of memory)
|
||||
#ifdef EFI_IS_F42x
|
||||
#define EFI_USE_COMPRESSED_INI_MSD
|
||||
#define EFI_USE_COMPRESSED_INI_MSD
|
||||
#define EFI_LUA TRUE
|
||||
#else
|
||||
#define EFI_LUA FALSE
|
||||
#endif
|
||||
|
||||
#ifndef EFI_ENGINE_SNIFFER
|
||||
|
|
|
@ -191,9 +191,10 @@ struct LuaThread : ThreadController<4096> {
|
|||
void ThreadTask() override;
|
||||
};
|
||||
|
||||
static char luaHeap[LUA_HEAP_SIZE];
|
||||
|
||||
void LuaThread::ThreadTask() {
|
||||
void* buf = malloc(LUA_HEAP_SIZE);
|
||||
chHeapObjectInit(&heap, buf, LUA_HEAP_SIZE);
|
||||
chHeapObjectInit(&heap, &luaHeap, sizeof(luaHeap));
|
||||
|
||||
auto ls = setupLuaState();
|
||||
|
||||
|
|
Loading…
Reference in New Issue