Hexiwear hdc1000 click board lab time

Dependencies:   HDC1000 Hexi_KW40Z Hexi_OLED_SSD1351

Committer:
i_am_kitsune
Date:
Mon Sep 11 02:07:32 2017 +0000
Revision:
0:6f385e76e7e3
Hexiwear HDC1000 Click Board

Who changed what in which revision?

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