lcd-ssd1306-test

Dependencies:   SSD1306_128x64_I2C

Committer:
comargo
Date:
Wed Nov 23 15:07:15 2016 +0000
Revision:
0:07c934308bb7
Initial commit;

Who changed what in which revision?

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