Health monitoring app

Dependencies:   FXOS8700 HTU21D Hexi_KW40Z Hexi_OLED_SSD1351 Hexidraw

Committer:
Mariya
Date:
Tue Apr 25 00:32:17 2017 +0000
Revision:
0:7f8127c43904
Final project for the ECE 595 course

Who changed what in which revision?

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