Displays a full size image (96px by 96px) on the Hexiwear OLED display then displays a smaller image (96px by 32px) on the bottom portion of the display.
Dependencies: Hexi_OLED_SSD1351
Fork of Hexi_OLED_Image_Example by
README.md@0:64580390e64a, 2016-08-18 (annotated)
- Committer:
- khuang
- Date:
- Thu Aug 18 23:55:29 2016 +0000
- Revision:
- 0:64580390e64a
Hexiwear Image Example; Displays whole image on entire screen then displays smaller image on bottom portion of screen.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| khuang | 0:64580390e64a | 1 | # Getting started with Blinky on mbed OS |
| khuang | 0:64580390e64a | 2 | |
| khuang | 0:64580390e64a | 3 | This is a very simple guide, reviewing the steps required to get Blinky working on an mbed OS platform. |
| khuang | 0:64580390e64a | 4 | |
| khuang | 0:64580390e64a | 5 | Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). |
| khuang | 0:64580390e64a | 6 | |
| khuang | 0:64580390e64a | 7 | ## Get the example application! |
| khuang | 0:64580390e64a | 8 | |
| khuang | 0:64580390e64a | 9 | From the command line, import the example: |
| khuang | 0:64580390e64a | 10 | |
| khuang | 0:64580390e64a | 11 | ``` |
| khuang | 0:64580390e64a | 12 | mbed import mbed-os-example-blinky |
| khuang | 0:64580390e64a | 13 | cd mbed-os-example-blinky |
| khuang | 0:64580390e64a | 14 | ``` |
| khuang | 0:64580390e64a | 15 | |
| khuang | 0:64580390e64a | 16 | ### Now compile |
| khuang | 0:64580390e64a | 17 | |
| khuang | 0:64580390e64a | 18 | Invoke `mbed compile` specifying the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5: |
| khuang | 0:64580390e64a | 19 | |
| khuang | 0:64580390e64a | 20 | ``` |
| khuang | 0:64580390e64a | 21 | mbed compile -m K64F -t ARM |
| khuang | 0:64580390e64a | 22 | ``` |
| khuang | 0:64580390e64a | 23 | |
| khuang | 0:64580390e64a | 24 | Your PC may take a few minutes to compile your code. At the end you should get the following result: |
| khuang | 0:64580390e64a | 25 | |
| khuang | 0:64580390e64a | 26 | ``` |
| khuang | 0:64580390e64a | 27 | [snip] |
| khuang | 0:64580390e64a | 28 | +----------------------------+-------+-------+------+ |
| khuang | 0:64580390e64a | 29 | | Module | .text | .data | .bss | |
| khuang | 0:64580390e64a | 30 | +----------------------------+-------+-------+------+ |
| khuang | 0:64580390e64a | 31 | | Misc | 13939 | 24 | 1372 | |
| khuang | 0:64580390e64a | 32 | | core/hal | 16993 | 96 | 296 | |
| khuang | 0:64580390e64a | 33 | | core/rtos | 7384 | 92 | 4204 | |
| khuang | 0:64580390e64a | 34 | | features/FEATURE_IPV4 | 80 | 0 | 176 | |
| khuang | 0:64580390e64a | 35 | | frameworks/greentea-client | 1830 | 60 | 44 | |
| khuang | 0:64580390e64a | 36 | | frameworks/utest | 2392 | 512 | 292 | |
| khuang | 0:64580390e64a | 37 | | Subtotals | 42618 | 784 | 6384 | |
| khuang | 0:64580390e64a | 38 | +----------------------------+-------+-------+------+ |
| khuang | 0:64580390e64a | 39 | Allocated Heap: unknown |
| khuang | 0:64580390e64a | 40 | Allocated Stack: unknown |
| khuang | 0:64580390e64a | 41 | Total Static RAM memory (data + bss): 7168 bytes |
| khuang | 0:64580390e64a | 42 | Total RAM memory (data + bss + heap + stack): 7168 bytes |
| khuang | 0:64580390e64a | 43 | Total Flash memory (text + data + misc): 43402 bytes |
| khuang | 0:64580390e64a | 44 | Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin |
| khuang | 0:64580390e64a | 45 | ``` |
| khuang | 0:64580390e64a | 46 | |
| khuang | 0:64580390e64a | 47 | ### Program your board |
| khuang | 0:64580390e64a | 48 | |
| khuang | 0:64580390e64a | 49 | 1. Connect your mbed device to the computer over USB. |
| khuang | 0:64580390e64a | 50 | 1. Copy the binary file to the mbed device . |
| khuang | 0:64580390e64a | 51 | 1. Press the reset button to start the program. |
| khuang | 0:64580390e64a | 52 | |
| khuang | 0:64580390e64a | 53 | You should see the LED of your platform turning on and off. |
| khuang | 0:64580390e64a | 54 | |
| khuang | 0:64580390e64a | 55 | Congratulations if you managed to complete this test! |
| khuang | 0:64580390e64a | 56 | |
| khuang | 0:64580390e64a | 57 | ## Export the project to Keil MDK and debug your application |
| khuang | 0:64580390e64a | 58 | |
| khuang | 0:64580390e64a | 59 | From the command line, run the following command: |
| khuang | 0:64580390e64a | 60 | |
| khuang | 0:64580390e64a | 61 | ``` |
| khuang | 0:64580390e64a | 62 | mbed export -m K64F -i uvision |
| khuang | 0:64580390e64a | 63 | ``` |
| khuang | 0:64580390e64a | 64 | |
| khuang | 0:64580390e64a | 65 | You should see the following output: |
| khuang | 0:64580390e64a | 66 | |
| khuang | 0:64580390e64a | 67 | ``` |
| khuang | 0:64580390e64a | 68 | Successful exports: |
| khuang | 0:64580390e64a | 69 | * K64F::uvision .\projectfiles\uvision_K64F\Unnamed_Project |
| khuang | 0:64580390e64a | 70 | ``` |
| khuang | 0:64580390e64a | 71 | |
| khuang | 0:64580390e64a | 72 | To debug the application: |
| khuang | 0:64580390e64a | 73 | |
| khuang | 0:64580390e64a | 74 | 1. Start uVision. |
| khuang | 0:64580390e64a | 75 | 1. Import the uVision project generated earlier. |
| khuang | 0:64580390e64a | 76 | 1. Compile your application and generate an `.axf` file. |
| khuang | 0:64580390e64a | 77 | 1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger). |
| khuang | 0:64580390e64a | 78 | 1. Set breakpoints and start a debug session. |
| khuang | 0:64580390e64a | 79 | |
| khuang | 0:64580390e64a | 80 |  |
| khuang | 0:64580390e64a | 81 | |
| khuang | 0:64580390e64a | 82 | ## Troubleshooting |
| khuang | 0:64580390e64a | 83 | |
| khuang | 0:64580390e64a | 84 | 1. Make sure `mbed-cli` is working correctly and its version is greater than `0.8.9` |
| khuang | 0:64580390e64a | 85 | |
| khuang | 0:64580390e64a | 86 | ``` |
| khuang | 0:64580390e64a | 87 | mbed --version |
| khuang | 0:64580390e64a | 88 | ``` |
| khuang | 0:64580390e64a | 89 | |
| khuang | 0:64580390e64a | 90 | If not, you can update it easily: |
| khuang | 0:64580390e64a | 91 | |
| khuang | 0:64580390e64a | 92 | ``` |
| khuang | 0:64580390e64a | 93 | pip install mbed-cli --upgrade |
| khuang | 0:64580390e64a | 94 | ``` |
| khuang | 0:64580390e64a | 95 | |
| khuang | 0:64580390e64a | 96 | 2. If using Keil MDK, make sure you have a license installed. [MDK-Lite](http://www.keil.com/arm/mdk.asp) has a 32KB restriction on code size. |
