adxl362 csv output format

Committer:
APS_Lab
Date:
Thu May 16 07:02:24 2019 +0000
Revision:
0:813b34a76f24
adxl362

Who changed what in which revision?

UserRevisionLine numberNew contents of line
APS_Lab 0:813b34a76f24 1 # Getting started example for Mbed OS
APS_Lab 0:813b34a76f24 2
APS_Lab 0:813b34a76f24 3 This guide reviews the steps required to get Blinky with the addition of dynamic OS statistics working on an Mbed OS platform. (Note: To see a rendered example you can import into the Arm Online Compiler, please see our [quick start](https://os.mbed.com/docs/mbed-os/latest/quick-start/online-with-the-online-compiler.html#importing-the-code).)
APS_Lab 0:813b34a76f24 4
APS_Lab 0:813b34a76f24 5 Please install [Mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
APS_Lab 0:813b34a76f24 6
APS_Lab 0:813b34a76f24 7 ## Import the example application
APS_Lab 0:813b34a76f24 8
APS_Lab 0:813b34a76f24 9 From the command-line, import the example:
APS_Lab 0:813b34a76f24 10
APS_Lab 0:813b34a76f24 11 ```
APS_Lab 0:813b34a76f24 12 mbed import mbed-os-example-blinky
APS_Lab 0:813b34a76f24 13 cd mbed-os-example-blinky
APS_Lab 0:813b34a76f24 14 ```
APS_Lab 0:813b34a76f24 15
APS_Lab 0:813b34a76f24 16 ### Now compile
APS_Lab 0:813b34a76f24 17
APS_Lab 0:813b34a76f24 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:
APS_Lab 0:813b34a76f24 19
APS_Lab 0:813b34a76f24 20 ```
APS_Lab 0:813b34a76f24 21 mbed compile -m K64F -t ARM
APS_Lab 0:813b34a76f24 22 ```
APS_Lab 0:813b34a76f24 23
APS_Lab 0:813b34a76f24 24 Your PC may take a few minutes to compile your code. At the end, you see the following result:
APS_Lab 0:813b34a76f24 25
APS_Lab 0:813b34a76f24 26 ```
APS_Lab 0:813b34a76f24 27 [snip]
APS_Lab 0:813b34a76f24 28
APS_Lab 0:813b34a76f24 29 Image: ./BUILD/K64F/GCC_ARM/mbed-os-example-blinky.bin
APS_Lab 0:813b34a76f24 30 ```
APS_Lab 0:813b34a76f24 31
APS_Lab 0:813b34a76f24 32 ### Program your board
APS_Lab 0:813b34a76f24 33
APS_Lab 0:813b34a76f24 34 1. Connect your Mbed device to the computer over USB.
APS_Lab 0:813b34a76f24 35 1. Copy the binary file to the Mbed device.
APS_Lab 0:813b34a76f24 36 1. Press the reset button to start the program.
APS_Lab 0:813b34a76f24 37
APS_Lab 0:813b34a76f24 38 The LED on your platform turns on and off. The main thread will additionally take a snapshot of the device's runtime statistics and display it over serial to your PC. The snapshot includes:
APS_Lab 0:813b34a76f24 39
APS_Lab 0:813b34a76f24 40 * System Information:
APS_Lab 0:813b34a76f24 41 * Mbed OS Version: Will currently default to 999999
APS_Lab 0:813b34a76f24 42 * Compiler ID
APS_Lab 0:813b34a76f24 43 * ARM = 1
APS_Lab 0:813b34a76f24 44 * GCC_ARM = 2
APS_Lab 0:813b34a76f24 45 * IAR = 3
APS_Lab 0:813b34a76f24 46 * [CPUID Register Information](#cpuid-register-information)
APS_Lab 0:813b34a76f24 47 * [Compiler Version](#compiler-version)
APS_Lab 0:813b34a76f24 48 * CPU Statistics
APS_Lab 0:813b34a76f24 49 * Percentage of runtime that the device has spent awake versus in sleep
APS_Lab 0:813b34a76f24 50 * Heap Statistics
APS_Lab 0:813b34a76f24 51 * Current heap size
APS_Lab 0:813b34a76f24 52 * Max heap size which refers to the largest the heap has grown to
APS_Lab 0:813b34a76f24 53 * Thread Statistics
APS_Lab 0:813b34a76f24 54 * Provides information on all running threads in the OS including
APS_Lab 0:813b34a76f24 55 * Thread ID
APS_Lab 0:813b34a76f24 56 * Thread Name
APS_Lab 0:813b34a76f24 57 * Thread State
APS_Lab 0:813b34a76f24 58 * Thread Priority
APS_Lab 0:813b34a76f24 59 * Thread Stack Size
APS_Lab 0:813b34a76f24 60 * Thread Stack Space
APS_Lab 0:813b34a76f24 61
APS_Lab 0:813b34a76f24 62 #### Compiler Version
APS_Lab 0:813b34a76f24 63
APS_Lab 0:813b34a76f24 64 | Compiler | Version Layout |
APS_Lab 0:813b34a76f24 65 | -------- | -------------- |
APS_Lab 0:813b34a76f24 66 | ARM | PVVbbbb (P = Major; VV = Minor; bbbb = build number) |
APS_Lab 0:813b34a76f24 67 | GCC | VVRRPP (VV = Version; RR = Revision; PP = Patch) |
APS_Lab 0:813b34a76f24 68 | IAR | VRRRPPP (V = Version; RRR = Revision; PPP = Patch) |
APS_Lab 0:813b34a76f24 69
APS_Lab 0:813b34a76f24 70 #### CPUID Register Information
APS_Lab 0:813b34a76f24 71
APS_Lab 0:813b34a76f24 72 | Bit Field | Field Description | Values |
APS_Lab 0:813b34a76f24 73 | --------- | ----------------- | ------ |
APS_Lab 0:813b34a76f24 74 |[31:24] | Implementer | 0x41 = ARM |
APS_Lab 0:813b34a76f24 75 |[23:20] | Variant | Major revision 0x0 = Revision 0 |
APS_Lab 0:813b34a76f24 76 |[19:16] | Architecture | 0xC = Baseline Architecture |
APS_Lab 0:813b34a76f24 77 | | | 0xF = Constant (Mainline Architecture) |
APS_Lab 0:813b34a76f24 78 |[15:4] | Part Number | 0xC20 = Cortex-M0 |
APS_Lab 0:813b34a76f24 79 | | | 0xC60 = Cortex-M0+ |
APS_Lab 0:813b34a76f24 80 | | | 0xC23 = Cortex-M3 |
APS_Lab 0:813b34a76f24 81 | | | 0xC24 = Cortex-M4 |
APS_Lab 0:813b34a76f24 82 | | | 0xC27 = Cortex-M7 |
APS_Lab 0:813b34a76f24 83 | | | 0xD20 = Cortex-M23 |
APS_Lab 0:813b34a76f24 84 | | | 0xD21 = Cortex-M33 |
APS_Lab 0:813b34a76f24 85 |[3:0] | Revision | Minor revision: 0x1 = Patch 1 |
APS_Lab 0:813b34a76f24 86
APS_Lab 0:813b34a76f24 87
APS_Lab 0:813b34a76f24 88
APS_Lab 0:813b34a76f24 89 You can view individual examples and additional API information of the statistics collection tools at the bottom of the page in the [related links section](#related-links).
APS_Lab 0:813b34a76f24 90
APS_Lab 0:813b34a76f24 91
APS_Lab 0:813b34a76f24 92 ### Output
APS_Lab 0:813b34a76f24 93
APS_Lab 0:813b34a76f24 94 To view the serial output you can use any terminal client of your choosing such as [PuTTY](http://www.putty.org/) or [CoolTerm](http://freeware.the-meiers.org/). Unless otherwise specified, printf defaults to a baud rate of 9600 on Mbed OS.
APS_Lab 0:813b34a76f24 95
APS_Lab 0:813b34a76f24 96 You can find more information on the Mbed OS configuration tools and serial communication in Mbed OS in the related [related links section](#related-links).
APS_Lab 0:813b34a76f24 97
APS_Lab 0:813b34a76f24 98 The output should contain the following block transmitted at the blinking LED frequency (actual values may vary depending on your target, build profile, and toolchain):
APS_Lab 0:813b34a76f24 99
APS_Lab 0:813b34a76f24 100 ```
APS_Lab 0:813b34a76f24 101 =============================== SYSTEM INFO ================================
APS_Lab 0:813b34a76f24 102 Mbed OS Version: 999999
APS_Lab 0:813b34a76f24 103 CPU ID: 0x410fc241
APS_Lab 0:813b34a76f24 104 Compiler ID: 2
APS_Lab 0:813b34a76f24 105 Compiler Version: 60300
APS_Lab 0:813b34a76f24 106 RAM0: Start 0x20000000 Size: 0x30000
APS_Lab 0:813b34a76f24 107 RAM1: Start 0x1fff0000 Size: 0x10000
APS_Lab 0:813b34a76f24 108 ROM0: Start 0x0 Size: 0x100000
APS_Lab 0:813b34a76f24 109 ================= CPU STATS =================
APS_Lab 0:813b34a76f24 110 Idle: 98% Usage: 2%
APS_Lab 0:813b34a76f24 111 ================ HEAP STATS =================
APS_Lab 0:813b34a76f24 112 Current heap: 1096
APS_Lab 0:813b34a76f24 113 Max heap size: 1096
APS_Lab 0:813b34a76f24 114 ================ THREAD STATS ===============
APS_Lab 0:813b34a76f24 115 ID: 0x20001eac
APS_Lab 0:813b34a76f24 116 Name: main_thread
APS_Lab 0:813b34a76f24 117 State: 2
APS_Lab 0:813b34a76f24 118 Priority: 24
APS_Lab 0:813b34a76f24 119 Stack Size: 4096
APS_Lab 0:813b34a76f24 120 Stack Space: 3296
APS_Lab 0:813b34a76f24 121
APS_Lab 0:813b34a76f24 122 ID: 0x20000f5c
APS_Lab 0:813b34a76f24 123 Name: idle_thread
APS_Lab 0:813b34a76f24 124 State: 1
APS_Lab 0:813b34a76f24 125 Priority: 1
APS_Lab 0:813b34a76f24 126 Stack Size: 512
APS_Lab 0:813b34a76f24 127 Stack Space: 352
APS_Lab 0:813b34a76f24 128
APS_Lab 0:813b34a76f24 129 ID: 0x20000f18
APS_Lab 0:813b34a76f24 130 Name: timer_thread
APS_Lab 0:813b34a76f24 131 State: 3
APS_Lab 0:813b34a76f24 132 Priority: 40
APS_Lab 0:813b34a76f24 133 Stack Size: 768
APS_Lab 0:813b34a76f24 134 Stack Space: 664
APS_Lab 0:813b34a76f24 135
APS_Lab 0:813b34a76f24 136 ```
APS_Lab 0:813b34a76f24 137
APS_Lab 0:813b34a76f24 138 ## Troubleshooting
APS_Lab 0:813b34a76f24 139
APS_Lab 0:813b34a76f24 140 If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.
APS_Lab 0:813b34a76f24 141
APS_Lab 0:813b34a76f24 142 ## Related Links
APS_Lab 0:813b34a76f24 143
APS_Lab 0:813b34a76f24 144 * [Mbed OS Stats API](https://os.mbed.com/docs/latest/apis/mbed-statistics.html)
APS_Lab 0:813b34a76f24 145 * [Mbed OS Configuration](https://os.mbed.com/docs/latest/reference/configuration.html)
APS_Lab 0:813b34a76f24 146 * [Mbed OS Serial Communication](https://os.mbed.com/docs/latest/tutorials/serial-communication.html)
APS_Lab 0:813b34a76f24 147
APS_Lab 0:813b34a76f24 148 ### License and contributions
APS_Lab 0:813b34a76f24 149
APS_Lab 0:813b34a76f24 150 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.
APS_Lab 0:813b34a76f24 151
APS_Lab 0:813b34a76f24 152 This project contains code from other projects. The original license text is included in those source files. They must comply with our license guide.