program to export new ublox drivers

Dependencies:   ublox-at-cellular-interface-ext ublox-cellular-base ublox-cellular-driver-gen

Committer:
michaelVisimid
Date:
Thu Feb 08 23:50:49 2018 +0000
Revision:
0:96632a6f103a
Program to export new ublox drivers

Who changed what in which revision?

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