This version is the one to be submitted as a part the Hackster.io contest, Unleash Invisible Intelligence

Committer:
gov1
Date:
Tue Jul 31 16:30:32 2018 +0000
Revision:
0:a761fba7f8a8
complete version with emer. batt low check

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gov1 0:a761fba7f8a8 1 # Getting started with Blinky on mbed OS
gov1 0:a761fba7f8a8 2
gov1 0:a761fba7f8a8 3 This guide reviews the steps required to get Blinky working on an mbed OS platform.
gov1 0:a761fba7f8a8 4
gov1 0:a761fba7f8a8 5 Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
gov1 0:a761fba7f8a8 6
gov1 0:a761fba7f8a8 7 ## Import the example application
gov1 0:a761fba7f8a8 8
gov1 0:a761fba7f8a8 9 From the command-line, import the example:
gov1 0:a761fba7f8a8 10
gov1 0:a761fba7f8a8 11 ```
gov1 0:a761fba7f8a8 12 mbed import mbed-os-example-blinky
gov1 0:a761fba7f8a8 13 cd mbed-os-example-blinky
gov1 0:a761fba7f8a8 14 ```
gov1 0:a761fba7f8a8 15
gov1 0:a761fba7f8a8 16 ### Now compile
gov1 0:a761fba7f8a8 17
gov1 0:a761fba7f8a8 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:
gov1 0:a761fba7f8a8 19
gov1 0:a761fba7f8a8 20 ```
gov1 0:a761fba7f8a8 21 mbed compile -m K64F -t ARM
gov1 0:a761fba7f8a8 22 ```
gov1 0:a761fba7f8a8 23
gov1 0:a761fba7f8a8 24 Your PC may take a few minutes to compile your code. At the end, you see the following result:
gov1 0:a761fba7f8a8 25
gov1 0:a761fba7f8a8 26 ```
gov1 0:a761fba7f8a8 27 [snip]
gov1 0:a761fba7f8a8 28 +----------------------------+-------+-------+------+
gov1 0:a761fba7f8a8 29 | Module | .text | .data | .bss |
gov1 0:a761fba7f8a8 30 +----------------------------+-------+-------+------+
gov1 0:a761fba7f8a8 31 | Misc | 13939 | 24 | 1372 |
gov1 0:a761fba7f8a8 32 | core/hal | 16993 | 96 | 296 |
gov1 0:a761fba7f8a8 33 | core/rtos | 7384 | 92 | 4204 |
gov1 0:a761fba7f8a8 34 | features/FEATURE_IPV4 | 80 | 0 | 176 |
gov1 0:a761fba7f8a8 35 | frameworks/greentea-client | 1830 | 60 | 44 |
gov1 0:a761fba7f8a8 36 | frameworks/utest | 2392 | 512 | 292 |
gov1 0:a761fba7f8a8 37 | Subtotals | 42618 | 784 | 6384 |
gov1 0:a761fba7f8a8 38 +----------------------------+-------+-------+------+
gov1 0:a761fba7f8a8 39 Allocated Heap: unknown
gov1 0:a761fba7f8a8 40 Allocated Stack: unknown
gov1 0:a761fba7f8a8 41 Total Static RAM memory (data + bss): 7168 bytes
gov1 0:a761fba7f8a8 42 Total RAM memory (data + bss + heap + stack): 7168 bytes
gov1 0:a761fba7f8a8 43 Total Flash memory (text + data + misc): 43402 bytes
gov1 0:a761fba7f8a8 44 Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin
gov1 0:a761fba7f8a8 45 ```
gov1 0:a761fba7f8a8 46
gov1 0:a761fba7f8a8 47 ### Program your board
gov1 0:a761fba7f8a8 48
gov1 0:a761fba7f8a8 49 1. Connect your mbed device to the computer over USB.
gov1 0:a761fba7f8a8 50 1. Copy the binary file to the mbed device.
gov1 0:a761fba7f8a8 51 1. Press the reset button to start the program.
gov1 0:a761fba7f8a8 52
gov1 0:a761fba7f8a8 53 The LED on your platform turns on and off.
gov1 0:a761fba7f8a8 54
gov1 0:a761fba7f8a8 55 ## Troubleshooting
gov1 0:a761fba7f8a8 56
gov1 0:a761fba7f8a8 57 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.