MbedIOTest(Kindleの本を参考にしている)

Committer:
kasistorange
Date:
Mon Oct 15 10:59:43 2018 +0000
Revision:
0:6143877436c1
Test for sist;

Who changed what in which revision?

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