init

Committer:
KwamsC
Date:
Tue Jun 05 08:33:56 2018 +0000
Revision:
0:6101582ae15a
init

Who changed what in which revision?

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