Skip to content

Commit

Permalink
apps/blehci: Enable HCI vs event on assert for all asserts
Browse files Browse the repository at this point in the history
If HCI vs event on assert is enabled we can log all asserts, not only
those wrapped in BLE_LL_ASSERT.
  • Loading branch information
andrzej-kaczmarek committed Nov 26, 2024
1 parent ca6a764 commit b4c80e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/blehci/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
*/

#include "os/mynewt.h"
#if MYNEWT_VAL(BLE_CONTROLLER)
#include "controller/ble_ll.h"
#endif

#if MYNEWT_VAL(OS_ASSERT_CB)
void
os_assert_cb(const char *file, int line, const char *func, const char *e)
{
ble_ll_assert(file, line);
}
#endif

int
mynewt_main(int argc, char **argv)
Expand Down
3 changes: 3 additions & 0 deletions apps/blehci/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ syscfg.vals:
LOG_IMPLEMENTATION: stub
STATS_IMPLEMENTATION: full

syscfg.vals.BLE_LL_HCI_VS_EVENT_ON_ASSERT:
OS_ASSERT_CB: 1

syscfg.vals.'!BLE_TRANSPORT_NETCORE':
# Use UART by default if not built on netcore
BLE_TRANSPORT_HS: uart

0 comments on commit b4c80e1

Please sign in to comment.