Skip to content

Commit cafb71e

Browse files
Thirsrinjmartinez-silabs
authored andcommitted
Pull request project-chip#1084: [Silabs] Cherry-pick DIC feature
Merge in WMN_TOOLS/matter from feature/cherry-pick_pr_for_DIC_feature to RC_2.2.0-1.2 Squashed commit of the following: commit f5166a2be3d3849146f89742ce0ef2a0c76bcbd3 Author: KishorSilabs <112456954+KishorSilabs@users.noreply.github.com> Date: Fri Aug 25 18:08:41 2023 +0530 [Silabs] DIC Changes (project-chip#28857) * AWS OTA Changes for SOC * Added missing mbedtls defines and files for dic * Restyled by gn * Removed not required macros --------- Co-authored-by: thirupathi <ths@silabs.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 5dcd582 commit cafb71e

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

src/lwip/silabs/lwipopts-rs911x.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@
6868
#ifdef DIC_ENABLE
6969
#define LWIP_DNS 1
7070
#define DNS_RAND_TXID() ((u32_t) rand())
71+
#define TCP_MSS (4 * 1152)
72+
#define TCPIP_THREAD_PRIO (3)
7173
#else
7274
#define LWIP_DNS 0
75+
#define TCP_MSS (1152)
76+
#define TCPIP_THREAD_PRIO (2)
7377
#endif /* DIC_ENABLE */
7478

7579
#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1
@@ -130,7 +134,6 @@
130134
#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
131135
#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)
132136

133-
#define TCP_MSS (1152)
134137
#define TCP_SND_BUF (2 * TCP_MSS)
135138
#define TCP_LISTEN_BACKLOG (1)
136139

@@ -140,8 +143,6 @@
140143

141144
#define TCPIP_THREAD_STACKSIZE (2048)
142145

143-
#define TCPIP_THREAD_PRIO (2)
144-
145146
#define NETIF_MAX_HWADDR_LEN 8U
146147

147148
#define LWIP_IPV6_NUM_ADDRESSES 5

src/platform/silabs/efr32/efr32-chip-mbedtls-config.h

+20
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,26 @@
4242
#define MBEDTLS_SSL_OUT_CONTENT_LEN 1560
4343
#define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF
4444
#define MBEDTLS_MPI_MAX_SIZE 512
45+
#define MBEDTLS_CTR_DRBG_C
46+
#define MBEDTLS_NO_PLATFORM_ENTROPY
47+
#define MBEDTLS_ENTROPY_HARDWARE_ALT
48+
#define MBEDTLS_SSL_TLS_C
49+
#define MBEDTLS_SSL_CLI_C
50+
#define MBEDTLS_SSL_PROTO_TLS1_2
51+
#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
52+
#define MBEDTLS_SSL_PROTO_DTLS
53+
#define MBEDTLS_CIPHER_MODE_CBC
54+
#define MBEDTLS_CCM_C
55+
#define MBEDTLS_ECJPAKE_C
56+
#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
57+
#define MBEDTLS_SSL_MAX_CONTENT_LEN 768
58+
59+
/**
60+
* Enable H Crypto and Entropy modules
61+
*/
62+
#define MBEDTLS_ECDH_C
63+
#define MBEDTLS_ENTROPY_C
64+
4565
#endif // DIC_ENABLE
4666

4767
// Configurations necessary for ot coap cert libs

third_party/silabs/SiWx917_sdk.gni

+4
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ template("siwx917_sdk") {
237237
defines += [ "DIC_ENABLE=1" ]
238238
}
239239

240+
if (aws_sdk_ota) {
241+
defines += [ "ENABLE_AWS_OTA_FEAT=1" ]
242+
}
243+
240244
libs += [ "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a" ]
241245

242246
cflags = []

third_party/silabs/efr32_sdk.gni

+4
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,10 @@ template("efr32_sdk") {
690690
if (enable_dic) {
691691
sources += [
692692
"${chip_root}/third_party/silabs/mqtt/stack/mqtt.c",
693+
"${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c",
694+
"${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c",
695+
"${efr32_sdk_root}/util/third_party/mbedtls/library/entropy_poll.c",
696+
"${efr32_sdk_root}/util/third_party/mbedtls/library/rsa.c",
693697
"${efr32_sdk_root}/util/third_party/mbedtls/library/rsa_alt_helpers.c",
694698
]
695699
}

0 commit comments

Comments
 (0)