@@ -35,10 +35,13 @@ typedef struct {
35
35
36
36
// Mutex to protect "buf"
37
37
SingletonPtr<Mutex> mutex;
38
+ #if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
38
39
static char buf[128 ];
39
40
static SingletonPtr<CircularBuffer<thread_info_t , THREAD_BUF_COUNT> > queue;
41
+ #endif
40
42
41
43
static void send_heap_info (void );
44
+ #if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
42
45
static void send_stack_info (void );
43
46
static void on_thread_terminate (osThreadId id);
44
47
static void enqeue_thread_info (osThreadId id);
@@ -47,6 +50,7 @@ static void deque_and_print_thread_info(void);
47
50
// sprintf uses a lot of stack so use these instead
48
51
static uint32_t print_hex (char *buf, uint32_t value);
49
52
static uint32_t print_dec (char *buf, uint32_t value);
53
+ #endif
50
54
51
55
void greentea_metrics_setup ()
52
56
{
@@ -71,6 +75,7 @@ static void send_heap_info()
71
75
greentea_send_kv (" max_heap_usage" ,heap_stats.max_size );
72
76
}
73
77
78
+ #if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
74
79
MBED_UNUSED static void send_stack_info ()
75
80
{
76
81
mutex->lock ();
@@ -205,3 +210,5 @@ static uint32_t print_dec(char *buf, uint32_t value)
205
210
206
211
return pos;
207
212
}
213
+
214
+ #endif
0 commit comments