Skip to content

Commit a6372e5

Browse files
authored
Merge pull request #11345 from yogpan01/fix-bare-metal-pdmc
Fix bare-metal configuration to support Pelion Device Management Client
2 parents ae247b5 + 6edab0e commit a6372e5

File tree

5 files changed

+35
-3
lines changed

5 files changed

+35
-3
lines changed

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_fhss_timer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#ifdef MBED_CONF_NANOSTACK_CONFIGURATION
19+
1820
#include "ns_types.h"
1921
#include "fhss_api.h"
2022
#include "fhss_config.h"
@@ -179,3 +181,4 @@ fhss_timer_t fhss_functions = {
179181
.fhss_resolution_divider = 1
180182
};
181183

184+
#endif

features/nanostack/nanostack-hal-mbed-cmsis-rtos/ns_event_loop.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#ifdef MBED_CONF_RTOS_PRESENT
19+
1820
#include "mbed_assert.h"
1921
#include "cmsis.h"
2022
#include "cmsis_os2.h"
@@ -130,3 +132,5 @@ void ns_event_loop_thread_start(void)
130132
#endif
131133

132134
#endif // !MBED_CONF_NANOSTACK_HAL_EVENT_LOOP_USE_MBED_EVENTS
135+
136+
#endif //MBED_CONF_RTOS_PRESENT

features/nanostack/nanostack-hal-mbed-cmsis-rtos/ns_event_loop_mbed.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717

1818
#include "mbed_assert.h"
1919
#include "platform/arm_hal_interrupt.h"
20+
#ifdef MBED_CONF_RTOS_PRESENT
2021
#include "cmsis.h"
2122
#include "cmsis_os2.h"
2223
#include "mbed_rtos_storage.h"
24+
#endif
2325
#include "ns_trace.h"
2426

2527
#include "eventOS_scheduler.h"

features/nanostack/nanostack-hal-mbed-cmsis-rtos/ns_event_loop_mutex.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@
1515
* limitations under the License.
1616
*/
1717

18+
#include "eventOS_scheduler.h"
19+
20+
#include "ns_event_loop_mutex.h"
21+
22+
#ifdef MBED_CONF_RTOS_PRESENT
1823
#include "mbed_assert.h"
1924
#include "cmsis.h"
2025
#include "cmsis_os2.h"
2126
#include "mbed_rtos_storage.h"
2227
#include "ns_trace.h"
2328

24-
#include "eventOS_scheduler.h"
25-
26-
#include "ns_event_loop_mutex.h"
2729

2830
#define TRACE_GROUP "evlm"
2931

@@ -67,3 +69,23 @@ void ns_event_loop_mutex_init(void)
6769
MBED_ASSERT(event_mutex_id != NULL);
6870
}
6971

72+
#else
73+
74+
void eventOS_scheduler_mutex_wait(void)
75+
{
76+
}
77+
78+
void eventOS_scheduler_mutex_release(void)
79+
{
80+
}
81+
82+
uint8_t eventOS_scheduler_mutex_is_owner(void)
83+
{
84+
return 1;
85+
}
86+
87+
void ns_event_loop_mutex_init(void)
88+
{
89+
}
90+
91+
#endif // MBED_CONF_RTOS_PRESENT

rtos/EventFlags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef EVENT_FLAG_H
2323
#define EVENT_FLAG_H
2424

25+
#include <cstddef>
2526
#include <stdint.h>
2627
#include "rtos/mbed_rtos_types.h"
2728
#include "rtos/mbed_rtos1_types.h"

0 commit comments

Comments
 (0)