test

Committer:
josepbernad
Date:
Thu May 17 13:31:14 2018 +0000
Revision:
0:4e6ebad3be98
test

Who changed what in which revision?

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