MBED experiment.

Committer:
citolin
Date:
Sun Sep 16 17:28:48 2018 +0000
Revision:
2:d1c24eae74d5
Parent:
0:40a00c231fbd
Added a mutex in the state memory space. Also added a example for power supply station.

Who changed what in which revision?

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