gsm and sd card

Dependencies:   Base64 sd-driver

Committer:
Sergey_K
Date:
Thu Jul 11 11:14:05 2019 +0000
Revision:
3:7b76a34e07c0
Parent:
0:f7e73515c3fc
add new SD work

Who changed what in which revision?

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