An embedded server sending sensor information over the network to a remote client side process parsing the data

Dependencies:   EthernetInterface NTPClient TimeInterface WebSocketClient mbed-rtos mbed ST_Events-old

Committer:
thedude35
Date:
Sun Jun 18 03:31:58 2017 +0000
Revision:
0:f9ab8a994b4f
Child:
3:221997836268
Initial commit

Who changed what in which revision?

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