Skip to content

Commit a1e909d

Browse files
committed
Nimble: Enable optional debug output via RTT
This allows better debugging of the bluetooth stack.
1 parent bde59c8 commit a1e909d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libs/mynewt-nimble/porting/nimble/include/logcfg/logcfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "modlog/modlog.h"
99
#include "log_common/log_common.h"
1010

11-
#define BLE_HS_LOG_DEBUG(...) IGNORE(__VA_ARGS__)
11+
#define BLE_HS_LOG_DEBUG(...) MODLOG_DEBUG(4, __VA_ARGS__)
1212
#define BLE_HS_LOG_INFO(...) MODLOG_INFO(4, __VA_ARGS__)
1313
#define BLE_HS_LOG_WARN(...) MODLOG_WARN(4, __VA_ARGS__)
1414
#define BLE_HS_LOG_ERROR(...) MODLOG_ERROR(4, __VA_ARGS__)

src/libs/mynewt-nimble/porting/nimble/include/modlog/modlog.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#ifndef H_MODLOG_
2121
#define H_MODLOG_
2222

23-
#include <stdio.h>
23+
#include "SEGGER_RTT.h"
24+
#define printf(...) SEGGER_RTT_printf(0, __VA_ARGS__)
2425

2526
#include "log_common/log_common.h"
2627
#include "log/log.h"

0 commit comments

Comments
 (0)