mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: platform/mbed_stats.h
- Revision:
- 189:f392fc9709a3
- Parent:
- 188:bcfe06ba3d64
--- a/platform/mbed_stats.h Thu Nov 08 11:46:34 2018 +0000 +++ b/platform/mbed_stats.h Wed Feb 20 22:31:08 2019 +0000 @@ -7,6 +7,7 @@ */ /* mbed Microcontroller Library * Copyright (c) 2016-2018 ARM Limited + * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,13 +32,28 @@ #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 + /** * struct mbed_stats_heap_t definition */ @@ -65,7 +81,7 @@ uint32_t thread_id; /**< Identifier for the thread that owns the stack or 0 if representing accumulated statistics */ uint32_t max_size; /**< Maximum number of bytes used on the stack since the thread was started */ uint32_t reserved_size; /**< Current number of bytes reserved for the stack */ - uint32_t stack_cnt; /**< The number of stacks represented in the accumulated statistics or 1 if repesenting a single stack */ + uint32_t stack_cnt; /**< The number of stacks represented in the accumulated statistics or 1 if representing a single stack */ } mbed_stats_stack_t; /** @@ -140,10 +156,14 @@ * struct mbed_stats_sys_t definition */ typedef struct { - uint32_t os_version; /**< Mbed OS version (populated only for tagged releases) */ - uint32_t cpu_id; /**< CPUID register data (Cortex-M only supported) */ - mbed_compiler_id_t compiler_id; /**< Compiler ID \ref mbed_compiler_id_t */ - uint32_t compiler_version; /**< Compiler version */ + uint32_t os_version; /**< Mbed OS version (populated only for tagged releases) */ + uint32_t cpu_id; /**< CPUID register data (Cortex-M only supported) */ + mbed_compiler_id_t compiler_id; /**< Compiler ID \ref mbed_compiler_id_t */ + uint32_t compiler_version; /**< Compiler version */ + uint32_t ram_start[MBED_MAX_MEM_REGIONS]; /**< Start addresses of all internal RAM memories */ + uint32_t ram_size[MBED_MAX_MEM_REGIONS]; /**< Size of all internal RAM memories in target */ + uint32_t rom_start[MBED_MAX_MEM_REGIONS]; /**< Start addresses of all internal ROM memories */ + uint32_t rom_size[MBED_MAX_MEM_REGIONS]; /**< Size of all internal ROM memories in target */ } mbed_stats_sys_t; /**