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