2019NHK_A_sensor board

Dependencies:   SerialMultiByte QEI TFmini IRsensor

Committer:
ec30109b
Date:
Thu Sep 05 07:31:12 2019 +0000
Revision:
2:4466f57c9e43
Parent:
0:d789af71fbc6
rename

Who changed what in which revision?

UserRevisionLine numberNew contents of line
highfieldsnj 0:d789af71fbc6 1 # Getting started with Blinky on mbed OS
highfieldsnj 0:d789af71fbc6 2
highfieldsnj 0:d789af71fbc6 3 This guide reviews the steps required to get Blinky working on an mbed OS platform.
highfieldsnj 0:d789af71fbc6 4
highfieldsnj 0:d789af71fbc6 5 Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli).
highfieldsnj 0:d789af71fbc6 6
highfieldsnj 0:d789af71fbc6 7 ## Import the example application
highfieldsnj 0:d789af71fbc6 8
highfieldsnj 0:d789af71fbc6 9 From the command-line, import the example:
highfieldsnj 0:d789af71fbc6 10
highfieldsnj 0:d789af71fbc6 11 ```
highfieldsnj 0:d789af71fbc6 12 mbed import mbed-os-example-blinky
highfieldsnj 0:d789af71fbc6 13 cd mbed-os-example-blinky
highfieldsnj 0:d789af71fbc6 14 ```
highfieldsnj 0:d789af71fbc6 15
highfieldsnj 0:d789af71fbc6 16 ### Now compile
highfieldsnj 0:d789af71fbc6 17
highfieldsnj 0:d789af71fbc6 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:
highfieldsnj 0:d789af71fbc6 19
highfieldsnj 0:d789af71fbc6 20 ```
highfieldsnj 0:d789af71fbc6 21 mbed compile -m K64F -t ARM
highfieldsnj 0:d789af71fbc6 22 ```
highfieldsnj 0:d789af71fbc6 23
highfieldsnj 0:d789af71fbc6 24 Your PC may take a few minutes to compile your code. At the end, you see the following result:
highfieldsnj 0:d789af71fbc6 25
highfieldsnj 0:d789af71fbc6 26 ```
highfieldsnj 0:d789af71fbc6 27 [snip]
highfieldsnj 0:d789af71fbc6 28 +----------------------------+-------+-------+------+
highfieldsnj 0:d789af71fbc6 29 | Module | .text | .data | .bss |
highfieldsnj 0:d789af71fbc6 30 +----------------------------+-------+-------+------+
highfieldsnj 0:d789af71fbc6 31 | Misc | 13939 | 24 | 1372 |
highfieldsnj 0:d789af71fbc6 32 | core/hal | 16993 | 96 | 296 |
highfieldsnj 0:d789af71fbc6 33 | core/rtos | 7384 | 92 | 4204 |
highfieldsnj 0:d789af71fbc6 34 | features/FEATURE_IPV4 | 80 | 0 | 176 |
highfieldsnj 0:d789af71fbc6 35 | frameworks/greentea-client | 1830 | 60 | 44 |
highfieldsnj 0:d789af71fbc6 36 | frameworks/utest | 2392 | 512 | 292 |
highfieldsnj 0:d789af71fbc6 37 | Subtotals | 42618 | 784 | 6384 |
highfieldsnj 0:d789af71fbc6 38 +----------------------------+-------+-------+------+
highfieldsnj 0:d789af71fbc6 39 Allocated Heap: unknown
highfieldsnj 0:d789af71fbc6 40 Allocated Stack: unknown
highfieldsnj 0:d789af71fbc6 41 Total Static RAM memory (data + bss): 7168 bytes
highfieldsnj 0:d789af71fbc6 42 Total RAM memory (data + bss + heap + stack): 7168 bytes
highfieldsnj 0:d789af71fbc6 43 Total Flash memory (text + data + misc): 43402 bytes
highfieldsnj 0:d789af71fbc6 44 Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin
highfieldsnj 0:d789af71fbc6 45 ```
highfieldsnj 0:d789af71fbc6 46
highfieldsnj 0:d789af71fbc6 47 ### Program your board
highfieldsnj 0:d789af71fbc6 48
highfieldsnj 0:d789af71fbc6 49 1. Connect your mbed device to the computer over USB.
highfieldsnj 0:d789af71fbc6 50 1. Copy the binary file to the mbed device.
highfieldsnj 0:d789af71fbc6 51 1. Press the reset button to start the program.
highfieldsnj 0:d789af71fbc6 52
highfieldsnj 0:d789af71fbc6 53 The LED on your platform turns on and off.
highfieldsnj 0:d789af71fbc6 54
highfieldsnj 0:d789af71fbc6 55 ## Export the project to Keil MDK, and debug your application
highfieldsnj 0:d789af71fbc6 56
highfieldsnj 0:d789af71fbc6 57 From the command-line, run the following command:
highfieldsnj 0:d789af71fbc6 58
highfieldsnj 0:d789af71fbc6 59 ```
highfieldsnj 0:d789af71fbc6 60 mbed export -m K64F -i uvision
highfieldsnj 0:d789af71fbc6 61 ```
highfieldsnj 0:d789af71fbc6 62
highfieldsnj 0:d789af71fbc6 63 To debug the application:
highfieldsnj 0:d789af71fbc6 64
highfieldsnj 0:d789af71fbc6 65 1. Start uVision.
highfieldsnj 0:d789af71fbc6 66 1. Import the uVision project generated earlier.
highfieldsnj 0:d789af71fbc6 67 1. Compile your application, and generate an `.axf` file.
highfieldsnj 0:d789af71fbc6 68 1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger).
highfieldsnj 0:d789af71fbc6 69 1. Set breakpoints, and start a debug session.
highfieldsnj 0:d789af71fbc6 70
highfieldsnj 0:d789af71fbc6 71 ![Image of uVision](img/uvision.png)
highfieldsnj 0:d789af71fbc6 72
highfieldsnj 0:d789af71fbc6 73 ## Troubleshooting
highfieldsnj 0:d789af71fbc6 74
highfieldsnj 0:d789af71fbc6 75 1. Make sure `mbed-cli` is working correctly and its version is `>1.0.0`
highfieldsnj 0:d789af71fbc6 76
highfieldsnj 0:d789af71fbc6 77 ```
highfieldsnj 0:d789af71fbc6 78 mbed --version
highfieldsnj 0:d789af71fbc6 79 ```
highfieldsnj 0:d789af71fbc6 80
highfieldsnj 0:d789af71fbc6 81 If not, you can update it:
highfieldsnj 0:d789af71fbc6 82
highfieldsnj 0:d789af71fbc6 83 ```
highfieldsnj 0:d789af71fbc6 84 pip install mbed-cli --upgrade
highfieldsnj 0:d789af71fbc6 85 ```
highfieldsnj 0:d789af71fbc6 86
highfieldsnj 0:d789af71fbc6 87 2. If using Keil MDK, make sure you have a license installed. [MDK-Lite](http://www.keil.com/arm/mdk.asp) has a 32 KB restriction on code size.