Just a test

Dependencies:   BSP_DISCO_F769NI LCD_DISCO_F769NI lcd_log esp8266-driver

Fork of mbed-os-example-blinky-5 by Joscha Ihl

Committer:
joschaihl
Date:
Sun Dec 17 22:55:57 2017 +0000
Revision:
9:adfdb4ba838b
Parent:
0:2e946c38e476
ba

Who changed what in which revision?

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