The HexiHeart is a demo project product that takes advantage of many of the onboard Hexiwear sensors and capabilities to create a multifunctional fitness and safety watch.

Dependencies:   FXAS21002 FXOS8700 Hexi_KW40Z Hexi_OLED_SSD1351 MAXIM W25Q64FVSSIG HTU21D MPL3115A2 TSL2561

Fork of HexiHeart_Alex by Hexiwear_zeta

Committer:
nbaker
Date:
Mon Feb 19 05:11:42 2018 +0000
Revision:
8:a5c77b45008d
Parent:
0:d1d36a3da39b
This version has BLE screens added, data values refreshed at 2Hz for two screens, fall function variables are adjustable, and other minor improvements.

Who changed what in which revision?

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