Coursework template

Dependencies:   BMP280 TextLCD BME280

Committer:
noutram
Date:
Sat Nov 24 09:35:51 2018 +0000
Revision:
0:57d39f966513
updated for 2018;

Who changed what in which revision?

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