An auto car with 3 IR sensors.

Dependencies:   Ping

Committer:
cudaChen
Date:
Wed Jun 27 16:23:33 2018 +0000
Revision:
0:190c4784b6f4
Child:
8:328c77765bb5
initial commit

Who changed what in which revision?

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