It's MXCHIP WIFI demo.

Committer:
lizhibo32
Date:
Tue Mar 21 03:56:12 2017 +0000
Revision:
0:cd7c54f07d25
build system

Who changed what in which revision?

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