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