Blinky program for SDT boards.

Committer:
andrew_chong
Date:
Wed Aug 29 02:13:34 2018 +0000
Revision:
0:ef1d002e930e
The blinky program for SDT. I only updated mbed-os to the latest version. Later, this program can be deleted if mbed-os 5.9.7 is published.

Who changed what in which revision?

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