You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/porting/custom-target-porting.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,16 @@ Follow these steps to create a custom port for Mbed OS:
38
38
39
39
### Customizing
40
40
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:
42
51
43
52
```
44
53
{
@@ -83,15 +92,6 @@ Follow these steps to create a custom port for Mbed OS:
83
92
}
84
93
```
85
94
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
-
95
95
#### Additions
96
96
97
97
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