Enable ASSERTS's in nrf sdk to catch coding errors.

These will now flow through to mbed standard error handling.
pull/6022/head
Andrew Leech 2018-02-06 12:39:56 +11:00
parent db73ed0751
commit cfd248ee05
2 changed files with 4 additions and 3 deletions

View File

@ -299,10 +299,10 @@ static void btle_handler(ble_evt_t *p_ble_evt)
gattServer.hwCallback(p_ble_evt); gattServer.hwCallback(p_ble_evt);
} }
/*! @brief Callback when an error occurs inside the SoftDevice */ /*! @brief Callback when an error occurs inside the SoftDevice or ASSERT in debug*/
void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name) void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name)
{ {
ASSERT_TRUE(false, (void) 0); error("nrf failure at %s:%d", p_file_name, line_num);
} }
/*! /*!

View File

@ -3450,7 +3450,8 @@
"CMSIS_VECTAB_VIRTUAL", "CMSIS_VECTAB_VIRTUAL",
"CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"", "CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"",
"NO_SYSTICK", "NO_SYSTICK",
"MBED_TICKLESS" "MBED_TICKLESS",
"DEBUG_NRF_USER"
], ],
"MERGE_BOOTLOADER": false, "MERGE_BOOTLOADER": false,
"extra_labels": [ "extra_labels": [