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