Reduce stack
This commit is contained in:
14
README.md
14
README.md
@@ -186,12 +186,12 @@ ESP32 devices have a limited amount of free RAM available.<br>
|
||||
<br>
|
||||
On version >=9.10 of Nuki Hub with only a Nuki Lock connected the expected free amount of RAM/Heap available is around:
|
||||
|
||||
- ESP32: 40.000 bytes
|
||||
- ESP32 with PSRAM: 90.000 bytes + PSRAM
|
||||
- ESP32-C3: 45.000 bytes
|
||||
- ESP32-C6: 170.000 bytes
|
||||
- ESP32-S3 90.000 bytes
|
||||
- ESP32-S3 with PSRAM: 130.000 bytes + PSRAM
|
||||
- ESP32: 70.000 bytes
|
||||
- ESP32 with PSRAM: 110.000 bytes + PSRAM
|
||||
- ESP32-C3: 90.000 bytes
|
||||
- ESP32-C6: 200.000 bytes
|
||||
- ESP32-S3 130.000 bytes
|
||||
- ESP32-S3 with PSRAM: 180.000 bytes + PSRAM
|
||||
|
||||
This free amount of RAM can be reduced (temporarily) by certain actions (such as changing Nuki device config) or continuously when enabling the following:
|
||||
- Connecting both a Nuki opener and a Nuki lock to Nuki Hub
|
||||
@@ -709,7 +709,7 @@ Please follow the instructions for the [First time installation](#first-time-ins
|
||||
## MQTT Encryption (optional)
|
||||
|
||||
The communication via MQTT can be SSL encrypted.<br>
|
||||
Note: MQTT SSL requires a significant amount of RAM and will not work in most cases on low RAM devices (ESP32 without PSRAM or ESP32-C3)
|
||||
Note: MQTT SSL requires a significant amount of RAM and might not work on low RAM devices (ESP32 without PSRAM or ESP32-C3)
|
||||
|
||||
To enable SSL encryption, supply the necessary information in the MQTT Configuration page.<br>
|
||||
<br>
|
||||
|
||||
@@ -44,13 +44,6 @@ build_flags =
|
||||
-DNUKI_MUTEX_RECURSIVE
|
||||
-DNUKI_64BIT_TIME
|
||||
-DETH_SPI_SUPPORTS_NO_IRQ
|
||||
-DEMC_RX_BUFFER_SIZE=1440
|
||||
-DEMC_TX_BUFFER_SIZE=1440
|
||||
-DEMC_MIN_FREE_MEMORY=8192
|
||||
-DEMC_TASK_STACK_SIZE=10240
|
||||
-DEMC_USE_MEMPOOL=1
|
||||
-DEMC_NUM_POOL_ELEMENTS=64
|
||||
-DEMC_SIZE_POOL_ELEMENTS=256
|
||||
-Wno-ignored-qualifiers
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-type-limits
|
||||
|
||||
@@ -6,6 +6,17 @@ CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
|
||||
CONFIG_SPIFFS_GC_MAX_RUNS=512
|
||||
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=3072
|
||||
|
||||
# REDUCE RAM USAGE
|
||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n
|
||||
CONFIG_ESP32_REV_MIN=3
|
||||
CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=n
|
||||
CONFIG_SPI_MASTER_ISR_IN_IRAM=n
|
||||
CONFIG_SPI_SLAVE_ISR_IN_IRAM=n
|
||||
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=0
|
||||
CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH=y
|
||||
|
||||
# ARDUINO
|
||||
CONFIG_AUTOSTART_ARDUINO=y
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#define NUKI_HUB_VERSION "9.10"
|
||||
#define NUKI_HUB_VERSION_INT (uint32_t)910
|
||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||
#define NUKI_HUB_DATE "2025-04-01"
|
||||
#define NUKI_HUB_DATE "2025-04-02"
|
||||
|
||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "esp_core_dump.h"
|
||||
#include "FS.h"
|
||||
#include "SPIFFS.h"
|
||||
#include <ESPmDNS.h>
|
||||
//#include <ESPmDNS.h>
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
#include "esp_psram.h"
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,8 @@ void NetworkDevice::init()
|
||||
#ifdef CONFIG_SOC_SPIRAM_SUPPORTED
|
||||
if(esp_psram_get_size() > 0)
|
||||
{
|
||||
_mqttInternal = true;
|
||||
//_mqttInternal = true;
|
||||
_mqttInternal = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "IPConfiguration.h"
|
||||
#include "esp_wifi.h"
|
||||
#include <WiFi.h>
|
||||
#include <ESPmDNS.h>
|
||||
|
||||
class WifiDevice : public NetworkDevice
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user