Millun Atluri / Mbed OS RFID
Committer:
imic1
Date:
Sun Jan 28 23:27:47 2018 +0000
Revision:
0:35f7d05f4562
yahhh

Who changed what in which revision?

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