Hexiwear oled display from KDS3

Dependencies:   Hexi_OLED_SSD1351

Committer:
i_am_kitsune
Date:
Wed Sep 13 04:39:40 2017 +0000
Revision:
0:cdbd5046f3d8
Hexiwear Display

Who changed what in which revision?

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