Allow using Segger RTT as debug output (#3052)

Firmware needs to be built with -DDEBUG=YES and -DDEBUG_SEGGER_RTT=YES to use this feature.
This commit is contained in:
Cliff
2023-01-23 09:08:31 +01:00
committed by GitHub
parent 15dca01f42
commit 0b8e4c6003
7 changed files with 69 additions and 12 deletions
@@ -27,6 +27,10 @@
#include "keys.h"
#include "debug.h"
#if defined(DEBUG_SEGGER_RTT)
#include "thirdparty/Segger_RTT/RTT/SEGGER_RTT.h"
#endif
#if defined(PCBXLITE)
#define BOOTLOADER_KEYS 0x0F
#else
@@ -83,7 +87,7 @@ void interrupt10ms()
#if defined(DEBUG)
g_tmr10ms++;
#endif
uint8_t index = 0;
uint32_t in = readKeys();
@@ -228,6 +232,10 @@ void bootloaderInitApp()
boardBootloaderInit();
#endif
#if defined(DEBUG_SEGGER_RTT)
SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP);
#endif
pwrInit();
keysInit();
@@ -267,7 +275,7 @@ void bootloaderInitApp()
#endif
delaysInit(); // needed for lcdInit()
#if defined(DEBUG)
initSerialPorts();
#endif