Coder Social home page Coder Social logo

nirsonnenschein / mbed-os-example-cpu-stats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from armmbed/mbed-os-example-cpu-stats

0.0 0.0 0.0 32 KB

Example to demonstrate usage of `mbed_stats_cpu_get()` API usage

License: Apache License 2.0

C++ 100.00%

mbed-os-example-cpu-stats's Introduction

Getting started with CPU Stats on Mbed OS

This guide reviews the steps required to get CPU statistics on Mbed OS platform.

Please install mbed CLI.

Import the example application

From the command-line, import the example:

mbed import mbed-os-example-cpu-stats
cd mbed-os-example-cpu-stats

Now compile

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 compile -m K64F -t ARM

Your PC may take a few minutes to compile your code. At the end, you see the following result:

[snip]
+------------------+-------+-------+------+
| Module           | .text | .data | .bss |
+------------------+-------+-------+------+
| [lib]\c_w.l      | 11473 |    16 |  348 |
| [lib]\cpprt_w.l  |    36 |     0 |    0 |
| [lib]\fz_wm.l    |    18 |     0 |    0 |
| [lib]\m_wm.l     |    48 |     0 |    0 |
| anon$$obj.o      |    32 |     0 | 1024 |
| main.o           |   530 |     8 |    0 |
| mbed-os\drivers  |   165 |     0 |    0 |
| mbed-os\events   |  2139 |     8 | 1568 |
| mbed-os\features |   132 |     0 |  304 |
| mbed-os\hal      |  1910 |    34 |  128 |
| mbed-os\platform |  3695 |   104 |  604 |
| mbed-os\rtos     | 17302 |  2310 | 4592 |
| mbed-os\targets  | 10707 |   112 |  324 |
| Subtotals        | 48187 |  2592 | 8892 |
+------------------+-------+-------+------+
Total Static RAM memory (data + bss): 11484 bytes
Total Flash memory (text + data): 50779 bytes

Image: .\BUILD\K64F\ARM\mbed-os-example-cpu-stats.bin

Program your board

  1. Connect your Mbed device to the computer over USB.
  2. Copy the binary file to the Mbed device.
  3. Press the reset button to start the program.

License and contributions

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.

This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide

mbed-os-example-cpu-stats's People

Contributors

adbridge avatar bulislaw avatar 0xc0170 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.