|
|
@ -2162,6 +2162,8 @@ void show_cpu_and_mem_usage(void) |
|
|
|
Serial.print(peak_dexed_value, 1); |
|
|
|
Serial.print(peak_dexed_value, 1); |
|
|
|
Serial.print(F("|BLOCKSIZE:")); |
|
|
|
Serial.print(F("|BLOCKSIZE:")); |
|
|
|
Serial.print(AUDIO_BLOCK_SAMPLES, DEC); |
|
|
|
Serial.print(AUDIO_BLOCK_SAMPLES, DEC); |
|
|
|
|
|
|
|
Serial.print(F("|RAM:")); |
|
|
|
|
|
|
|
Serial.print(FreeMem(), DEC); |
|
|
|
|
|
|
|
|
|
|
|
Serial.print(F("|ACTVOICES:")); |
|
|
|
Serial.print(F("|ACTVOICES:")); |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
@ -2367,4 +2369,29 @@ void SerialPrintFormatInt3(uint8_t num) |
|
|
|
sprintf(buf, "%3d", num); |
|
|
|
sprintf(buf, "%3d", num); |
|
|
|
Serial.print(buf); |
|
|
|
Serial.print(buf); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* From: https://forum.pjrc.com/threads/33443-How-to-display-free-ram */ |
|
|
|
|
|
|
|
extern "C" char* sbrk(int incr); |
|
|
|
|
|
|
|
uint32_t FreeMem(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char top; |
|
|
|
|
|
|
|
return &top - reinterpret_cast<char*>(sbrk(0)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
uint32_t FreeMem(void) { // for Teensy 3.0
|
|
|
|
|
|
|
|
uint32_t stackTop; |
|
|
|
|
|
|
|
uint32_t heapTop; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// current position of the stack.
|
|
|
|
|
|
|
|
stackTop = (uint32_t) &stackTop; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// current position of heap.
|
|
|
|
|
|
|
|
void* hTop = malloc(1); |
|
|
|
|
|
|
|
heapTop = (uint32_t) hTop; |
|
|
|
|
|
|
|
free(hTop); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// The difference is (approximately) the free, available ram.
|
|
|
|
|
|
|
|
return stackTop - heapTop; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|