First

Dependencies:   CPU_Usage NetworkManager RestAPI_Manager

Committer:
asaewing
Date:
Mon Oct 08 00:50:33 2018 +0000
Revision:
0:8eda451f71fa
First

Who changed what in which revision?

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