diff --git a/TESTS/mbed_platform/stats_sys/main.cpp b/TESTS/mbed_platform/stats_sys/main.cpp index a9949d67db..9cbd898e56 100644 --- a/TESTS/mbed_platform/stats_sys/main.cpp +++ b/TESTS/mbed_platform/stats_sys/main.cpp @@ -32,6 +32,7 @@ void test_sys_info() mbed_stats_sys_t stats; mbed_stats_sys_get(&stats); + TEST_ASSERT_NOT_EQUAL(0, stats.os_version); #if defined(__CORTEX_M) TEST_ASSERT_NOT_EQUAL(0, stats.cpu_id); #endif diff --git a/platform/mbed_stats.c b/platform/mbed_stats.c index 6886ed30d2..11d870b7d1 100644 --- a/platform/mbed_stats.c +++ b/platform/mbed_stats.c @@ -1,6 +1,7 @@ #include "mbed_assert.h" #include "mbed_stats.h" #include "mbed_power_mgmt.h" +#include "mbed_version.h" #include #include @@ -123,6 +124,7 @@ void mbed_stats_sys_get(mbed_stats_sys_t *stats) memset(stats, 0, sizeof(mbed_stats_sys_t)); #if defined(MBED_SYS_STATS_ENABLED) + stats->os_version = MBED_VERSION; #if defined(__CORTEX_M) stats->cpu_id = SCB->CPUID; #endif diff --git a/platform/mbed_stats.h b/platform/mbed_stats.h index 5eaef3cadc..4532041379 100644 --- a/platform/mbed_stats.h +++ b/platform/mbed_stats.h @@ -6,7 +6,7 @@ * @{ */ /* mbed Microcontroller Library - * Copyright (c) 2016-2016 ARM Limited + * Copyright (c) 2016-2018 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.