Skip to content

Commit 86005da

Browse files
committed
Merge branch 'master' of https://github.com/ARMmbed/mbed-os
* 'master' of https://github.com/ARMmbed/mbed-os: (63 commits) [XDOT_L151] add IAR support Modify mbedtls scripts to add config-no-entropy.h Remove extra spaces [XDOT_L151] include xDot in mbed 5 releases [STM32F429ZI] INITIAL_SP correction [STM32F091RC] patch for tests-mbedmicro-rtos-mbed-threads mbedtls trng - remove MBEDTLS_ENTROPY_HARDWARE_ALT targets - add TRNG device_has to STM32F7 targets mbedtls - move TRNG mbed impl into platform folder TRNG HAL - fix length doc wording for get_bytes HAL TRNG - add dummy variable to empty structs TRNG - protect HAL implementation if DEVICE_TRNG is not defined TRNG - remove set seed function HAL - RNG rename to TRNG HAL - rng nuvoton cleanup code style RNG - fix warnings due to obj not used for some targets RNG - rename rng_get_numbers to rng_get_bytes mbedtls - mbed wrapper rename to mbed_rng HAL: Add rng set seed value function NUMAKER_PFM_NUC472: Add RGN HAL API implementation ... # Conflicts: # hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c
2 parents d0eed52 + 58c12f1 commit 86005da

File tree

93 files changed

+1326
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1326
-437
lines changed

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
#if defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832)
1919
#define STACK_SIZE 512
20-
#elif (defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB) || defined(TARGET_STM32F103RB))
20+
#elif defined(TARGET_STM32F070RB) || defined(TARGET_STM32F072RB) || defined(TARGET_STM32F103RB) || defined(TARGET_STM32F091RC)
2121
#define STACK_SIZE 512
2222
#else
2323
#define STACK_SIZE DEFAULT_STACK_SIZE

features/FEATURE_BLE/ble/deprecate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
#define __deprecated_message(msg)
2424
#endif
2525

26-
#endif
26+
#endif

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/common/ble_conn_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void record_purge_disconnected()
169169
m_bcs.valid_conn_handles,
170170
(~m_bcs.flags.connected_flags) & (m_bcs.flags.valid_flags));
171171

172-
for (int i = 0; i < disconnected_list.len; i++)
172+
for (uint32_t i = 0; i < disconnected_list.len; i++)
173173
{
174174
record_invalidate(disconnected_list.flag_keys[i]);
175175
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/peer_manager/peer_database.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static pdb_buffer_record_t * write_buffer_record_find_unused(void)
172172
*/
173173
static void write_buffer_record_release(pdb_buffer_record_t * p_write_buffer_record)
174174
{
175-
for (int i = 0; i < p_write_buffer_record->n_bufs; i++)
175+
for (uint32_t i = 0; i < p_write_buffer_record->n_bufs; i++)
176176
{
177177
pm_buffer_release(&m_pdb.write_buffer, p_write_buffer_record->buffer_block_id + i);
178178
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/ble/peer_manager/pm_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ uint8_t pm_buffer_block_acquire(pm_buffer_t * p_buffer, uint32_t n_blocks)
9393
{
9494
first_locked_mutex = i;
9595
}
96-
if ((i - first_locked_mutex + 1) == n_blocks)
96+
if ((i - first_locked_mutex + 1) >= 0 && ((uint32_t)(i - first_locked_mutex + 1)) == n_blocks)
9797
{
9898
return first_locked_mutex;
9999
}

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/drivers_nrf/delay/nrf_delay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ __STATIC_INLINE void nrf_delay_us(uint32_t volatile number_of_us)
191191

192192
#elif defined ( __GNUC__ )
193193

194-
static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
195-
static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)
194+
static __INLINE void nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
195+
static __INLINE void nrf_delay_us(uint32_t volatile number_of_us)
196196
{
197197
register uint32_t delay __ASM ("r0") = number_of_us;
198198
__ASM volatile (

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fds/fds.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
#include "nrf_error.h"
4141
#include "app_util.h"
4242

43+
static void fs_callback(uint8_t op_code,
44+
uint32_t result,
45+
uint32_t const * p_data,
46+
fs_length_t length_words);
4347

4448
/** Our fstorage configuration.
4549
* The other fields will be assigned automatically during compilation. */

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fds/fds_types_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#define FDS_CMD_QUEUE_SIZE_GC (1)
6969

7070

71-
static uint8_t m_nested_critical;
71+
//static uint8_t m_nested_critical;
7272

7373
/** Macros to enable and disable application interrupts. */
7474
#define CRITICAL_SECTION_ENTER() //sd_nvic_critical_region_enter(&m_nested_critical)

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fstorage/fstorage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ void fs_debug_print()
559559
printf("Num items: 0x%08lx\r\n", (unsigned long)FS_SECTION_VARS_COUNT);
560560
printf("===== ITEMS %lu =====\r\n", (unsigned long)FS_SECTION_VARS_COUNT);
561561

562-
for(int i = 0; i < FS_SECTION_VARS_COUNT; i++)
562+
for(uint32_t i = 0; i < FS_SECTION_VARS_COUNT; i++)
563563
{
564564
fs_config_t* config = FS_SECTION_VARS_GET(i);
565565
printf( "Address: 0x%08lx, CB: 0x%08lx\r\n",

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/fstorage/fstorage.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,6 @@ typedef void (*fs_cb_t)(uint8_t op_code,
7474
fs_length_t length_words);
7575

7676

77-
/**@brief Function prototype for a callback handler.
78-
*
79-
* @details This function is expected to be implemented by the module that
80-
* registers for fstorage usage. Its usage is described
81-
* in the function pointer type fs_cb_t.
82-
*
83-
* @param[in] op_code Flash operation code.
84-
* @param[in] result Result of the flash operation.
85-
* @param[in] p_data Pointer to the resulting data (or NULL if not in use).
86-
* @param[in] length_words Length of data in words.
87-
*/
88-
static void fs_callback(uint8_t op_code,
89-
uint32_t result,
90-
uint32_t const * p_data,
91-
fs_length_t length_words);
92-
93-
9477
/**@brief Flash storage config variable.
9578
*
9679
* @details The fstorage module will update the start_addr and end_address according to

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/util/app_util_platform.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ typedef enum
6868
#define EXTERNAL_INT_VECTOR_OFFSET 16
6969
/**@endcond */
7070

71-
#define PACKED(TYPE) __packed TYPE
72-
7371
void critical_region_enter (void);
7472
void critical_region_exit (void);
7573

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/libraries/util/sdk_mapped_flags.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void sdk_mapped_flags_bulk_update_by_key(uint16_t * p_keys,
111111
{
112112
if (p_keys[i] == key)
113113
{
114-
for (int j = 0; j < n_flag_collections; j++)
114+
for (uint32_t j = 0; j < n_flag_collections; j++)
115115
{
116116
if (value)
117117
{

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/source/softdevice/s130/headers/nrf_svc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
#define SVCALL(number, return_type, signature) return_type __svc(number) signature
4343
#elif defined (__GNUC__)
4444
#define SVCALL(number, return_type, signature) \
45-
_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
46-
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
4745
_Pragma("GCC diagnostic push") \
4846
_Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
49-
__attribute__((naked)) static return_type signature \
47+
__attribute__((naked)) \
48+
__attribute__((unused)) \
49+
static return_type signature \
5050
{ \
5151
__asm( \
5252
"svc %0\n" \

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static void btle_handler(ble_evt_t *p_ble_evt)
234234
/*! @brief Callback when an error occurs inside the SoftDevice */
235235
void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name)
236236
{
237-
ASSERT(false, (void) 0);
237+
ASSERT_TRUE(false, (void) 0);
238238
}
239239

240240
/*!

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/btle/btle_discovery.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
void bleGattcEventHandler(const ble_evt_t *p_ble_evt)
2424
{
2525
nRF5xn &ble = nRF5xn::Instance(BLE::DEFAULT_INSTANCE);
26-
nRF5xGap &gap = (nRF5xGap &) ble.getGap();
2726
nRF5xGattClient &gattClient = (nRF5xGattClient &) ble.getGattClient();
2827
nRF5xServiceDiscovery &sdSingleton = gattClient.discovery();
2928
nRF5xCharacteristicDescriptorDiscoverer &characteristicDescriptorDiscoverer =

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/btle/custom/custom_helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid)
135135
#define CFG_CUSTOM_UUID_BASE "\x6E\x40\x00\x00\xB5\xA3\xF3\x93\xE0\xA9\xE5\x0E\x24\xDC\xCA\x9E"
136136
137137
uint8_t uuid_type = custom_add_uuid_base(CFG_CUSTOM_UUID_BASE);
138-
ASSERT(uuid_type > 0, ERROR_NOT_FOUND);
138+
ASSERT_TRUE(uuid_type > 0, ERROR_NOT_FOUND);
139139
140140
// We can now safely add the primary service and any characteristics
141141
// for our custom service ...

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/common/assertion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ static inline void debugger_breakpoint(void)
125125
//--------------------------------------------------------------------+
126126
// Logical Assert
127127
//--------------------------------------------------------------------+
128-
#define ASSERT(...) ASSERT_TRUE(__VA_ARGS__)
129128
#define ASSERT_TRUE(condition , error) ASSERT_DEFINE( , (condition), error, "%s", "evaluated to false")
130129
#define ASSERT_FALSE(condition , error) ASSERT_DEFINE( ,!(condition), error, "%s", "evaluated to true")
131130

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/nRF5xGap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ ble_error_t nRF5xGap::setAdvertisingData(const GapAdvertisingData &advData, cons
9696
//}
9797

9898
/* Send advertising data! */
99-
ASSERT(ERROR_NONE ==
99+
ASSERT_TRUE(ERROR_NONE ==
100100
sd_ble_gap_adv_data_set(advData.getPayload(),
101101
advData.getPayloadLen(),
102102
scanResponse.getPayload(),
@@ -105,7 +105,7 @@ ble_error_t nRF5xGap::setAdvertisingData(const GapAdvertisingData &advData, cons
105105

106106
/* Make sure the GAP Service appearance value is aligned with the
107107
*appearance from GapAdvertisingData */
108-
ASSERT(ERROR_NONE == sd_ble_gap_appearance_set(advData.getAppearance()),
108+
ASSERT_TRUE(ERROR_NONE == sd_ble_gap_appearance_set(advData.getAppearance()),
109109
BLE_ERROR_PARAM_OUT_OF_RANGE);
110110

111111
/* ToDo: Perform some checks on the payload, for example the Scan Response can't */
@@ -196,7 +196,7 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
196196
adv_para.interval = params.getIntervalInADVUnits(); // advertising interval (in units of 0.625 ms)
197197
adv_para.timeout = params.getTimeout();
198198

199-
ASSERT(ERROR_NONE == sd_ble_gap_adv_start(&adv_para), BLE_ERROR_PARAM_OUT_OF_RANGE);
199+
ASSERT_TRUE(ERROR_NONE == sd_ble_gap_adv_start(&adv_para), BLE_ERROR_PARAM_OUT_OF_RANGE);
200200

201201
return BLE_ERROR_NONE;
202202
}
@@ -267,7 +267,7 @@ ble_error_t nRF5xGap::stopScan(void) {
267267
ble_error_t nRF5xGap::stopAdvertising(void)
268268
{
269269
/* Stop Advertising */
270-
ASSERT(ERROR_NONE == sd_ble_gap_adv_stop(), BLE_ERROR_PARAM_OUT_OF_RANGE);
270+
ASSERT_TRUE(ERROR_NONE == sd_ble_gap_adv_stop(), BLE_ERROR_PARAM_OUT_OF_RANGE);
271271

272272
state.advertising = 0;
273273

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/nRF5xGap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ class nRF5xGap : public Gap
220220
*/
221221
void processRadioNotificationEvent(bool param) {
222222
radioNotificationCallbackParam = param;
223-
radioNotificationTimeout.attach_us(this, &nRF5xGap::postRadioNotificationCallback, 0);
223+
radioNotificationTimeout.attach_us(mbed::callback(this, &nRF5xGap::postRadioNotificationCallback), 0);
224224
}
225225
friend void radioNotificationStaticCallback(bool param); /* allow invocations of processRadioNotificationEvent() */
226226

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/source/nRF5xGattServer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
5252
nordicUUID = custom_convert_to_nordic_uuid(service.getUUID());
5353

5454
uint16_t serviceHandle;
55-
ASSERT( ERROR_NONE ==
55+
ASSERT_TRUE( ERROR_NONE ==
5656
sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
5757
&nordicUUID,
5858
&serviceHandle),
@@ -88,7 +88,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
8888
}
8989
}
9090

91-
ASSERT ( ERROR_NONE ==
91+
ASSERT_TRUE ( ERROR_NONE ==
9292
custom_add_in_characteristic(BLE_GATT_HANDLE_INVALID,
9393
&nordicUUID,
9494
p_char->getProperties(),
@@ -123,7 +123,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
123123

124124
nordicUUID = custom_convert_to_nordic_uuid(p_desc->getUUID());
125125

126-
ASSERT(ERROR_NONE ==
126+
ASSERT_TRUE(ERROR_NONE ==
127127
custom_add_in_descriptor(BLE_GATT_HANDLE_INVALID,
128128
&nordicUUID,
129129
p_desc->getValuePtr(),
@@ -177,7 +177,7 @@ ble_error_t nRF5xGattServer::read(Gap::Handle_t connectionHandle, GattAttribute:
177177
.p_value = buffer,
178178
};
179179

180-
ASSERT( ERROR_NONE ==
180+
ASSERT_TRUE( ERROR_NONE ==
181181
sd_ble_gatts_value_get(connectionHandle, attributeHandle, &value),
182182
BLE_ERROR_PARAM_OUT_OF_RANGE);
183183
*lengthP = value.len;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static void btle_handler(ble_evt_t *p_ble_evt)
292292
/*! @brief Callback when an error occurs inside the SoftDevice */
293293
void assert_nrf_callback(uint16_t line_num, const uint8_t *p_file_name)
294294
{
295-
ASSERT(false, (void) 0);
295+
ASSERT_TRUE(false, (void) 0);
296296
}
297297

298298
/*!

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/common/assertion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ static inline void debugger_breakpoint(void)
125125
//--------------------------------------------------------------------+
126126
// Logical Assert
127127
//--------------------------------------------------------------------+
128-
#define ASSERT(...) ASSERT_TRUE(__VA_ARGS__)
129128
#define ASSERT_TRUE(condition , error) ASSERT_DEFINE( , (condition), error, "%s", "evaluated to false")
130129
#define ASSERT_FALSE(condition , error) ASSERT_DEFINE( ,!(condition), error, "%s", "evaluated to true")
131130

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ ble_error_t nRF5xGap::setAdvertisingData(const GapAdvertisingData &advData, cons
9696
//}
9797

9898
/* Send advertising data! */
99-
ASSERT(ERROR_NONE ==
99+
ASSERT_TRUE(ERROR_NONE ==
100100
sd_ble_gap_adv_data_set(advData.getPayload(),
101101
advData.getPayloadLen(),
102102
scanResponse.getPayload(),
@@ -105,7 +105,7 @@ ble_error_t nRF5xGap::setAdvertisingData(const GapAdvertisingData &advData, cons
105105

106106
/* Make sure the GAP Service appearance value is aligned with the
107107
*appearance from GapAdvertisingData */
108-
ASSERT(ERROR_NONE == sd_ble_gap_appearance_set(advData.getAppearance()),
108+
ASSERT_TRUE(ERROR_NONE == sd_ble_gap_appearance_set(advData.getAppearance()),
109109
BLE_ERROR_PARAM_OUT_OF_RANGE);
110110

111111
/* ToDo: Perform some checks on the payload, for example the Scan Response can't */
@@ -273,7 +273,7 @@ ble_error_t nRF5xGap::stopScan(void) {
273273
ble_error_t nRF5xGap::stopAdvertising(void)
274274
{
275275
/* Stop Advertising */
276-
ASSERT(ERROR_NONE == sd_ble_gap_adv_stop(), BLE_ERROR_PARAM_OUT_OF_RANGE);
276+
ASSERT_TRUE(ERROR_NONE == sd_ble_gap_adv_stop(), BLE_ERROR_PARAM_OUT_OF_RANGE);
277277

278278
state.advertising = 0;
279279

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class nRF5xGap : public Gap
221221
*/
222222
void processRadioNotificationEvent(bool param) {
223223
radioNotificationCallbackParam = param;
224-
radioNotificationTimeout.attach_us(this, &nRF5xGap::postRadioNotificationCallback, 0);
224+
radioNotificationTimeout.attach_us(mbed::callback(this, &nRF5xGap::postRadioNotificationCallback), 0);
225225
}
226226
friend void radioNotificationStaticCallback(bool param); /* allow invocations of processRadioNotificationEvent() */
227227

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGattServer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
5252
nordicUUID = custom_convert_to_nordic_uuid(service.getUUID());
5353

5454
uint16_t serviceHandle;
55-
ASSERT( ERROR_NONE ==
55+
ASSERT_TRUE( ERROR_NONE ==
5656
sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
5757
&nordicUUID,
5858
&serviceHandle),
@@ -88,7 +88,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
8888
}
8989
}
9090

91-
ASSERT ( ERROR_NONE ==
91+
ASSERT_TRUE ( ERROR_NONE ==
9292
custom_add_in_characteristic(BLE_GATT_HANDLE_INVALID,
9393
&nordicUUID,
9494
p_char->getProperties(),
@@ -123,7 +123,7 @@ ble_error_t nRF5xGattServer::addService(GattService &service)
123123

124124
nordicUUID = custom_convert_to_nordic_uuid(p_desc->getUUID());
125125

126-
ASSERT(ERROR_NONE ==
126+
ASSERT_TRUE(ERROR_NONE ==
127127
custom_add_in_descriptor(BLE_GATT_HANDLE_INVALID,
128128
&nordicUUID,
129129
p_desc->getValuePtr(),
@@ -177,7 +177,7 @@ ble_error_t nRF5xGattServer::read(Gap::Handle_t connectionHandle, GattAttribute:
177177
.p_value = buffer,
178178
};
179179

180-
ASSERT( ERROR_NONE ==
180+
ASSERT_TRUE( ERROR_NONE ==
181181
sd_ble_gatts_value_get(connectionHandle, attributeHandle, &value),
182182
BLE_ERROR_PARAM_OUT_OF_RANGE);
183183
*lengthP = value.len;

features/frameworks/greentea-client/greentea-client/greentea_serial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ class GreenteaSerial : public mbed::RawSerial {
1010
};
1111

1212
extern SingletonPtr<GreenteaSerial> greentea_serial;
13-
#endif
13+
#endif

features/frameworks/greentea-client/source/greentea_metrics.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ typedef struct {
3535

3636
// Mutex to protect "buf"
3737
SingletonPtr<Mutex> mutex;
38+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
3839
static char buf[128];
3940
static SingletonPtr<CircularBuffer<thread_info_t, THREAD_BUF_COUNT> > queue;
41+
#endif
4042

4143
static void send_heap_info(void);
44+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
4245
static void send_stack_info(void);
4346
static void on_thread_terminate(osThreadId id);
4447
static void enqeue_thread_info(osThreadId id);
@@ -47,6 +50,7 @@ static void deque_and_print_thread_info(void);
4750
// sprintf uses a lot of stack so use these instead
4851
static uint32_t print_hex(char *buf, uint32_t value);
4952
static uint32_t print_dec(char *buf, uint32_t value);
53+
#endif
5054

5155
void greentea_metrics_setup()
5256
{
@@ -71,6 +75,7 @@ static void send_heap_info()
7175
greentea_send_kv("max_heap_usage",heap_stats.max_size);
7276
}
7377

78+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
7479
MBED_UNUSED static void send_stack_info()
7580
{
7681
mutex->lock();
@@ -205,3 +210,5 @@ static uint32_t print_dec(char *buf, uint32_t value)
205210

206211
return pos;
207212
}
213+
214+
#endif

features/frameworks/greentea-client/source/greentea_serial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
SingletonPtr<GreenteaSerial> greentea_serial;
44

5-
GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {};
5+
GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {};

0 commit comments

Comments
 (0)