always print debug output to both serial and segger debug port

cc @mc-hamster, this  makes USE_SEGGER optional on nrf52 targets
This commit is contained in:
Kevin Hester
2020-11-13 07:48:25 +08:00
parent 619a48085a
commit 67e657f10f
7 changed files with 21 additions and 7 deletions

View File

@@ -404,8 +404,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Always include the SEGGER code on NRF52 - because useful for debugging
#include "SEGGER_RTT.h"
// The channel we send stdout data to
#define SEGGER_STDOUT_CH 0
// Debug printing to segger console
#define SEGGER_MSG(...) SEGGER_RTT_printf(0, __VA_ARGS__)
#define SEGGER_MSG(...) SEGGER_RTT_printf(SEGGER_STDOUT_CH, __VA_ARGS__)
// If we are not on a NRF52840 (which has built in USB-ACM serial support) and we don't have serial pins hooked up, then we MUST
// use SEGGER for debug output