diff --git a/platform/mbed_lib.json b/platform/mbed_lib.json index cf5b16325f..821df0b672 100644 --- a/platform/mbed_lib.json +++ b/platform/mbed_lib.json @@ -72,6 +72,12 @@ "value": null }, + "all-stats-enabled": { + "macro_name": "MBED_ALL_STATS_ENABLED", + "help": "Set to 1 to enable all platform stats. When enabled the functions mbed_stats_*_get returns non-zero data. See mbed_stats.h for more information", + "value": null + }, + "sys-stats-enabled": { "macro_name": "MBED_SYS_STATS_ENABLED", "help": "Set to 1 to enable system stats. When enabled the function mbed_stats_sys_get returns non-zero data. See mbed_stats.h for more information", @@ -106,6 +112,7 @@ "help": "HTTP URL string for ARM Mbed-OS Error Decode microsite", "value": "\"\\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X\"" }, + "cthunk_count_max": { "help": "The maximum CThunk objects used at the same time. This must be greater than 0 and less 256", "value": 8 diff --git a/platform/mbed_stats.h b/platform/mbed_stats.h index daf4092b49..bb6617334f 100644 --- a/platform/mbed_stats.h +++ b/platform/mbed_stats.h @@ -31,13 +31,25 @@ extern "C" { #endif #ifdef MBED_ALL_STATS_ENABLED + +#ifndef MBED_SYS_STATS_ENABLED #define MBED_SYS_STATS_ENABLED 1 +#endif +#ifndef MBED_STACK_STATS_ENABLED #define MBED_STACK_STATS_ENABLED 1 +#endif +#ifndef MBED_CPU_STATS_ENABLED #define MBED_CPU_STATS_ENABLED 1 +#endif +#ifndef MBED_HEAP_STATS_ENABLED #define MBED_HEAP_STATS_ENABLED 1 +#endif +#ifndef MBED_THREAD_STATS_ENABLED #define MBED_THREAD_STATS_ENABLED 1 #endif +#endif // MBED_ALL_STATS_ENABLED + /** Maximum memory regions reported by mbed-os memory statistics */ #define MBED_MAX_MEM_REGIONS 4