A simple interactive program for testing the RN2483 library

Dependencies:   RN2483

Committer:
azazeal88
Date:
Tue Nov 22 10:39:39 2016 +0000
Revision:
2:53832347fe71
Parent:
0:5c135386bc5a
Commented license

Who changed what in which revision?

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