From f6ffcc2c81b3ff9630dbc9d74c6a12220f627db4 Mon Sep 17 00:00:00 2001 From: Serge Bazanski <q3k@q3k.org> Date: Sun, 30 Jul 2023 14:22:46 +0200 Subject: [PATCH] sdkconfig: bump down SPIRAM_MALLOC_ALWAYSINTERNAL We seem to be wasting a lot of internal memory on random mallocs(), preventing us from late-initializing bluetooth/BLE. Fixes #13 . Maybe. We'll see with time. I think a more complete approach would be to force all micropython allocations to land in SPIRAM? Or maybe use some memory watermarking to make the micropython allocator only use internal memory if there's plenty of it available, enough to initialize BLE? --- sdkconfig.defaults | 1 + 1 file changed, 1 insertion(+) diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 45f9275a0d..f374e5e259 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -17,6 +17,7 @@ CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SPEED_80M=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=8192 CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=y CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=65536 CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y -- GitLab