Skip to content

Commit

Permalink
Pull request project-chip#1084: [Silabs] Cherry-pick DIC feature
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thirsrin authored and jmartinez-silabs committed Aug 25, 2023
1 parent 5dcd582 commit cafb71e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lwip/silabs/lwipopts-rs911x.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@
#ifdef DIC_ENABLE
#define LWIP_DNS 1
#define DNS_RAND_TXID() ((u32_t) rand())
#define TCP_MSS (4 * 1152)
#define TCPIP_THREAD_PRIO (3)
#else
#define LWIP_DNS 0
#define TCP_MSS (1152)
#define TCPIP_THREAD_PRIO (2)
#endif /* DIC_ENABLE */

#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1
Expand Down Expand Up @@ -130,7 +134,6 @@
#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL)
#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE)

#define TCP_MSS (1152)
#define TCP_SND_BUF (2 * TCP_MSS)
#define TCP_LISTEN_BACKLOG (1)

Expand All @@ -140,8 +143,6 @@

#define TCPIP_THREAD_STACKSIZE (2048)

#define TCPIP_THREAD_PRIO (2)

#define NETIF_MAX_HWADDR_LEN 8U

#define LWIP_IPV6_NUM_ADDRESSES 5
Expand Down
20 changes: 20 additions & 0 deletions src/platform/silabs/efr32/efr32-chip-mbedtls-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@
#define MBEDTLS_SSL_OUT_CONTENT_LEN 1560
#define MBEDTLS_PSA_BUILTIN_ALG_TLS12_PRF
#define MBEDTLS_MPI_MAX_SIZE 512
#define MBEDTLS_CTR_DRBG_C
#define MBEDTLS_NO_PLATFORM_ENTROPY
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#define MBEDTLS_SSL_TLS_C
#define MBEDTLS_SSL_CLI_C
#define MBEDTLS_SSL_PROTO_TLS1_2
#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
#define MBEDTLS_SSL_PROTO_DTLS
#define MBEDTLS_CIPHER_MODE_CBC
#define MBEDTLS_CCM_C
#define MBEDTLS_ECJPAKE_C
#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
#define MBEDTLS_SSL_MAX_CONTENT_LEN 768

/**
* Enable H Crypto and Entropy modules
*/
#define MBEDTLS_ECDH_C
#define MBEDTLS_ENTROPY_C

#endif // DIC_ENABLE

// Configurations necessary for ot coap cert libs
Expand Down
4 changes: 4 additions & 0 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ template("siwx917_sdk") {
defines += [ "DIC_ENABLE=1" ]
}

if (aws_sdk_ota) {
defines += [ "ENABLE_AWS_OTA_FEAT=1" ]
}

libs += [ "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a" ]

cflags = []
Expand Down
4 changes: 4 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@ template("efr32_sdk") {
if (enable_dic) {
sources += [
"${chip_root}/third_party/silabs/mqtt/stack/mqtt.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/ctr_drbg.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/entropy.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/entropy_poll.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/rsa.c",
"${efr32_sdk_root}/util/third_party/mbedtls/library/rsa_alt_helpers.c",
]
}
Expand Down

0 comments on commit cafb71e

Please sign in to comment.