Skip to content

Commit 244b7a5

Browse files
committed
Only enable DEBUG_NRF_USER when NDEBUG is not set
1 parent f49070c commit 244b7a5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
extern "C" {
5353
#endif
5454

55+
#if !defined(NDEBUG) && !defined(DEBUG_NRF_USER)
56+
#define DEBUG_NRF_USER
57+
#endif
58+
5559
#if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER)
5660

5761
/** @brief Function for handling assertions.

targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_14_2/libraries/util/nrf_assert.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ extern "C" {
7676
void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name);
7777
//lint -restore
7878

79+
#if !defined(NDEBUG) && !defined(DEBUG_NRF_USER)
80+
#define DEBUG_NRF_USER
81+
#endif
82+
7983
#if (defined(DEBUG_NRF) || defined(DEBUG_NRF_USER))
8084
#define NRF_ASSERT_PRESENT 1
8185
#else

targets/targets.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,8 +3450,7 @@
34503450
"CMSIS_VECTAB_VIRTUAL",
34513451
"CMSIS_VECTAB_VIRTUAL_HEADER_FILE=\"cmsis_nvic.h\"",
34523452
"NO_SYSTICK",
3453-
"MBED_TICKLESS",
3454-
"DEBUG_NRF_USER"
3453+
"MBED_TICKLESS"
34553454
],
34563455
"MERGE_BOOTLOADER": false,
34573456
"extra_labels": [

0 commit comments

Comments
 (0)