connect NuEZCam board whicih the code is located on https://github.com/OpenNuvoton/NuMaker_NuEZCam_Samples, NUC472 + NuEZCam ,
NuEZCam for NuMaker-PFM-NUC472 board. Please refer document before executing it. More details, please refer to https://github.com/OpenNuvoton/NuMaker_NuEZCam_Samples
README.md@1:6a2040c019e0, 2016-11-24 (annotated)
- Committer:
- shliu1
- Date:
- Thu Nov 24 08:39:30 2016 +0000
- Revision:
- 1:6a2040c019e0
- Parent:
- 0:5cd6f0a0a7ed
support NUC472, M453, STM32F401 and NXP K64F by target definitions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shliu1 | 0:5cd6f0a0a7ed | 1 | # Getting started with Blinky on mbed OS |
shliu1 | 0:5cd6f0a0a7ed | 2 | |
shliu1 | 0:5cd6f0a0a7ed | 3 | This is a very simple guide, reviewing the steps required to get Blinky working on an mbed OS platform. |
shliu1 | 0:5cd6f0a0a7ed | 4 | |
shliu1 | 0:5cd6f0a0a7ed | 5 | Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). |
shliu1 | 0:5cd6f0a0a7ed | 6 | |
shliu1 | 0:5cd6f0a0a7ed | 7 | ## Get the example application! |
shliu1 | 0:5cd6f0a0a7ed | 8 | |
shliu1 | 0:5cd6f0a0a7ed | 9 | From the command line, import the example: |
shliu1 | 0:5cd6f0a0a7ed | 10 | |
shliu1 | 0:5cd6f0a0a7ed | 11 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 12 | mbed import mbed-os-example-blinky |
shliu1 | 0:5cd6f0a0a7ed | 13 | cd mbed-os-example-blinky |
shliu1 | 0:5cd6f0a0a7ed | 14 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 15 | |
shliu1 | 0:5cd6f0a0a7ed | 16 | ### Now compile |
shliu1 | 0:5cd6f0a0a7ed | 17 | |
shliu1 | 0:5cd6f0a0a7ed | 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: |
shliu1 | 0:5cd6f0a0a7ed | 19 | |
shliu1 | 0:5cd6f0a0a7ed | 20 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 21 | mbed compile -m K64F -t ARM |
shliu1 | 0:5cd6f0a0a7ed | 22 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 23 | |
shliu1 | 0:5cd6f0a0a7ed | 24 | Your PC may take a few minutes to compile your code. At the end you should get the following result: |
shliu1 | 0:5cd6f0a0a7ed | 25 | |
shliu1 | 0:5cd6f0a0a7ed | 26 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 27 | [snip] |
shliu1 | 0:5cd6f0a0a7ed | 28 | +----------------------------+-------+-------+------+ |
shliu1 | 0:5cd6f0a0a7ed | 29 | | Module | .text | .data | .bss | |
shliu1 | 0:5cd6f0a0a7ed | 30 | +----------------------------+-------+-------+------+ |
shliu1 | 0:5cd6f0a0a7ed | 31 | | Misc | 13939 | 24 | 1372 | |
shliu1 | 0:5cd6f0a0a7ed | 32 | | core/hal | 16993 | 96 | 296 | |
shliu1 | 0:5cd6f0a0a7ed | 33 | | core/rtos | 7384 | 92 | 4204 | |
shliu1 | 0:5cd6f0a0a7ed | 34 | | features/FEATURE_IPV4 | 80 | 0 | 176 | |
shliu1 | 0:5cd6f0a0a7ed | 35 | | frameworks/greentea-client | 1830 | 60 | 44 | |
shliu1 | 0:5cd6f0a0a7ed | 36 | | frameworks/utest | 2392 | 512 | 292 | |
shliu1 | 0:5cd6f0a0a7ed | 37 | | Subtotals | 42618 | 784 | 6384 | |
shliu1 | 0:5cd6f0a0a7ed | 38 | +----------------------------+-------+-------+------+ |
shliu1 | 0:5cd6f0a0a7ed | 39 | Allocated Heap: unknown |
shliu1 | 0:5cd6f0a0a7ed | 40 | Allocated Stack: unknown |
shliu1 | 0:5cd6f0a0a7ed | 41 | Total Static RAM memory (data + bss): 7168 bytes |
shliu1 | 0:5cd6f0a0a7ed | 42 | Total RAM memory (data + bss + heap + stack): 7168 bytes |
shliu1 | 0:5cd6f0a0a7ed | 43 | Total Flash memory (text + data + misc): 43402 bytes |
shliu1 | 0:5cd6f0a0a7ed | 44 | Image: .\.build\K64F\ARM\mbed-os-example-blinky.bin |
shliu1 | 0:5cd6f0a0a7ed | 45 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 46 | |
shliu1 | 0:5cd6f0a0a7ed | 47 | ### Program your board |
shliu1 | 0:5cd6f0a0a7ed | 48 | |
shliu1 | 0:5cd6f0a0a7ed | 49 | 1. Connect your mbed device to the computer over USB. |
shliu1 | 0:5cd6f0a0a7ed | 50 | 1. Copy the binary file to the mbed device . |
shliu1 | 0:5cd6f0a0a7ed | 51 | 1. Press the reset button to start the program. |
shliu1 | 0:5cd6f0a0a7ed | 52 | |
shliu1 | 0:5cd6f0a0a7ed | 53 | You should see the LED of your platform turning on and off. |
shliu1 | 0:5cd6f0a0a7ed | 54 | |
shliu1 | 0:5cd6f0a0a7ed | 55 | Congratulations if you managed to complete this test! |
shliu1 | 0:5cd6f0a0a7ed | 56 | |
shliu1 | 0:5cd6f0a0a7ed | 57 | ## Export the project to Keil MDK and debug your application |
shliu1 | 0:5cd6f0a0a7ed | 58 | |
shliu1 | 0:5cd6f0a0a7ed | 59 | From the command line, run the following command: |
shliu1 | 0:5cd6f0a0a7ed | 60 | |
shliu1 | 0:5cd6f0a0a7ed | 61 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 62 | mbed export -m K64F -i uvision |
shliu1 | 0:5cd6f0a0a7ed | 63 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 64 | |
shliu1 | 0:5cd6f0a0a7ed | 65 | You should see the following output: |
shliu1 | 0:5cd6f0a0a7ed | 66 | |
shliu1 | 0:5cd6f0a0a7ed | 67 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 68 | Successful exports: |
shliu1 | 0:5cd6f0a0a7ed | 69 | * K64F::uvision .\projectfiles\uvision_K64F\Unnamed_Project |
shliu1 | 0:5cd6f0a0a7ed | 70 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 71 | |
shliu1 | 0:5cd6f0a0a7ed | 72 | To debug the application: |
shliu1 | 0:5cd6f0a0a7ed | 73 | |
shliu1 | 0:5cd6f0a0a7ed | 74 | 1. Start uVision. |
shliu1 | 0:5cd6f0a0a7ed | 75 | 1. Import the uVision project generated earlier. |
shliu1 | 0:5cd6f0a0a7ed | 76 | 1. Compile your application and generate an `.axf` file. |
shliu1 | 0:5cd6f0a0a7ed | 77 | 1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger). |
shliu1 | 0:5cd6f0a0a7ed | 78 | 1. Set breakpoints and start a debug session. |
shliu1 | 0:5cd6f0a0a7ed | 79 | |
shliu1 | 0:5cd6f0a0a7ed | 80 | ![Image of uVision](img/uvision.png) |
shliu1 | 0:5cd6f0a0a7ed | 81 | |
shliu1 | 0:5cd6f0a0a7ed | 82 | ## Troubleshooting |
shliu1 | 0:5cd6f0a0a7ed | 83 | |
shliu1 | 0:5cd6f0a0a7ed | 84 | 1. Make sure `mbed-cli` is working correctly and its version is greater than `0.8.9` |
shliu1 | 0:5cd6f0a0a7ed | 85 | |
shliu1 | 0:5cd6f0a0a7ed | 86 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 87 | mbed --version |
shliu1 | 0:5cd6f0a0a7ed | 88 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 89 | |
shliu1 | 0:5cd6f0a0a7ed | 90 | If not, you can update it easily: |
shliu1 | 0:5cd6f0a0a7ed | 91 | |
shliu1 | 0:5cd6f0a0a7ed | 92 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 93 | pip install mbed-cli --upgrade |
shliu1 | 0:5cd6f0a0a7ed | 94 | ``` |
shliu1 | 0:5cd6f0a0a7ed | 95 | |
shliu1 | 0:5cd6f0a0a7ed | 96 | 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. |