Skip to content

Commit cfd248e

Browse files
committed
Enable ASSERTS's in nrf sdk to catch coding errors.
These will now flow through to mbed standard error handling.
1 parent db73ed0 commit cfd248e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF51/source/btle/btle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ static void btle_handler(ble_evt_t *p_ble_evt)
299299
gattServer.hwCallback(p_ble_evt);
300300
}
301301

302-
/*! @brief Callback when an error occurs inside the SoftDevice */
302+
/*! @brief Callback when an error occurs inside the SoftDevice or ASSERT in debug*/
303303
void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name)
304304
{
305-
ASSERT_TRUE(false, (void) 0);
305+
error("nrf failure at %s:%d", p_file_name, line_num);
306306
}
307307

308308
/*!

targets/targets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3450,7 +3450,8 @@
34503450
"CMSIS_VECTAB_VIRTUAL",
34513451
"CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"",
34523452
"NO_SYSTICK",
3453-
"MBED_TICKLESS"
3453+
"MBED_TICKLESS",
3454+
"DEBUG_NRF_USER"
34543455
],
34553456
"MERGE_BOOTLOADER": false,
34563457
"extra_labels": [

0 commit comments

Comments
 (0)