void SerialUI::showFreeRAM() { extern int __heap_start, *__brkval; int v; print_P(PSTR("Free RAM: ")); println(freeRAM()); }
void printArray(void* p){ while(1){ /*int s; int end; dprintf("%d_s %d_end",(int)&s,(int)&end);*/ //freeRAM(); dprintf("%d", freeRAM()); vTaskDelay(1000); } }
//===================================================================================== // show amount of RAM free //===================================================================================== void showFreeRAM() { extern uint16_t __bss_end; extern void * __brkval; uint16_t stackVar; DIAGPRINT(F("free RAM: ")); DIAGPRINT(freeRAM(&stackVar)); DIAGPRINTLN(F(" bytes ")); DIAGPRINT(F(" __bss_end: ")); print0x04x((uint16_t)&__bss_end); DIAGPRINTLN(); DIAGPRINT(F(" __brkval: ")); print0x04x((uint16_t)__brkval); DIAGPRINTLN(); DIAGPRINT(F(" stackpointer: ")); print0x04x((uint16_t)AVR_STACK_POINTER_REG); DIAGPRINTLN(); }