Skip to content

Commit 51fe2c2

Browse files
committed
NRF5x: Fix baremetal linker error
DEBUG_NRF_USER gets defined for build profiles (develop, debug) which do not define NDEBUG (see nrf_assert.h). Therefore the definition of the function should be visible if DEBUG_NRF_USER is defined.
1 parent 789a193 commit 51fe2c2

File tree

1 file changed

+2
-2
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "app_error.h"
4141
#include "nordic_common.h"
4242

43-
#if defined(DEBUG_NRF)
43+
#if defined(DEBUG_NRF_USER)
4444
void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name)
4545
{
4646
assert_info_t assert_info =
@@ -52,4 +52,4 @@ void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name)
5252

5353
UNUSED_VARIABLE(assert_info);
5454
}
55-
#endif /* DEBUG_NRF */
55+
#endif /* DEBUG_NRF_USER */

0 commit comments

Comments
 (0)