Skip to content

Commit fb93e50

Browse files
apps/blehci: Enable HCI vs event on assert for all asserts
If HCI vs event on assert is enabled we can log all asserts, not only those wrapped in BLE_LL_ASSERT.
1 parent 5ab995f commit fb93e50

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

apps/blehci/src/main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
*/
1919

2020
#include "os/mynewt.h"
21+
#if MYNEWT_VAL(BLE_CONTROLLER)
22+
#include "controller/ble_ll.h"
23+
#endif
24+
25+
#if MYNEWT_VAL(OS_ASSERT_CB)
26+
void
27+
os_assert_cb(const char *file, int line, const char *func, const char *e)
28+
{
29+
ble_ll_assert(file, line);
30+
}
31+
#endif
2132

2233
int
2334
mynewt_main(int argc, char **argv)

apps/blehci/syscfg.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ syscfg.vals:
2424
LOG_IMPLEMENTATION: stub
2525
STATS_IMPLEMENTATION: full
2626

27+
syscfg.vals.BLE_LL_HCI_VS_EVENT_ON_ASSERT:
28+
OS_ASSERT_CB: 1
29+
2730
syscfg.vals.'!BLE_TRANSPORT_NETCORE':
2831
# Use UART by default if not built on netcore
2932
BLE_TRANSPORT_HS: uart

0 commit comments

Comments
 (0)