From 6afca2460e014b63ac13cdbb958074479fd36ac4 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Fri, 20 Dec 2019 12:05:01 +0000 Subject: [PATCH] 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 also be visible if DEBUG_NRF_USER is defined. --- .../TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.c b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.c index 23ba8f76cb..cf931ccc8c 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_11/libraries/util/nrf_assert.c @@ -40,7 +40,8 @@ #include "app_error.h" #include "nordic_common.h" -#if defined(DEBUG_NRF) +#if !MBED_CONF_BLE_PRESENT +#if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name) { assert_info_t assert_info = @@ -52,4 +53,5 @@ void assert_nrf_callback(uint16_t line_num, const uint8_t * file_name) UNUSED_VARIABLE(assert_info); } -#endif /* DEBUG_NRF */ +#endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */ +#endif // !MBED_CONF_BLE_PRESENT