kinmod shivan

Dependencies:   Encoder MODSERIAL

Committer:
mhomsma
Date:
Wed Nov 01 14:13:11 2017 +0000
Revision:
5:1e7dfd3c55ca
Parent:
0:077896c03576
In before publishing;

Who changed what in which revision?

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