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