Explorar o código

Ram status - heap and stack monitor.

Robert Pelnar %!s(int64=7) %!d(string=hai) anos
pai
achega
b76758b7b6
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Firmware/ultralcd.cpp

+ 4 - 1
Firmware/ultralcd.cpp

@@ -1544,9 +1544,12 @@ static void lcd_menu_fails_stats()
 }
 
 extern uint16_t SP_min;
+extern char* __malloc_heap_start;
+extern char* __malloc_heap_end;
+
 static void lcd_menu_debug()
 {
-	fprintf_P(lcdout, PSTR(ESC_H(1,1)"SP_min: 0x%04x"), SP_min);
+	fprintf_P(lcdout, PSTR(ESC_H(1,1)"RAM statistics"ESC_H(5,1)"SP_min: 0x%04x"ESC_H(1,2)"heap_start: 0x%04x"ESC_H(3,3)"heap_end: 0x%04x"), SP_min, __malloc_heap_start, __malloc_heap_end);
 
 	if (lcd_clicked())
     {