BLUETOOTH ADDED VERSION HEXIWEAR CLICK BOARD HDC1000

Dependencies:   HDC1000 Hexi_KW40Z Hexi_OLED_SSD1351

Committer:
i_am_kitsune
Date:
Tue Sep 19 08:24:57 2017 +0000
Revision:
0:13d7607a7678
HEXIWEAR HDC1000 CLICK BOARD ; LAB TIME ;

Who changed what in which revision?

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