Merge branch 'mdev' into Platform_upgrade
This commit is contained in:
@@ -401,7 +401,11 @@
|
||||
#ifdef ESP8266
|
||||
#define SETTINGS_STACK_BUF_SIZE 2048
|
||||
#else
|
||||
#define SETTINGS_STACK_BUF_SIZE 3834 // WLEDMM added 696+32 bytes of margin (was 3096) for audioreactive UI
|
||||
#if !defined(USERMOD_AUDIOREACTIVE)
|
||||
#define SETTINGS_STACK_BUF_SIZE 3834 // WLEDMM added 696+32 bytes of margin (was 3096)
|
||||
#else
|
||||
#define SETTINGS_STACK_BUF_SIZE 3904 // WLEDMM more buffer for audioreactive UI (add '-D CONFIG_ASYNC_TCP_TASK_STACK_SIZE=9216' to your build_flags)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WLED_USE_ETHERNET
|
||||
@@ -442,12 +446,12 @@
|
||||
#if defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON))
|
||||
#if defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32C3)
|
||||
#if defined(ARDUINO_ARCH_ESP32C3)
|
||||
#define JSON_BUFFER_SIZE 46000 // WLEDMM - max 46KB on -C3 with PSRAM (chip has 400kb RAM)
|
||||
#define JSON_BUFFER_SIZE 44000 // WLEDMM - max 44KB on -C3 with PSRAM (chip has 400kb RAM)
|
||||
#else
|
||||
#define JSON_BUFFER_SIZE 36000 // WLEDMM - max 36KB on -S2 with PSRAM (chip has 320kb RAM)
|
||||
#define JSON_BUFFER_SIZE 32000 // WLEDMM - max 32KB on -S2 with PSRAM (chip has 320kb RAM)
|
||||
#endif
|
||||
#else
|
||||
#define JSON_BUFFER_SIZE 56000 // WLEDMM (was 60000) slightly reduced to avoid build error "region dram0_0_seg overflowed"
|
||||
#define JSON_BUFFER_SIZE 54000 // WLEDMM (was 60000) slightly reduced to avoid build error "region dram0_0_seg overflowed"
|
||||
#endif
|
||||
#else
|
||||
#define JSON_BUFFER_SIZE 24576
|
||||
|
||||
@@ -697,7 +697,7 @@ ${inforow("Filesystem",i.fs.u + "/" + i.fs.t + " kB (" +Math.round(i.fs.u*100/i.
|
||||
${theap>0?inforow("Heap ☾",((i.totalheap-i.freeheap)/1000).toFixed(0)+"/"+theap.toFixed(0)+" kB"," ("+Math.round((i.totalheap-i.freeheap)/(10*theap))+"%)"):""}
|
||||
${i.minfreeheap?inforow("Max used heap ☾",((i.totalheap-i.minfreeheap)/1000).toFixed(1)+" kB"," ("+Math.round((i.totalheap-i.minfreeheap)/(10*theap))+"%)"):""}
|
||||
${inforow("Free heap",heap," kB")}
|
||||
${i.freestack?inforow("Free stack ☾",i.freestack," kB"):""} <!--WLEDMM-->
|
||||
${i.freestack?inforow("Free stack ☾",(i.freestack/1024).toFixed(3)," kB"):""} <!--WLEDMM-->
|
||||
${inforow("Flash Size ☾",flashsize," kB")} <!--WLEDMM and Athom-->
|
||||
${i.tpram?inforow("PSRAM ☾",(i.tpram/1024).toFixed(1)," kB"):""}
|
||||
${i.psram?((i.tpram-i.psram)>16383?inforow("Used PSRAM ☾",((i.tpram-i.psram)/1024).toFixed(1)," kB"):inforow("Used PSRAM ☾",(i.tpram-i.psram)," B")):""}
|
||||
|
||||
4731
wled00/html_ui.h
4731
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -64,6 +64,22 @@
|
||||
// WLEDMM end
|
||||
|
||||
|
||||
#if INCLUDE_xTaskGetHandle && defined(ARDUINO_ARCH_ESP32) && (defined(WLED_DEBUG) || defined(WLED_DEBUG_HEAP))
|
||||
// WLEDMM stack debug tool - find async_tcp task, and queries it's free stack
|
||||
static int wledmm_get_tcp_stacksize(void) {
|
||||
static TaskHandle_t tcp_taskHandle = NULL; // to store the task handle for later calls
|
||||
char * tcp_taskname = pcTaskGetTaskName(tcp_taskHandle); // ask for name of the known task (to make sure we are still looking at the right one)
|
||||
|
||||
if ((tcp_taskHandle == NULL) || (tcp_taskname == NULL) || (strncmp(tcp_taskname, "async_tcp", 9) != 0)) {
|
||||
tcp_taskHandle = xTaskGetHandle("async_tcp"); // need to look for the task by name. FreeRTOS docs say this is very slow, so we store the result for next time
|
||||
//DEBUG_PRINT(F("async_tcp task ")); DEBUG_PRINTLN( (tcp_taskHandle != NULL) ? F("found") : F("not found"));
|
||||
}
|
||||
|
||||
if (tcp_taskHandle != NULL) return uxTaskGetStackHighWaterMark(tcp_taskHandle); // got it !!
|
||||
else return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Main WLED class implementation. Mostly initialization and connection logic
|
||||
*/
|
||||
@@ -347,6 +363,10 @@ void WLED::loop()
|
||||
if (millis() - debugTime > 4999 ) { // WLEDMM: Special case for debugging heap faster
|
||||
DEBUG_PRINT(F("*** Free heap: ")); DEBUG_PRINT(heap_caps_get_free_size(0x1800));
|
||||
DEBUG_PRINT(F("\tLargest free block: ")); DEBUG_PRINT(heap_caps_get_largest_free_block(0x1800));
|
||||
DEBUG_PRINT(F(" *** \t\tArduino min free stack: ")); DEBUG_PRINT(uxTaskGetStackHighWaterMark(NULL));
|
||||
#if INCLUDE_xTaskGetHandle
|
||||
DEBUG_PRINT(F(" TCP min free stack: ")); DEBUG_PRINT(wledmm_get_tcp_stacksize());
|
||||
#endif
|
||||
DEBUG_PRINTLN(F(" ***"));
|
||||
debugTime = millis();
|
||||
}
|
||||
@@ -531,7 +551,7 @@ void WLED::setup()
|
||||
#endif
|
||||
DEBUG_PRINT(F("heap ")); DEBUG_PRINTLN(ESP.getFreeHeap());
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) // unfortunately not availeable in older framework versions
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0) // unfortunately not available in older framework versions
|
||||
DEBUG_PRINT(F("\nArduino max stack ")); DEBUG_PRINTLN(getArduinoLoopTaskStackSize());
|
||||
#endif
|
||||
DEBUG_PRINTF("%s min free stack %d\n", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
|
||||
@@ -568,7 +588,7 @@ void WLED::setup()
|
||||
|
||||
//DEBUG_PRINT(F("LEDs inited. heap usage ~"));
|
||||
//DEBUG_PRINTLN(heapPreAlloc - ESP.getFreeHeap());
|
||||
USER_FLUSH(); // WLEDMM flush buffer now, before anything time-critial is started.
|
||||
USER_FLUSH(); // WLEDMM flush buffer now, before anything time-critical is started.
|
||||
|
||||
pinManager.manageDebugTXPin();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2312100
|
||||
#define VERSION 2312120
|
||||
|
||||
//WLEDMM + Moustachauve/Wled-Native
|
||||
// You can define custom product info from build flags.
|
||||
|
||||
@@ -575,8 +575,8 @@ void serveSettingsJS(AsyncWebServerRequest* request)
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
DEBUG_PRINT(F("ServeSettingsJS: "));
|
||||
DEBUG_PRINTF("%s min free stack %d\n", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
|
||||
DEBUG_PRINTF(PSTR(" bytes.\tString buffer usage: %4d of %d bytes\n"), strlen(buf)+1, SETTINGS_STACK_BUF_SIZE+37);
|
||||
DEBUG_PRINTF("%s min free stack %d", pcTaskGetTaskName(NULL), uxTaskGetStackHighWaterMark(NULL)); //WLEDMM
|
||||
DEBUG_PRINTF(PSTR(" bytes.\t\tString buffer usage: %4d of %d bytes\n"), strlen(buf)+1, SETTINGS_STACK_BUF_SIZE+37);
|
||||
#endif
|
||||
|
||||
AsyncWebServerResponse *response;
|
||||
|
||||
Reference in New Issue
Block a user