mirror of https://github.com/arendst/Tasmota.git
Merge pull request #14255 from s-hadinger/esp32_stacksize
Set ESP32 stack size with ``#define SET_ESP32_STACK_SIZE``, added ``StackLowMark`` metrics
This commit is contained in:
commit
900269ad44
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Changed
|
||||
- PubSubClient library from v2.8.12 to v2.8.13
|
||||
- From Semantic Versioning (SemVer) to Calendar Versioning (CalVer)
|
||||
- Set ESP32 stack size with ``#define SET_ESP32_STACK_SIZE``, added ``StackLowMark`` metrics
|
||||
|
||||
### Fixed
|
||||
- Intermittent exceptions and heap corruption due to PubSubClient library buffer overflow (#13700)
|
||||
|
|
|
@ -143,6 +143,7 @@
|
|||
#define D_JSON_PROBETEMPERATURE "ProbeTemperature"
|
||||
#define D_JSON_PROGRAMFLASHSIZE "ProgramFlashSize"
|
||||
#define D_JSON_PROGRAMSIZE "ProgramSize"
|
||||
#define D_JSON_STACKLOWMARK "StackLowMark"
|
||||
#define D_JSON_PSRMAXMEMORY "PsrMax"
|
||||
#define D_JSON_PSRFREEMEMORY "PsrFree"
|
||||
#define D_JSON_PUMP "Pumped"
|
||||
|
|
|
@ -974,6 +974,8 @@
|
|||
|
||||
#ifdef ESP32
|
||||
|
||||
#define SET_ESP32_STACK_SIZE (8 * 1024) // Set the stack size for Tasmota. The default value is 8192 for Arduino, some builds might need to increase it
|
||||
|
||||
//#define USE_SONOFF_SPM // Add support for ESP32 based Sonoff Smart Stackable Power Meter(+6k3 code)
|
||||
#ifdef USE_SONOFF_SPM
|
||||
#define USE_ETHERNET
|
||||
|
|
|
@ -545,7 +545,7 @@ void CmndStatus(void)
|
|||
if ((0 == payload) || (4 == payload)) {
|
||||
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS4_MEMORY "\":{\"" D_JSON_PROGRAMSIZE "\":%d,\"" D_JSON_FREEMEMORY "\":%d,\"" D_JSON_HEAPSIZE "\":%d,\""
|
||||
#ifdef ESP32
|
||||
D_JSON_PSRMAXMEMORY "\":%d,\"" D_JSON_PSRFREEMEMORY "\":%d,\""
|
||||
D_JSON_STACKLOWMARK "\":%d,\"" D_JSON_PSRMAXMEMORY "\":%d,\"" D_JSON_PSRFREEMEMORY "\":%d,\""
|
||||
#endif // ESP32
|
||||
D_JSON_PROGRAMFLASHSIZE "\":%d,\"" D_JSON_FLASHSIZE "\":%d"
|
||||
#ifdef ESP8266
|
||||
|
@ -554,7 +554,7 @@ void CmndStatus(void)
|
|||
",\"FlashFrequency\":%d,\"" D_JSON_FLASHMODE "\":%d"),
|
||||
ESP_getSketchSize()/1024, ESP.getFreeSketchSpace()/1024, ESP_getFreeHeap1024(),
|
||||
#ifdef ESP32
|
||||
ESP.getPsramSize()/1024, ESP.getFreePsram()/1024,
|
||||
uxTaskGetStackHighWaterMark(nullptr) / 1024, ESP.getPsramSize()/1024, ESP.getFreePsram()/1024,
|
||||
#endif // ESP32
|
||||
ESP.getFlashChipSize()/1024, ESP.getFlashChipRealSize()/1024
|
||||
#ifdef ESP8266
|
||||
|
|
|
@ -135,6 +135,12 @@ String GetDeviceHardware(void) {
|
|||
#include "rom/rtc.h"
|
||||
#endif
|
||||
|
||||
// Set the Stacksize for Arduino core. Default is 8192, some builds may need a bigger one
|
||||
size_t getArduinoLoopTaskStackSize(void) {
|
||||
return SET_ESP32_STACK_SIZE;
|
||||
}
|
||||
|
||||
|
||||
#include <esp_phy_init.h>
|
||||
|
||||
bool NvmLoad(const char *sNvsName, const char *sName, void *pSettings, unsigned nSettingsLen) {
|
||||
|
|
Loading…
Reference in New Issue