|
1 | 1 | ## Porting guide
|
2 | 2 |
|
3 |
| -This document provides guidelines for adding a new MCU target to Mbed OS and Pelion. |
| 3 | +This document provides guidelines for adding a new MCU target to Mbed OS and the Pelion IoT Platform. |
4 | 4 |
|
5 | 5 | ### Scope and milestones
|
6 |
| -<!--I'm not sure I see how these milestones follow what's below, at least in numbering--> |
7 |
| -The following milestones usually need to happen to port Mbed OS to a board or target: |
8 | 6 |
|
9 |
| -1. Set up a development environment. Please choose: |
10 |
| - - Your primary development PC (Windows, Mac OS or Linux). |
| 7 | +You will usually need to go through all of these steps to port Mbed OS: |
11 | 8 |
|
12 |
| - You can port targets, connectivity and storage on Windows, macOS or Linux. Due to limitations in some development tools that Mbed OS uses, you need a Windows PC for DAPLink/FlashAlgo development. |
13 |
| - |
14 |
| - - An evaluation board with a target MCU, debug probe or an integrated interface chip.<!--I'm guessing the "or" is only for the last two things - debug probe or interface chip. In which case, this sentence requires rewriting.--> The hardware [is reviewed in greater details later in this document](). |
15 |
| - - A storage device (SD or external flash). |
| 9 | +1. Set up a development environment (including IDE and debugger) and your target. |
16 | 10 |
|
17 | 11 | 1. Locate reusable code to port to Mbed OS.
|
18 | 12 | <!--Are the reusable code and SDK related? Are they the same thing?-->
|
19 | 13 | If there is an SDK available to speed up the porting process, we recommend reusing it (assuming copyright of the existing code is preserved).
|
20 | 14 |
|
21 |
| -1. Choose an IDE and debugger. The three commonly used IDEs are [Eclipse](https://www.eclipse.org/ide/), [IAR Embedded Workbench](https://www.iar.com/iar-embedded-workbench/) and [Keil MDK](http://www.keil.com/). |
22 |
| - |
23 |
| - Limitations: |
| 15 | + <!--I actually don't quite understand this. Is it mandatory to find reusable code (which is implied in the first line), or is it "if you have it, use it"?--> |
24 | 16 |
|
25 |
| - - Eclipse is license free, whereas both IAR and Keil IDE require licenses. |
26 |
| - - Currently, DAPLink development works only Keil MDK. You will have to use Keil for pyOCD and DAPLink development. |
27 | 17 |
|
28 | 18 | 1. The [Mbed Enabled](https://www.mbed.com/en/about-mbed/mbed-enabled/introduction/) program requires pyOCD, so ultimately pyOCD needs to support the new target. To allow parallel development in porting targets, connectivity and storage while pyOCD is still under development, you can use other IDEs supported on the evaluation board in the beginning phase.
|
29 | 19 |
|
30 | 20 | 1. Implement and test CMSIS pack, bootstrap, linker script and startup code.
|
31 | 21 |
|
32 | 22 | A basic framework is ready after this step. You can do the rest of the porting work in parallel:
|
33 | 23 |
|
34 |
| -1. Implement and test porting APIs. This includes all components described in the rest of this porting guide. |
| 24 | +1. Implement and test porting APIs<!--we call the modules everywhere else-->. This porting guide provides the recommended porting order and links to full porting information about each module. |
35 | 25 |
|
36 |
| -1. Test Mbed OS and Pelion example applications (as listed [in the final steps in this porting guide]()). This steps verifies that your new port is fully functional. |
| 26 | +1. Test Mbed OS and Pelion example applications. This steps verifies that your new port is fully functional. |
0 commit comments