Skip to content

Commit 1e63104

Browse files
kkasperczyk-norlubos
authored andcommitted
manifest: Updated Matter repository revision
Regular Matter version upmerge including samples and documentation alignments: - Regenerated zap files - Aligned Matter weather station to the version used in Matter 1.0 certification - Extended weather station configuration and documentation to show using factory data. Signed-off-by: Kamil Kasperczyk <[email protected]>
1 parent b560841 commit 1e63104

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5112
-4559
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# clang-format configuration file. Intended for clang-format >= 4.
4+
#
5+
# For more information, see:
6+
#
7+
# Documentation/process/clang-format.rst
8+
# https://clang.llvm.org/docs/ClangFormat.html
9+
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
10+
#
11+
---
12+
AccessModifierOffset: -8
13+
AlignAfterOpenBracket: Align
14+
AlignConsecutiveAssignments: false
15+
AlignConsecutiveDeclarations: false
16+
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
17+
AlignOperands: true
18+
AlignTrailingComments: false
19+
AllowAllParametersOfDeclarationOnNextLine: false
20+
AllowShortBlocksOnASingleLine: false
21+
AllowShortCaseLabelsOnASingleLine: false
22+
AllowShortFunctionsOnASingleLine: Inline
23+
AllowShortIfStatementsOnASingleLine: false
24+
AllowShortLoopsOnASingleLine: false
25+
AlwaysBreakAfterDefinitionReturnType: None
26+
AlwaysBreakAfterReturnType: None
27+
AlwaysBreakBeforeMultilineStrings: false
28+
AlwaysBreakTemplateDeclarations: false
29+
BinPackArguments: true
30+
BinPackParameters: true
31+
BraceWrapping:
32+
AfterClass: false
33+
AfterControlStatement: false
34+
AfterEnum: false
35+
AfterFunction: true
36+
AfterNamespace: true
37+
AfterObjCDeclaration: false
38+
AfterStruct: false
39+
AfterUnion: false
40+
#AfterExternBlock: false # Unknown to clang-format-5.0
41+
BeforeCatch: false
42+
BeforeElse: false
43+
IndentBraces: false
44+
#SplitEmptyFunction: true # Unknown to clang-format-4.0
45+
#SplitEmptyRecord: true # Unknown to clang-format-4.0
46+
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
47+
BreakBeforeBinaryOperators: None
48+
BreakBeforeBraces: Custom
49+
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
50+
BreakBeforeTernaryOperators: false
51+
BreakConstructorInitializersBeforeComma: false
52+
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
53+
BreakAfterJavaFieldAnnotations: false
54+
BreakStringLiterals: false
55+
ColumnLimit: 120
56+
CommentPragmas: '^ IWYU pragma:'
57+
#CompactNamespaces: false # Unknown to clang-format-4.0
58+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
59+
ConstructorInitializerIndentWidth: 8
60+
ContinuationIndentWidth: 8
61+
Cpp11BracedListStyle: false
62+
DerivePointerAlignment: false
63+
DisableFormat: false
64+
ExperimentalAutoDetectBinPacking: false
65+
#FixNamespaceComments: false # Unknown to clang-format-4.0
66+
67+
# Taken from:
68+
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ \
69+
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
70+
# | sort | uniq
71+
ForEachMacros:
72+
- 'FOR_EACH'
73+
- 'metal_bitmap_for_each_clear_bit'
74+
- 'metal_bitmap_for_each_set_bit'
75+
- 'metal_for_each_page_size_down'
76+
- 'metal_for_each_page_size_up'
77+
- 'metal_list_for_each'
78+
- 'RB_FOR_EACH'
79+
- 'RB_FOR_EACH_CONTAINER'
80+
- 'SYS_DLIST_FOR_EACH_CONTAINER'
81+
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
82+
- 'SYS_DLIST_FOR_EACH_NODE'
83+
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
84+
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
85+
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
86+
- 'SYS_SFLIST_FOR_EACH_NODE'
87+
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
88+
- 'SYS_SLIST_FOR_EACH_CONTAINER'
89+
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
90+
- 'SYS_SLIST_FOR_EACH_NODE'
91+
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
92+
- '_WAIT_Q_FOR_EACH'
93+
- 'Z_GENLIST_FOR_EACH_CONTAINER'
94+
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
95+
- 'Z_GENLIST_FOR_EACH_NODE'
96+
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
97+
98+
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
99+
IncludeCategories:
100+
- Regex: '.*'
101+
Priority: 1
102+
IncludeIsMainRegex: '(Test)?$'
103+
IndentCaseLabels: false
104+
#IndentPPDirectives: None # Unknown to clang-format-5.0
105+
IndentWidth: 8
106+
IndentWrappedFunctionNames: false
107+
JavaScriptQuotes: Leave
108+
JavaScriptWrapImports: true
109+
KeepEmptyLinesAtTheStartOfBlocks: false
110+
MacroBlockBegin: ''
111+
MacroBlockEnd: ''
112+
MaxEmptyLinesToKeep: 1
113+
NamespaceIndentation: Inner
114+
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
115+
ObjCBlockIndentWidth: 8
116+
ObjCSpaceAfterProperty: true
117+
ObjCSpaceBeforeProtocolList: true
118+
119+
# Taken from git's rules
120+
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
121+
PenaltyBreakBeforeFirstCallParameter: 30
122+
PenaltyBreakComment: 10
123+
PenaltyBreakFirstLessLess: 0
124+
PenaltyBreakString: 10
125+
PenaltyExcessCharacter: 100
126+
PenaltyReturnTypeOnItsOwnLine: 60
127+
128+
PointerAlignment: Right
129+
ReflowComments: true
130+
SortIncludes: true
131+
#SortUsingDeclarations: false # Unknown to clang-format-4.0
132+
SpaceAfterCStyleCast: false
133+
SpaceAfterTemplateKeyword: true
134+
SpaceBeforeAssignmentOperators: true
135+
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
136+
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
137+
SpaceBeforeParens: ControlStatements
138+
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
139+
SpaceInEmptyParentheses: false
140+
SpacesBeforeTrailingComments: 1
141+
SpacesInAngles: false
142+
SpacesInContainerLiterals: false
143+
SpacesInCStyleCastParentheses: false
144+
SpacesInParentheses: false
145+
SpacesInSquareBrackets: false
146+
Standard: Cpp11
147+
TabWidth: 8
148+
UseTab: Always
149+
...

applications/matter_weather_station/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ config AVERAGE_CURRENT_CONSUMPTION
1313
The predicted average current consumption of the Matter weather station
1414
device, used to estimate the remaining battery time.
1515

16+
if CHIP_FACTORY_DATA
17+
18+
# Overwrite the Fprotect block size to fit the size of the factory data partition.
19+
# See lib/fprotect/Kconfig to get full description of this config.
20+
config FPROTECT_BLOCK_SIZE
21+
hex
22+
default 0x1000
23+
24+
endif
25+
1626
source "Kconfig.zephyr"

applications/matter_weather_station/README.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ Such a device lets you remotely gather different kinds of data using the device
1212
The device works as a Matter accessory device, meaning it can be paired and controlled remotely over a Matter network built on top of a low-power, 802.15.4 Thread network.
1313
You can use this application as a reference for creating your own application.
1414

15-
.. note::
16-
The Matter protocol is in an early development stage and must be treated as an :ref:`experimental <software_maturity>` feature.
17-
1815
Requirements
1916
************
2017

@@ -90,6 +87,11 @@ This application supports the following build types:
9087

9188
* ``debug`` - Debug version of the application. You can use this version to enable additional features for verifying the application behavior, such as logs or command-line shell.
9289
* ``release`` - Release version of the application. You can use this version to enable only the necessary application functionalities to optimize its performance.
90+
* ``factory_data`` - Release version of the application that has factory data storage enabled.
91+
You can use this version to enable reading factory data necessary from a separate partition in the device non-volatile memory.
92+
This way, you can read information such as product information, keys, and certificates, useful for example for Matter certification.
93+
See `Generating factory data`_ to learn how to put factory data into device's storage.
94+
To learn more about factory data, read the :doc:`matter:nrfconnect_factory_data_configuration` page in the Matter documentation.
9395

9496
.. note::
9597
`Selecting a build type`_ is optional.
@@ -175,6 +177,24 @@ The ``build_thingy53_nrf5340_cpuapp`` parameter specifies the output directory f
175177
176178
File not found: ./ncs/nrf/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/prj_shell.conf
177179
180+
Generating factory data
181+
=======================
182+
183+
To enable factory data support, you need to select the ``factory_data`` build type from the available application :ref:`build types <matter_weather_station_app_build_types>`.
184+
You can generate new factory data set when building for the target board by invoking the following command:
185+
186+
.. parsed-literal::
187+
:class: highlight
188+
189+
west build -b thingy53_nrf5340_cpuapp -- -DCONF_FILE=prj_factory_data.conf -DOVERLAY_CONFIG="../../overlay-factory_data_build.conf"
190+
191+
After building the target, the generated :file:`factory_data.hex` file will be merged with the application target HEX file, so you can use the regular command to flash it to the device:
192+
193+
.. parsed-literal::
194+
:class: highlight
195+
196+
west flash --erase
197+
178198
Testing
179199
=======
180200

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright (c) 2021 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# The configuration file overlays multiprotocol_rpmsg sample.
8+
# Refer to samples/nrf5340/multiprotocol_rpmsg/prj.conf
9+
10+
# Reduce number of Bluetooth connections to limit memory usage.
11+
CONFIG_BT_CENTRAL=n
12+
CONFIG_BT_MAX_CONN=2
13+
14+
# Increase maximum data length of PDU supported in the Controller
15+
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
16+
CONFIG_BT_BUF_ACL_TX_SIZE=251
17+
CONFIG_BT_BUF_ACL_RX_SIZE=502
18+
19+
# Workaround FEM issue seen on older Thingy:53 revisions
20+
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=10
21+
22+
# Enable the frame encryption feature in the radio driver, as it is required for proper working
23+
# OPENTHREAD_CSL_RECEIVER and OPENTHREAD_LINK_METRICS_SUBJECT features
24+
CONFIG_NRF_802154_ENCRYPTION=y
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2022 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Use this overlay to re-generate new PAI and DAC certificates.
8+
# Be sure that chip-cert executable is added to your system PATH.
9+
10+
# Enable building the new factory data
11+
CONFIG_CHIP_FACTORY_DATA=y
12+
CONFIG_CHIP_FACTORY_DATA_BUILD=y
13+
CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=n
14+
CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y
15+
CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=n
16+
17+
# Set up the Factory Data
18+
CONFIG_CHIP_DEVICE_SERIAL_NUMBER="3"
19+
CONFIG_CHIP_DEVICE_VENDOR_ID=4735
20+
CONFIG_CHIP_DEVICE_VENDOR_NAME="Nordic Semiconductor ASA"
21+
CONFIG_CHIP_DEVICE_PRODUCT_ID=32781
22+
CONFIG_CHIP_DEVICE_PRODUCT_NAME="Weather Station"
23+
CONFIG_CHIP_DEVICE_MANUFACTURING_DATE="2022-07-12"
24+
CONFIG_CHIP_DEVICE_HARDWARE_VERSION=1
25+
CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING="SVE"
26+
CONFIG_CHIP_DEVICE_DISCRIMINATOR=0x635
27+
CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE=65286841
28+
CONFIG_CHIP_DEVICE_SPAKE2_IT=1000
29+
CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER="3kX890KClffU+BvLXQm68RDvXWlyuPofi8DEFkv74mQEnC+g02oLJTkItSDLBUvuYX87D1C7SnHZ7PuWvDziO57cHjPgUlkEhlRj+bvWKmE/FEwKuffl+VB7Dlx9HurJwQ=="
30+
CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID="1566d6032a898e53f7d58133a19ac9d2"
31+
CONFIG_CHIP_DEVICE_ENABLE_KEY="449eb9544ee3eef8d9fb7accb514fada"
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
app:
2+
address: 0x10200
3+
region: flash_primary
4+
size: 0xdfe00
5+
mcuboot:
6+
address: 0x0
7+
region: flash_primary
8+
size: 0x10000
9+
mcuboot_pad:
10+
address: 0x10000
11+
region: flash_primary
12+
size: 0x200
13+
mcuboot_primary:
14+
address: 0x10000
15+
orig_span: &id001
16+
- mcuboot_pad
17+
- app
18+
region: flash_primary
19+
size: 0xe0000
20+
span: *id001
21+
mcuboot_primary_app:
22+
address: 0x10200
23+
orig_span: &id002
24+
- app
25+
region: flash_primary
26+
size: 0xdfe00
27+
span: *id002
28+
settings_storage:
29+
address: 0xf0000
30+
region: flash_primary
31+
size: 0xf000
32+
factory_data:
33+
address: 0xff000
34+
region: flash_primary
35+
size: 0x1000
36+
mcuboot_primary_1:
37+
address: 0x0
38+
size: 0x40000
39+
device: flash_ctrl
40+
region: ram_flash
41+
mcuboot_secondary:
42+
address: 0x00000
43+
size: 0xe0000
44+
device: MX25R64
45+
region: external_flash
46+
mcuboot_secondary_1:
47+
address: 0xe0000
48+
size: 0x40000
49+
device: MX25R64
50+
region: external_flash
51+
external_flash:
52+
address: 0x120000
53+
size: 0x6e0000
54+
device: MX25R64
55+
region: external_flash
56+
pcd_sram:
57+
address: 0x20000000
58+
size: 0x2000
59+
region: sram_primary

applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/prj.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,10 @@ CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
182182

183183
# Enable Matter OTA
184184
CONFIG_CHIP_OTA_REQUESTOR=y
185+
186+
# Enable FFS
187+
CONFIG_CHIP_ROTATING_DEVICE_ID=y
188+
CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE=y
189+
# 0x0302 (Temp. sensor)
190+
CONFIG_CHIP_DEVICE_TYPE=770
191+
CONFIG_BT_RX_STACK_SIZE=1500

0 commit comments

Comments
 (0)