Skip to content

Commit

Permalink
[OIS] Set of maintenance improvements and documentation (#26688)
Browse files Browse the repository at this point in the history
* [OIS] Unit-tests improvements

Cleanup unit-tests project configuration - use default values.
Set maximum fabrics to 5 for OIS platform.
Cleanup main file.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Build improvement

Set Release Cmake build type for non-debug build.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Extend KeyValueStore Manager with Shutdown function

Add a Shutdown() function that deinitializes the KV store.
Add Shutdown implementation to OIS KV stores.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Add select KVS storage type option to build script

Add build script argument to select KVS storage type
ps or tdb.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Change TF-M AN552 layout

Increase TF-M non-secure partition size to 2.25 MB - adjust to the
current size of the binary of examples.
Reorder the TF-M memory areas in QSPI. Put the OTP / NV counters between
protected storage and ITS. This will be useful for dumping memory to
guarantee persistence.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Add KVS storage file support

Add an option to pass the path to the KVS storage file
which will be used to ensure persistence.
Use --data and --dump FVP options to load/dump
KVS storage memory to the specific file.
Add description to the OIS documentation.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Debugging setup improvements

Use the Linux Fast Models FVP package for Matter environment and
install it inside the Docker container.
Create helper script to setup FVP Fast Model extension with GDB plugin.
Debugging setup documentation update.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Unit tests docs and maintenance improvements

Create unit test description - setup, build, run, test and
debug the unit test project. Explaining the unit testing approach.
Add common list of currently supported Matter's component tests.
Use it in CMake build, helper script, VSCode tasks and documentation.
Update unit tests README file.

Signed-off-by: ATmobica <[email protected]>

* [OIS] Update the examples docs and maintenance improvements

Add setup Open IoT SDK network VScode task.
Add networking setup details and default settings.
Update the OIS example documentation and extend it with
description of adding a new example.
Update examples README files.
Create the list of supported Matter examples and use it in
helper script and VSCode tasks.
Add specific examples of how to build/run/debug and any additional
notes to be aware of.
Update the OIS commissioning description - use the chip-tool
as controller.

Co-authored-by: ATmobica <[email protected]>
Signed-off-by: Anna Bridge <[email protected]>

* [Docs] Link OIS documentation to guides page

Extend platform guides list with OIS documentation items

Signed-off-by: ATmobica <[email protected]>

---------

Signed-off-by: ATmobica <[email protected]>
Signed-off-by: Anna Bridge <[email protected]>
Co-authored-by: Anna Bridge <[email protected]>
  • Loading branch information
ATmobica and adbridge authored May 22, 2023
1 parent bfa0580 commit 44c7faf
Show file tree
Hide file tree
Showing 31 changed files with 1,354 additions and 572 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ Jupyter
jupyterlab
KA
kAdminister
kbd
kBusy
kCase
Kconfig
Expand Down
60 changes: 19 additions & 41 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,16 @@
"name": "Debug Open IoT SDK example application",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:openiotsdkApp}/openiotsdk",
"executable": "./build/chip-openiotsdk-${input:openiotsdkApp}-example.elf",
"cwd": "${workspaceRoot}/examples/${input:openiotsdkExample}/openiotsdk",
"executable": "./build/chip-openiotsdk-${input:openiotsdkExample}-example.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/packages/arm/bin/",
"servertype": "external",
"gdbTarget": "${input:openiotsdkRemoteHost}:31627", //GDBserver port on FVP
"overrideLaunchCommands": [
"-enable-pretty-printing",
"add-symbol-file ./build/bl2.elf 0x10000000",
"add-symbol-file ./build/tfm_s.elf 0x38000400",
"add-symbol-file ./build/chip-openiotsdk-${input:openiotsdkApp}-example_ns.elf 0x28060400",
"add-symbol-file ./build/chip-openiotsdk-${input:openiotsdkExample}-example_ns.elf 0x28060400",
"break main_ns.cpp:main"
],
"runToEntryPoint": "main",
Expand All @@ -451,15 +451,15 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/src/test_driver/openiotsdk/unit-tests",
"executable": "./build/${input:openiotsdkUnittest}.elf",
"executable": "./build/${input:openiotsdkUnitTest}.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/packages/arm/bin/",
"servertype": "external",
"gdbTarget": ":31627", //GDBserver port on FVP
"overrideLaunchCommands": [
"-enable-pretty-printing",
"add-symbol-file ./build/bl2.elf 0x10000000",
"add-symbol-file ./build/tfm_s.elf 0x38000400",
"add-symbol-file ./build/${input:openiotsdkUnittest}_ns.elf 0x28060400",
"add-symbol-file ./build/${input:openiotsdkUnitTest}_ns.elf 0x28060400",
"break main_ns.cpp:main"
],
"runToEntryPoint": "main",
Expand Down Expand Up @@ -522,11 +522,13 @@
"default": "CY8CPROTO_062_4343W"
},
{
"type": "pickString",
"id": "openiotsdkApp",
"description": "What Open IoT SDK example do you want to use?",
"options": ["shell", "lock-app"],
"default": "shell"
"type": "command",
"id": "openiotsdkExample",
"command": "shellCommand.execute",
"args": {
"command": "cat examples/platform/openiotsdk/supported_examples.txt",
"description": "What Open IoT SDK example application do you want to use?"
}
},
{
"type": "promptString",
Expand All @@ -535,37 +537,13 @@
"default": ""
},
{
"type": "pickString",
"id": "openiotsdkUnittest",
"description": "What Open IoT SDK unit test do you want to use?",
"options": [
"accesstest",
"AppTests",
"ASN1Tests",
"BDXTests",
"ChipCryptoTests",
"ControllerTests",
"CoreTests",
"CredentialsTest",
"DataModelTests",
"InetLayerTests",
"MdnsTests",
"MessagingLayerTests",
"MinimalMdnsCoreTests",
"MinimalMdnsRecordsTests",
"MinimalMdnsRespondersTests",
"PlatformTests",
"RawTransportTests",
"RetransmitTests",
"SecureChannelTests",
"SetupPayloadTests",
"SupportTests",
"SystemLayerTests",
"TestShell",
"TransportLayerTests",
"UserDirectedCommissioningTests"
],
"default": "accesstest"
"type": "command",
"id": "openiotsdkUnitTest",
"command": "shellCommand.execute",
"args": {
"command": "cat src/test_driver/openiotsdk/unit-tests/test_components.txt",
"description": "What Open IoT SDK unit test application do you want to use?"
}
}
]
}
72 changes: 38 additions & 34 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@
"clear": true
}
},
{
"label": "Setup Open IoT SDK network",
"type": "shell",
"command": "sudo scripts/setup/openiotsdk/network_setup.sh -n${input:openiotsdkNetworkSetupName} ${input:openiotsdkNetworkSetupCmd}",
"problemMatcher": {
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"message": 5
}
}
},
{
"label": "Build Open IoT SDK example",
"type": "shell",
Expand Down Expand Up @@ -453,6 +466,19 @@
"options": ["simple", "boot", "upgrade"],
"default": "simple"
},
{
"type": "pickString",
"id": "openiotsdkNetworkSetupCmd",
"description": "Which command do you wish to use?",
"options": ["up", "down", "restart"],
"default": "up"
},
{
"type": "promptString",
"id": "openiotsdkNetworkSetupName",
"description": "Type the network namespace name that you want to use.",
"default": "ARM"
},
{
"type": "pickString",
"id": "openiotsdkDebugMode",
Expand All @@ -468,44 +494,22 @@
"default": "false"
},
{
"type": "pickString",
"type": "command",
"id": "openiotsdkExample",
"description": "What Open IoT SDK example application do you want to use?",
"options": ["shell", "lock-app"],
"default": "shell"
"command": "shellCommand.execute",
"args": {
"command": "cat examples/platform/openiotsdk/supported_examples.txt",
"description": "What Open IoT SDK example application do you want to use?"
}
},
{
"type": "pickString",
"type": "command",
"id": "openiotsdkUnitTest",
"description": "What unit test do you want to use?",
"options": [
"accesstest",
"AppTests",
"ASN1Tests",
"BDXTests",
"ChipCryptoTests",
"ControllerTests",
"CoreTests",
"CredentialsTest",
"DataModelTests",
"InetLayerTests",
"MdnsTests",
"MessagingLayerTests",
"MinimalMdnsCoreTests",
"MinimalMdnsRecordsTests",
"MinimalMdnsRespondersTests",
"PlatformTests",
"RawTransportTests",
"RetransmitTests",
"SecureChannelTests",
"SetupPayloadTests",
"SupportTests",
"SystemLayerTests",
"TestShell",
"TransportLayerTests",
"UserDirectedCommissioningTests"
],
"default": "accesstest"
"command": "shellCommand.execute",
"args": {
"command": "cat src/test_driver/openiotsdk/unit-tests/test_components.txt",
"description": "What Open IoT SDK unit test application do you want to use?"
}
},
{
"type": "promptString",
Expand Down
6 changes: 3 additions & 3 deletions config/openiotsdk/cmake/sdk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ if(TARGET mcu-driver-hal)
DOMAIN_NS=$<IF:$<BOOL:${TFM_SUPPORT}>,1,0>
)

# Fixing the optimization issue for mcu-driver-hal target in the no-debug build.
# The default -Og optimization causes performance issues for the application.
# Fixing the optimization issue for mcu-driver-hal target in the release build.
# The default -Os optimization causes performance issues for the application.
# We need to replace it with -O2 which is suitable for performance.
# This fix can be removed in the future when the issue will be fixed in SDK directly.
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
target_compile_options(mcu-driver-hal INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-O2>)
target_compile_options(mcu-driver-hal INTERFACE $<$<COMPILE_LANGUAGE:C>:-O2>)
endif()
Expand Down
9 changes: 0 additions & 9 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,6 @@ log-source-app/**/README
minimal-mdns/README
```

## Open IoT SDK examples

```{toctree}
:glob:
:maxdepth: 1
openiotsdk_examples
```

## OTA Provider example

```{toctree}
Expand Down
Loading

0 comments on commit 44c7faf

Please sign in to comment.