Skip to content

Commit

Permalink
[Mbed] Mbed platform documentation (#11121)
Browse files Browse the repository at this point in the history
* 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
ATmobica authored Oct 29, 2021
1 parent 7f05fb6 commit 06f9a38
Show file tree
Hide file tree
Showing 11 changed files with 2,134 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ argc
args
argv
armeabi
ARMmbed
armv
asdk
ASYNC
Expand All @@ -69,6 +70,7 @@ autotools
avL
AwaitNextAction
AXXXF
AYNJV
babaf
backend
backticks
Expand Down Expand Up @@ -118,6 +120,7 @@ CACACACA
cacerts
CAfile
cancelled
capacitive
CBB
cbd
CCMP
Expand Down Expand Up @@ -148,6 +151,7 @@ ChipImResponder
ChipLight
ChipMessageLayer
CHIPOBLE
CHIPProjectConfig
CHIPTest
CHIPTool
chmod
Expand All @@ -169,6 +173,7 @@ clusterListName
ClusterRevision
ClusterTestGeneration
cmake
CMakeLists
CMD
CMSIS
CMVH
Expand Down Expand Up @@ -207,6 +212,7 @@ cp
cpio
cpp
cppreference
CPROTO
cpuapp
cpython
crypto
Expand Down Expand Up @@ -304,6 +310,7 @@ eabi
EB
ECC
ECD
EchoMessage
EchoRequests
EchoResponse
EchoService
Expand Down Expand Up @@ -394,6 +401,7 @@ GetDeviceInfo
GetDns
GetIP
getstarted
githubusercontent
gitignore
glibc
gn
Expand Down Expand Up @@ -524,10 +532,12 @@ lifecycle
lightbulb
lightin
LightingColor
LightingState
LinkSoftwareAndDocumentationPack
LocalConfigDisabled
localhost
localstatedir
LockingState
loopback
LowPower
LPC
Expand Down Expand Up @@ -558,6 +568,11 @@ matterUTestLib
MaxInterval
MaxIntervalCeilingSeconds
MaxRtrAdvInterval
mbed
MbedCommissioning
MbedNewTarget
mbedos
mbedTarget
mbedTLS
mcu
MCUboot
Expand All @@ -582,6 +597,7 @@ MfrDeviceCert
MfrDeviceId
mgmt
microcontroller
microcontrollers
MicroSD
middleware
Minicom
Expand All @@ -607,6 +623,8 @@ Multiband
Multicast
multilib
Multiprotocol
multithreaded
mutexes
MX
mydir
MyPASSWORD
Expand Down Expand Up @@ -653,6 +671,7 @@ OnOff
OnOffClusterTest
OnPlatformEvent
OO
OpenOCD
OpenSSL
OpenThread
OpenThreadDemo
Expand Down Expand Up @@ -690,6 +709,7 @@ peerAddrStr
pem
percentageLiftValue
pexpect
pickString
PID
Pigweed
PinCode
Expand All @@ -714,15 +734,18 @@ productrev
ProductRevision
ProductURL
proto
protobuf
protos
Prover
PRs
PSCAN
PSK
PSoC
PTR
pts
PumpConfigurationAndControl
pwd
PWM
PXXXF
py
pychip
Expand Down Expand Up @@ -768,6 +791,7 @@ repo
req
Requestor
responder
retargeting
reusability
rfid
rfids
Expand Down Expand Up @@ -802,8 +826,8 @@ SDC
SDHC
SDK
sdkconfig
SDKs
SDK's
SDKs
SDKTARGETSYSROOT
sdl
segger
Expand Down Expand Up @@ -837,6 +861,7 @@ softmmu
SoftwareDiagnostics
SoftwareVersion
SoftwareVersionString
SPI
spinel
src
SRP
Expand All @@ -846,6 +871,7 @@ startoffset
StartScan
stderr
stdout
sterm
str
strcpy
su
Expand Down Expand Up @@ -877,6 +903,7 @@ systemduserunitdir
sysv
TargetNavigator
TBD
tcl
TCP
teardown
Telink
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 115 additions & 0 deletions docs/guides/mbedos_add_new_target.md
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]
Loading

0 comments on commit 06f9a38

Please sign in to comment.