Sergio Márquez / Mbed OS Controle_ventilo_ethernet_v1_2_4

Fork of Controle_ventilo_ethernet_v1_2_3 by Windshape control

Committer:
Brutus
Date:
Mon Oct 31 16:59:50 2016 +0000
Revision:
0:5ca563ae05db
UDP echo server test

Who changed what in which revision?

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