for test

Committer:
doudoutang
Date:
Wed Sep 16 12:32:16 2020 +0000
Revision:
0:0501ccebcb27
y

Who changed what in which revision?

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