mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
make debug console stall until host has downloaded
This commit is contained in:
parent
781d2f0ad6
commit
f8ec072093
@ -20,7 +20,7 @@ size_t RedirectablePrint::write(uint8_t c)
|
|||||||
{
|
{
|
||||||
// Always send the characters to our segger JTAG debugger
|
// Always send the characters to our segger JTAG debugger
|
||||||
#ifdef SEGGER_STDOUT_CH
|
#ifdef SEGGER_STDOUT_CH
|
||||||
SEGGER_RTT_PutCharSkip(SEGGER_STDOUT_CH, c);
|
SEGGER_RTT_PutChar(SEGGER_STDOUT_CH, c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dest->write(c);
|
dest->write(c);
|
||||||
@ -85,6 +85,8 @@ size_t RedirectablePrint::logDebug(const char *format, ...)
|
|||||||
auto thread = concurrency::OSThread::currentThread;
|
auto thread = concurrency::OSThread::currentThread;
|
||||||
if(thread) {
|
if(thread) {
|
||||||
print("[");
|
print("[");
|
||||||
|
// printf("%p ", thread);
|
||||||
|
// assert(thread->ThreadName.length());
|
||||||
print(thread->ThreadName);
|
print(thread->ThreadName);
|
||||||
print("] ");
|
print("] ");
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,13 @@ void setup()
|
|||||||
concurrency::hasBeenSetup = true;
|
concurrency::hasBeenSetup = true;
|
||||||
|
|
||||||
#ifdef SEGGER_STDOUT_CH
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SEGGER
|
#ifdef USE_SEGGER
|
||||||
|
Loading…
Reference in New Issue
Block a user