Example usage of the mbed_stats_thread_get_each API.

Committer:
mbed_official
Date:
Fri Nov 22 16:02:32 2019 +0000
Revision:
26:644b0a2344b3
Parent:
15:6bca4e2b1a14
Merge https://github.com/ARMmbed/mbed-os-example-thread-statistics

.
Commit copied from https://github.com/ARMmbed/mbed-os-example-thread-statistics

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:25c062a4a1e6 1 # Getting started with thread statistics on Mbed OS
mbed_official 0:25c062a4a1e6 2
mbed_official 0:25c062a4a1e6 3 This guide reviews the steps required to get thread statistics on Mbed OS platform.
mbed_official 0:25c062a4a1e6 4
mbed_official 0:25c062a4a1e6 5 Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
mbed_official 0:25c062a4a1e6 6
mbed_official 0:25c062a4a1e6 7 ## Import the example application
mbed_official 0:25c062a4a1e6 8
mbed_official 0:25c062a4a1e6 9 From the command-line, import the example:
mbed_official 0:25c062a4a1e6 10
mbed_official 0:25c062a4a1e6 11 ```
mbed_official 0:25c062a4a1e6 12 mbed import mbed-os-example-thread-statistics
mbed_official 0:25c062a4a1e6 13 cd mbed-os-example-thread-statistics
mbed_official 0:25c062a4a1e6 14 ```
mbed_official 0:25c062a4a1e6 15
mbed_official 0:25c062a4a1e6 16 ### Now compile
mbed_official 0:25c062a4a1e6 17
mbed_official 0:25c062a4a1e6 18 Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5:
mbed_official 0:25c062a4a1e6 19
mbed_official 0:25c062a4a1e6 20 ```
mbed_official 0:25c062a4a1e6 21 mbed compile -m K64F -t ARM
mbed_official 0:25c062a4a1e6 22 ```
mbed_official 0:25c062a4a1e6 23
mbed_official 0:25c062a4a1e6 24 Your PC may take a few minutes to compile your code. At the end, you see the following result:
mbed_official 0:25c062a4a1e6 25
mbed_official 0:25c062a4a1e6 26 ```
mbed_official 0:25c062a4a1e6 27 [snip]
mbed_official 0:25c062a4a1e6 28 Elf2Bin: mbed-os-example-thread-statistics
mbed_official 0:25c062a4a1e6 29 +------------------+-------+-------+------+
mbed_official 0:25c062a4a1e6 30 | Module | .text | .data | .bss |
mbed_official 0:25c062a4a1e6 31 +------------------+-------+-------+------+
mbed_official 0:25c062a4a1e6 32 | [lib]\c_w.l | 11473 | 16 | 348 |
mbed_official 0:25c062a4a1e6 33 | [lib]\cpprt_w.l | 36 | 0 | 0 |
mbed_official 0:25c062a4a1e6 34 | [lib]\fz_wm.l | 18 | 0 | 0 |
mbed_official 0:25c062a4a1e6 35 | [lib]\m_wm.l | 48 | 0 | 0 |
mbed_official 0:25c062a4a1e6 36 | anon$$obj.o | 32 | 0 | 1024 |
mbed_official 0:25c062a4a1e6 37 | main.o | 196 | 0 | 0 |
mbed_official 0:25c062a4a1e6 38 | mbed-os\drivers | 130 | 0 | 0 |
mbed_official 0:25c062a4a1e6 39 | mbed-os\features | 132 | 0 | 304 |
mbed_official 0:25c062a4a1e6 40 | mbed-os\hal | 1660 | 30 | 64 |
mbed_official 0:25c062a4a1e6 41 | mbed-os\platform | 3657 | 104 | 604 |
mbed_official 0:25c062a4a1e6 42 | mbed-os\rtos | 13822 | 2310 | 4592 |
mbed_official 0:25c062a4a1e6 43 | mbed-os\targets | 9193 | 104 | 324 |
mbed_official 0:25c062a4a1e6 44 | Subtotals | 40397 | 2564 | 7260 |
mbed_official 0:25c062a4a1e6 45 +------------------+-------+-------+------+
mbed_official 0:25c062a4a1e6 46 Total Static RAM memory (data + bss): 9824 bytes
mbed_official 0:25c062a4a1e6 47 Total Flash memory (text + data): 42961 bytes
mbed_official 0:25c062a4a1e6 48 ```
mbed_official 0:25c062a4a1e6 49
mbed_official 0:25c062a4a1e6 50 ### Program your board
mbed_official 0:25c062a4a1e6 51
mbed_official 0:25c062a4a1e6 52 1. Connect your Mbed device to the computer over USB.
mbed_official 0:25c062a4a1e6 53 1. Copy the binary file to the Mbed device.
mbed_official 0:25c062a4a1e6 54 1. Press the reset button to start the program.
mbed_official 15:6bca4e2b1a14 55
mbed_official 15:6bca4e2b1a14 56 ### License and contributions
mbed_official 15:6bca4e2b1a14 57 The software is provided under Apache-2.0 license. Contributions to this project are accepted under the same license. Please see contributing.md for more info.
mbed_official 15:6bca4e2b1a14 58
mbed_official 15:6bca4e2b1a14 59 This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide