Skip to content

Commit 85d5721

Browse files
author
Amanda Butler
authored
Merge pull request #1223 from ARMmbed/AnotherButler-patch-3
Move changes in custom-target-porting.md
2 parents 37cabb6 + 58aab4c commit 85d5721

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/porting/custom-target-porting.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ Follow these steps to create a custom port for Mbed OS:
3838

3939
### Customizing
4040

41-
1. Make changes to `custom_targets.json` for your board. For example, after making changes, the full contents look like this:
41+
1. Make changes to `custom_targets.json` for your board.
42+
43+
In this example:
44+
45+
1. The board name changes from `DISCO_L475VG_IOT01A` to `IMAGINARYBOARD`, so the board can be uniquely identified.
46+
1. The `detect_code` changes from `0764` to `1234`. The `detect_code` is a unique four-digit hexadecimal value, also called a `Platform ID`, that identifies the board to the Mbed OS test tools. For Mbed Enabled boards, this number is exposed through the debug interface with Mbed CLI by typing `mbedls`.
47+
1. The `macros_add` section changes to remove `USBHOST_OTHER` because the new board does not use USB.
48+
1. The `device_has_add` section changes to remove the `ANALOGOUT`, `CAN`, and `USBDEVICE` drivers because the new board doesn't use those features.
49+
50+
After making changes, the full contents look like this:
4251

4352
```
4453
{
@@ -83,15 +92,6 @@ Follow these steps to create a custom port for Mbed OS:
8392
}
8493
```
8594

86-
Let's review the changes one by one.
87-
88-
#### Changes
89-
90-
1. The board name changed from `DISCO_L475VG_IOT01A` to `IMAGINARYBOARD`, so the board can be uniquely identified.
91-
1. The `detect_code` changed from `0764` to `1234`. The `detect_code` is a unique four-digit hexadecimal value, also called a `Platform ID`, that identifies the board to the Mbed OS test tools. For Mbed Enabled boards, this number is exposed through the debug interface with Mbed CLI by typing `mbedls`.
92-
1. The `macros_add` section changed to remove `USBHOST_OTHER` because the new board does not use USB.
93-
1. The `device_has_add` section was changed to remove the `ANALOGOUT`, `CAN`, and `USBDEVICE` drivers because the new board doesn't use those features.
94-
9595
#### Additions
9696

9797
A new section, `device_has_remove`, was added. This removes the `ANALOGIN`, `I2CSLAVE` and `I2C_ASYNCH` drivers because these features are also not used. The reason why `device_has_remove` is used in this case is because the board is inheriting from the MCU Family configuration `FAMILY_STM32`, which has those drivers added by default.

0 commit comments

Comments
 (0)