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