Modified blinky program using keyboard, for testing serial comms.

Committer:
jhanson2
Date:
Thu Aug 02 22:04:25 2018 +0000
Revision:
1:bc9b591056e6
Parent:
0:0b59e37a2f9b
first commit

Who changed what in which revision?

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