- Sun Aug 13, 2017 4:07 am
Does anyone know how to view the output from this system call? My project is working "fine"...except that after hours on end of working perfectly it appears to "freeze up" (i.e I can't see any debug output, and it can take several power cycles to get it running again). My own debug output shows the heap size is constant for hours and hours - when i return the next morning, it has frozen up as above. I'm using several libraries that use arduino Strings and I suspect heap fragmentation as I have spent several days checking my own code for memory leaks etc - my output shows that there are none immediately apparent after sometimes 10, 12+ hrs of continuous running. Anyway, I'd like to see the state of memory periodically in the log.
I found system_print_meminfo(); but for the life of me I can't work out how to get the ouput into the COM window of the arduino IDE (or anywhere else!). I have even hacked the core files and put it in the init_done section straight after a system_set_os_print (1)
I know it's definitely getting called, as I call it in my main code just after another system_ function:
Code: Select all
Serial.printf("CAN CALL OS FN %d\n",system_get_free_heap_size()); // shows correct value
system_print_meminfo(); // shows nothing
Any ideas? Is this even going to help me identify the suspected heap fragmentation?