-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mbed] Mbed platform documentation (#11121)
* Add Mbed OS guides Add README file to lighting-app and lock-app * Update the Mbed OS guides Add mbed os guides images * Update lock and lighting apps README files * Add all-clusters-app and pigweed-app README files Small fixes in lock and ligthing app docs * Add Mbed Unit Tests README file Docs files restyle * Add shell example README file Restyle docs * Restyle shell doc * Fix spelling * Fix spelling Include the missing words into the dictionary * Fix wordlist
- Loading branch information
Showing
11 changed files
with
2,134 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png" alt="ARM Mbed-OS logo"/> | ||
</p> | ||
|
||
<h1> Mbed-OS add new hardware target </h1> | ||
|
||
# Overview | ||
|
||
This document shows how to add the new Mbed OS hardware target to Matter | ||
project. | ||
|
||
Please check the list of supported | ||
[development boards](https://os.mbed.com/platforms/) which are compatible with | ||
Mbed OS. | ||
|
||
In order to adapt the new hardware target to the Matter project, you need to | ||
remember about the following requirements: | ||
|
||
- Bluetooth Low Energy support. | ||
- Wireless communication module with WiFi or Thread network support (IPv6 | ||
protocol is required). | ||
- Serial port support | ||
- On-chip debug with OpenOCD support | ||
|
||
Additional target component requirements are different for each of example | ||
application. Check the **Device UI** paragraph in example description. | ||
|
||
# Example Application | ||
|
||
The first step to add the new target to each of example application is to modify | ||
the `examples/example_name/mbed/mbed_app.json` file. It contains the common | ||
project settings and override the default values for supported boards. You | ||
should add the necessary components and parameters for the target there. | ||
|
||
If the new target uses the external libraries, it will be required to link it in | ||
the CMakeLists.txt file. | ||
|
||
# Building | ||
|
||
To add the new hardware target to the build system the | ||
`scripts/examples/mbed_example.sh` script should be modify. Extend | ||
**SUPPORTED_TARGET_BOARD** variable with a new target name. | ||
|
||
Example: | ||
|
||
SUPPORTED_TARGET_BOARD=(CY8CPROTO_062_4343W NEW_TARGET_NAME) | ||
|
||
The next step is add the target name to build task in `.vscode/task.json` file. | ||
Extend the **options** variable in **mbedTarget** input setting. | ||
|
||
Example: | ||
|
||
{ | ||
"type": "pickString", | ||
"id": "mbedTarget", | ||
"description": "What mbed target do you want to use?", | ||
"options": ["CY8CPROTO_062_4343W", "NEW_TARGET_NAME"], | ||
"default": "CY8CPROTO_062_4343W" | ||
} | ||
|
||
# Flashing | ||
|
||
Mbed OS example application flashing process uses the | ||
[Open On-Chip Debugger](http://openocd.org/). The first step is to create the | ||
target configuration file inside `config/mbed/scripts` directory. The file name | ||
should be the same as target and the extension should be **.tcl**. The target | ||
CPU and programming interface definitions are essential parts of the | ||
configuration file. | ||
|
||
The next steps are the same as for building process. Adding the name of the | ||
target to `scripts/examples/mbed_example.sh` and `.vscode/task.json` files | ||
allows the use of available flashing processes. | ||
|
||
Additional flashing option is based on VSCode launch task. Adding the new target | ||
to it required `.vscode/launch.json` modification. Extend the **options** | ||
variable in **mbedTarget** input setting. | ||
|
||
Example: | ||
|
||
{ | ||
"type": "pickString", | ||
"id": "mbedTarget", | ||
"description": "What mbed target do you want to use?", | ||
"options": ["CY8CPROTO_062_4343W", "NEW_TARGET_NAME"], | ||
"default": "CY8CPROTO_062_4343W" | ||
} | ||
|
||
# Debugging | ||
|
||
Debugging process of Mbed OS applications is also based on VSCode launch task. | ||
Adding the new target to it required `.vscode/launch.json` modification. Extend | ||
the **options** variable in **mbedTarget** input setting. | ||
|
||
Example: | ||
|
||
{ | ||
"type": "pickString", | ||
"id": "mbedTarget", | ||
"description": "What mbed target do you want to use?", | ||
"options": ["CY8CPROTO_062_4343W", "NEW_TARGET_NAME"], | ||
"default": "CY8CPROTO_062_4343W" | ||
} | ||
|
||
# CI | ||
|
||
The Matter project continue integration process is based on Github Actions tool. | ||
It uses workflow configuration files to execute actions on CI server. | ||
|
||
To add the new target to the validation process of building Mbed OS applications | ||
you need to modify the `.github/workflows/examples-mbed.yaml` file. Extend the | ||
job's environment variable **APP_TARGET** with the target name. | ||
|
||
Example: | ||
|
||
APP_TARGET: [CY8CPROTO_062_4343W, NEW_TARGET_NAME] |
Oops, something went wrong.