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