diff --git a/src/RedirectablePrint.cpp b/src/RedirectablePrint.cpp index fd634a99..c3743b97 100644 --- a/src/RedirectablePrint.cpp +++ b/src/RedirectablePrint.cpp @@ -20,7 +20,7 @@ size_t RedirectablePrint::write(uint8_t c) { // Always send the characters to our segger JTAG debugger #ifdef SEGGER_STDOUT_CH - SEGGER_RTT_PutCharSkip(SEGGER_STDOUT_CH, c); + SEGGER_RTT_PutChar(SEGGER_STDOUT_CH, c); #endif dest->write(c); @@ -85,6 +85,8 @@ size_t RedirectablePrint::logDebug(const char *format, ...) auto thread = concurrency::OSThread::currentThread; if(thread) { print("["); + // printf("%p ", thread); + // assert(thread->ThreadName.length()); print(thread->ThreadName); print("] "); } diff --git a/src/main.cpp b/src/main.cpp index 495dc2f3..28ddb1bc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -279,7 +279,13 @@ void setup() concurrency::hasBeenSetup = true; #ifdef SEGGER_STDOUT_CH - SEGGER_RTT_ConfigUpBuffer(SEGGER_STDOUT_CH, NULL, NULL, 1024, SEGGER_RTT_MODE_NO_BLOCK_TRIM); + auto mode = true ? SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL : SEGGER_RTT_MODE_NO_BLOCK_TRIM; +#ifdef NRF52840_XXAA + auto buflen = 4096; // this board has a fair amount of ram +#else + auto buflen = 256; // this board has a fair amount of ram +#endif + SEGGER_RTT_ConfigUpBuffer(SEGGER_STDOUT_CH, NULL, NULL, buflen, mode); #endif #ifdef USE_SEGGER