Application testing co-operation of X-NUCLEO boards IKS01A1 (sensors) and IDW01M1 (wifi)

Dependencies:   X_NUCLEO_IDW01M1v2-lapi-1 X_NUCLEO_IKS01A1-lapi-1

Committer:
lapi
Date:
Sun Nov 20 20:40:51 2016 +0000
Revision:
1:937c297c25da
Parent:
0:e3e4af4648ab
Application testing co-operation of X-NUCLEO boards IKS01A1 (sensors) and IDW01M1 (wifi)

Who changed what in which revision?

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