kintone devCamp 2018 MbedによるIoTエッジデバイス入門 向けサンプルプログラム

Dependencies:   C12832 mbed-http

Committer:
JKsoft_main
Date:
Wed Aug 01 00:02:58 2018 +0000
Revision:
0:5c7abfb1236c
First Release

Who changed what in which revision?

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