Skip to content

Commit 953c20e

Browse files
authored
[bouffalolab] update macro define for header reserve size and etherne… (#37516)
* [bouffalolab] update macro define for header reserve size and ethernet zap configuration * re-generate lighting-app-ethernet.matter
1 parent cb137f0 commit 953c20e

File tree

5 files changed

+190
-8
lines changed

5 files changed

+190
-8
lines changed

examples/lighting-app/bouffalolab/bl602/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ bl_iot_sdk("sdk") {
7676
"OTA_AUTO_REBOOT_DELAY=${ota_auto_reboot_delay_seconds}",
7777
"CHIP_UART_BAUDRATE=${baudrate}",
7878
"SYS_AOS_LOOP_ENABLE",
79-
"CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE=48",
8079
]
8180

8281
defines += [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ]

examples/lighting-app/bouffalolab/bl702/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ bl_iot_sdk("sdk") {
9696
}
9797

9898
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_ETHERNET=${chip_enable_ethernet}" ]
99-
if (chip_enable_ethernet) {
100-
defines += [ "CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE=48" ]
101-
}
10299

103100
if (enable_psram) {
104101
defines += [ "CFG_USE_PSRAM=1" ]

examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter

+13-1
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,18 @@ endpoint 0 {
21272127

21282128
binding cluster OtaSoftwareUpdateProvider;
21292129

2130+
server cluster Descriptor {
2131+
callback attribute deviceTypeList;
2132+
callback attribute serverList;
2133+
callback attribute clientList;
2134+
callback attribute partsList;
2135+
callback attribute generatedCommandList;
2136+
callback attribute acceptedCommandList;
2137+
callback attribute attributeList;
2138+
callback attribute featureMap;
2139+
callback attribute clusterRevision;
2140+
}
2141+
21302142
server cluster AccessControl {
21312143
emits event AccessControlEntryChanged;
21322144
emits event AccessControlExtensionChanged;
@@ -2209,7 +2221,7 @@ endpoint 0 {
22092221
ram attribute lastNetworkingStatus;
22102222
ram attribute lastNetworkID;
22112223
ram attribute lastConnectErrorValue;
2212-
ram attribute featureMap default = 1;
2224+
ram attribute featureMap default = 4;
22132225
ram attribute clusterRevision default = 1;
22142226

22152227
handle command ScanNetworks;

examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap

+172-2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,176 @@
6363
"deviceTypeCode": 22,
6464
"deviceTypeProfileId": 259,
6565
"clusters": [
66+
{
67+
"name": "Descriptor",
68+
"code": 29,
69+
"mfgCode": null,
70+
"define": "DESCRIPTOR_CLUSTER",
71+
"side": "server",
72+
"enabled": 1,
73+
"attributes": [
74+
{
75+
"name": "DeviceTypeList",
76+
"code": 0,
77+
"mfgCode": null,
78+
"side": "server",
79+
"type": "array",
80+
"included": 1,
81+
"storageOption": "External",
82+
"singleton": 0,
83+
"bounded": 0,
84+
"defaultValue": null,
85+
"reportable": 1,
86+
"minInterval": 1,
87+
"maxInterval": 65534,
88+
"reportableChange": 0
89+
},
90+
{
91+
"name": "ServerList",
92+
"code": 1,
93+
"mfgCode": null,
94+
"side": "server",
95+
"type": "array",
96+
"included": 1,
97+
"storageOption": "External",
98+
"singleton": 0,
99+
"bounded": 0,
100+
"defaultValue": null,
101+
"reportable": 1,
102+
"minInterval": 1,
103+
"maxInterval": 65534,
104+
"reportableChange": 0
105+
},
106+
{
107+
"name": "ClientList",
108+
"code": 2,
109+
"mfgCode": null,
110+
"side": "server",
111+
"type": "array",
112+
"included": 1,
113+
"storageOption": "External",
114+
"singleton": 0,
115+
"bounded": 0,
116+
"defaultValue": null,
117+
"reportable": 1,
118+
"minInterval": 1,
119+
"maxInterval": 65534,
120+
"reportableChange": 0
121+
},
122+
{
123+
"name": "PartsList",
124+
"code": 3,
125+
"mfgCode": null,
126+
"side": "server",
127+
"type": "array",
128+
"included": 1,
129+
"storageOption": "External",
130+
"singleton": 0,
131+
"bounded": 0,
132+
"defaultValue": null,
133+
"reportable": 1,
134+
"minInterval": 1,
135+
"maxInterval": 65534,
136+
"reportableChange": 0
137+
},
138+
{
139+
"name": "GeneratedCommandList",
140+
"code": 65528,
141+
"mfgCode": null,
142+
"side": "server",
143+
"type": "array",
144+
"included": 1,
145+
"storageOption": "External",
146+
"singleton": 0,
147+
"bounded": 0,
148+
"defaultValue": null,
149+
"reportable": 1,
150+
"minInterval": 1,
151+
"maxInterval": 65534,
152+
"reportableChange": 0
153+
},
154+
{
155+
"name": "AcceptedCommandList",
156+
"code": 65529,
157+
"mfgCode": null,
158+
"side": "server",
159+
"type": "array",
160+
"included": 1,
161+
"storageOption": "External",
162+
"singleton": 0,
163+
"bounded": 0,
164+
"defaultValue": null,
165+
"reportable": 1,
166+
"minInterval": 1,
167+
"maxInterval": 65534,
168+
"reportableChange": 0
169+
},
170+
{
171+
"name": "EventList",
172+
"code": 65530,
173+
"mfgCode": null,
174+
"side": "server",
175+
"type": "array",
176+
"included": 1,
177+
"storageOption": "External",
178+
"singleton": 0,
179+
"bounded": 0,
180+
"defaultValue": null,
181+
"reportable": 1,
182+
"minInterval": 1,
183+
"maxInterval": 65534,
184+
"reportableChange": 0
185+
},
186+
{
187+
"name": "AttributeList",
188+
"code": 65531,
189+
"mfgCode": null,
190+
"side": "server",
191+
"type": "array",
192+
"included": 1,
193+
"storageOption": "External",
194+
"singleton": 0,
195+
"bounded": 0,
196+
"defaultValue": null,
197+
"reportable": 1,
198+
"minInterval": 1,
199+
"maxInterval": 65534,
200+
"reportableChange": 0
201+
},
202+
{
203+
"name": "FeatureMap",
204+
"code": 65532,
205+
"mfgCode": null,
206+
"side": "server",
207+
"type": "bitmap32",
208+
"included": 1,
209+
"storageOption": "External",
210+
"singleton": 0,
211+
"bounded": 0,
212+
"defaultValue": null,
213+
"reportable": 1,
214+
"minInterval": 1,
215+
"maxInterval": 65534,
216+
"reportableChange": 0
217+
},
218+
{
219+
"name": "ClusterRevision",
220+
"code": 65533,
221+
"mfgCode": null,
222+
"side": "server",
223+
"type": "int16u",
224+
"included": 1,
225+
"storageOption": "External",
226+
"singleton": 0,
227+
"bounded": 0,
228+
"defaultValue": null,
229+
"reportable": 1,
230+
"minInterval": 1,
231+
"maxInterval": 65534,
232+
"reportableChange": 0
233+
}
234+
]
235+
},
66236
{
67237
"name": "Access Control",
68238
"code": 31,
@@ -1199,7 +1369,7 @@
11991369
"storageOption": "RAM",
12001370
"singleton": 0,
12011371
"bounded": 0,
1202-
"defaultValue": "1",
1372+
"defaultValue": "4",
12031373
"reportable": 1,
12041374
"minInterval": 1,
12051375
"maxInterval": 65534,
@@ -4151,4 +4321,4 @@
41514321
"parentEndpointIdentifier": null
41524322
}
41534323
]
4154-
}
4324+
}

src/platform/bouffalolab/common/SystemPlatformConfig.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ struct ChipDeviceEvent;
3838
// #define CHIP_CONFIG_SHA256_CONTEXT_SIZE sizeof(mbedtls_sha256_context) in hw_acc/sha256_alt.h
3939
#define CHIP_CONFIG_SHA256_CONTEXT_SIZE (32 + 64 + 64 + 19 * 32)
4040
#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN 32
41-
#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE (388)
4241
#else
4342

4443
// #define CHIP_CONFIG_SHA256_CONTEXT_SIZE sizeof(bl_sha_ctx_t)
4544
#define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((7 + 1 + 5 + 18 + 16 + 16 + 7) * sizeof(unsigned int))
4645
#endif
46+
47+
#if CHIP_SYSTEM_CONFIG_USE_LWIP
48+
#define CHIP_SYSTEM_CONFIG_HEADER_RESERVE_SIZE \
49+
(PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN + CHIP_SYSTEM_HEADER_RESERVE_SIZE)
50+
#endif

0 commit comments

Comments
 (0)