Skip to content

Commit

Permalink
slc gen for siwx917 boards
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinez-silabs committed Jan 9, 2025
1 parent 8bb4590 commit 94d5791
Show file tree
Hide file tree
Showing 103 changed files with 2,853 additions and 624 deletions.
2 changes: 2 additions & 0 deletions matter/si91x/siwx917/BRD2605A/autogen/sl_component_catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#define SL_CATALOG_IOSTREAM_PRESENT
#define SL_CATALOG_MEMORY_MANAGER_PRESENT
#define SL_CATALOG_NVM3_PRESENT
#define SL_CATALOG_PSA_CRYPTO_PRESENT
#define SL_CATALOG_SEGGER_RTT_PRESENT
#define SL_CATALOG_SL_CORE_PRESENT
#define SL_CATALOG_SLEEPTIMER_PRESENT
#ifdef DISPLAY_ENABLED
#define SL_CATALOG_DMD_MEMLCD_PRESENT
Expand Down
7 changes: 6 additions & 1 deletion matter/si91x/siwx917/BRD2605A/autogen/sl_event_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#include "system_si91x.h"
#include "rsi_nvic_priorities_config.h"
#include "sl_si91x_clock_manager.h"
#include "sli_siwx917_soc.h"
#include "rsi_board.h"
#include "rsi_debug.h"
#if SL_ICD_ENABLED
#include "sl_si91x_power_manager.h"
#include "rsi_wisemcu_hardware_setup.h"
#include "sl_si91x_power_manager_init.h"
#endif // SL_ICD_ENABLED
#include "SEGGER_RTT.h"
Expand All @@ -16,13 +16,16 @@
#include "sl_si91x_rgb_led_instances.h"
#include "sl_ulp_timer_instances.h"
#include "sl_iostream_rtt.h"
#include "sl_mbedtls.h"
#include "cmsis_os2.h"
#include "sl_iostream_init_instances.h"
#include "sl_iostream_handles.h"

void sl_platform_init(void)
{
SystemCoreClockUpdate();
sl_si91x_device_init_nvic();
sl_si91x_clock_manager_init();
sli_si91x_platform_init();
RSI_Board_Init();
DEBUGINIT();
Expand Down Expand Up @@ -51,6 +54,7 @@ void sl_service_init(void)
sli_si91x_power_manager_configure_ram_and_peripheral();
#endif // SL_ICD_ENABLED
sl_sleeptimer_init();
sl_mbedtls_init();
sl_iostream_init_instances();
}

Expand All @@ -65,5 +69,6 @@ void sl_internal_app_init(void)
void sl_iostream_init_instances(void)
{
sl_iostream_rtt_init();
sl_iostream_set_console_instance();
}

34 changes: 34 additions & 0 deletions matter/si91x/siwx917/BRD2605A/autogen/sl_iostream_handles.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const sl_iostream_instance_info_t *sl_iostream_instances_info[] = {
};

const uint32_t sl_iostream_instances_count = sizeof(sl_iostream_instances_info) / sizeof(sl_iostream_instances_info[0]);
sl_iostream_t *sl_iostream_recommended_console_stream = NULL;


/***************************************************************************//**
* Get iostream instance handle for a given name
Expand All @@ -24,4 +26,36 @@ sl_iostream_t *sl_iostream_get_handle(char *name)
}

return NULL;
}

/***************************************************************************//**
* Set iostream recommended instance for a console
******************************************************************************/
void sl_iostream_set_console_instance(void)
{
sl_iostream_type_t console = SL_IOSTREAM_TYPE_UNDEFINED;

for (uint32_t i = 0; i < sl_iostream_instances_count; i++) {
switch (sl_iostream_instances_info[i]->type) {
case SL_IOSTREAM_TYPE_UART:
case SL_IOSTREAM_TYPE_RTT:
if (console != SL_IOSTREAM_TYPE_UART) {
console = sl_iostream_instances_info[i]->type;
sl_iostream_recommended_console_stream = sl_iostream_instances_info[i]->handle;
}
break;

case SL_IOSTREAM_TYPE_VUART:
if (console != SL_IOSTREAM_TYPE_UART && console != SL_IOSTREAM_TYPE_RTT) {
console = sl_iostream_instances_info[i]->type;
sl_iostream_recommended_console_stream = sl_iostream_instances_info[i]->handle;
}
break;

case SL_IOSTREAM_TYPE_LOOPBACK:
default:
// Ignore loopback interface
break;
}
}
}
4 changes: 4 additions & 0 deletions matter/si91x/siwx917/BRD2605A/autogen/sl_iostream_handles.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ extern "C" {
extern const sl_iostream_instance_info_t *sl_iostream_instances_info[];
extern const uint32_t sl_iostream_instances_count;

extern sl_iostream_t *sl_iostream_recommended_console_stream;

sl_iostream_t *sl_iostream_get_handle(char *name);

void sl_iostream_set_console_instance(void);

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// This is an autogenerated config file, any changes to this file will be
// overwritten
// This is an autogenerated config file, any changes to this file will be overwritten

#ifndef SLI_MBEDTLS_CONFIG_AUTOGEN_H
#define SLI_MBEDTLS_CONFIG_AUTOGEN_H

#define MBEDTLS_MPI_MAX_SIZE 32

#define MBEDTLS_MPI_MAX_SIZE 32


#define MBEDTLS_PSA_CRYPTO_DRIVERS
#define MBEDTLS_NO_PLATFORM_ENTROPY
#define MBEDTLS_AES_C
#define MBEDTLS_ASN1_PARSE_C
Expand All @@ -28,7 +30,7 @@
#define MBEDTLS_PLATFORM_MEMORY
#define MBEDTLS_ENTROPY_C
#define MBEDTLS_ENTROPY_FORCE_SHA256
#define MBEDTLS_ENTROPY_MAX_SOURCES 2
#define MBEDTLS_ENTROPY_MAX_SOURCES 2
#define MBEDTLS_CTR_DRBG_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_SHA224_C
Expand All @@ -42,6 +44,7 @@
#ifndef SL_MBEDTLS_USE_TINYCRYPT
#define MBEDTLS_PSA_CRYPTO_C
#define MBEDTLS_USE_PSA_CRYPTO
#define MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
#define MBEDTLS_PSA_CRYPTO_CONFIG
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
#define MBEDTLS_CIPHER_PADDING_PKCS7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
// This is an autogenerated config file, any changes to this file will be
// overwritten
// This is an autogenerated config file, any changes to this file will be overwritten

#ifndef SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H
#define SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H

// Convert CMSIS Markup config defines to mbedTLS specific config defines

#if SL_MBEDTLS_RSA_NO_CRT
#define MBEDTLS_RSA_NO_CRT
#define MBEDTLS_RSA_NO_CRT
#endif

// Allow undefining the specified cipher suites
#if defined(SLI_MBEDTLS_AUTODETECT_CIPHERSUITES)
#undef MBEDTLS_SSL_CIPHERSUITES
#undef MBEDTLS_SSL_CIPHERSUITES
#endif

#if SL_MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
#endif
#if SL_MBEDTLS_SSL_EXPORT_KEYS
#define MBEDTLS_SSL_EXPORT_KEYS
#define MBEDTLS_SSL_EXPORT_KEYS
#endif
#if SL_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
#endif
#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
#endif
#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
#endif
#if SL_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
#endif
#if SL_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
#endif
#if SL_MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING
#define MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING
#define MBEDTLS_ECP_ENABLE_COMPRESSED_CURVE_PARSING
#endif

#if !defined(MBEDTLS_SSL_IN_CONTENT_LEN)
#define MBEDTLS_SSL_IN_CONTENT_LEN SL_MBEDTLS_SSL_IN_CONTENT_LEN
#define MBEDTLS_SSL_IN_CONTENT_LEN SL_MBEDTLS_SSL_IN_CONTENT_LEN
#endif

#if !defined(MBEDTLS_SSL_OUT_CONTENT_LEN)
#define MBEDTLS_SSL_OUT_CONTENT_LEN SL_MBEDTLS_SSL_OUT_CONTENT_LEN
#define MBEDTLS_SSL_OUT_CONTENT_LEN SL_MBEDTLS_SSL_OUT_CONTENT_LEN
#endif





#endif // SLI_MBEDTLS_CONFIG_TRANSFORM_AUTOGEN_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is an autogenerated config file, any changes to this file will be overwritten

#ifndef SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H
#define SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H

#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY 1
#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_BASIC 1
#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1
#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1
#define MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1
#define MBEDTLS_PSA_BUILTIN_ECC_SECP_R1_256 1
#define MBEDTLS_PSA_BUILTIN_ALG_SHA_256 1
#define MBEDTLS_PSA_BUILTIN_ALG_ECDSA 1

#endif // SLI_PSA_BUILTIN_CONFIG_AUTOGEN_H
32 changes: 32 additions & 0 deletions matter/si91x/siwx917/BRD2605A/autogen/sli_psa_config_autogen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// This is an autogenerated config file, any changes to this file will be overwritten

#ifndef SLI_PSA_CONFIG_AUTOGEN_H
#define SLI_PSA_CONFIG_AUTOGEN_H

#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
#define PSA_WANT_KEY_TYPE_AES 1
#define PSA_WANT_ALG_CCM 1
#define PSA_WANT_ALG_CMAC 1
#define PSA_WANT_ALG_SHA_224 1
#define PSA_WANT_ALG_SHA_256 1
#define PSA_WANT_ALG_ECB_NO_PADDING 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR 1
#define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY 1
#define PSA_WANT_ECC_SECP_R1_256 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE 1
#define PSA_WANT_ALG_ECDH 1
#define PSA_WANT_ALG_ECDSA 1
#define PSA_WANT_ALG_HKDF 1
#define PSA_WANT_ALG_HMAC 1
#define PSA_WANT_KEY_TYPE_HMAC 1
#define PSA_WANT_ALG_JPAKE 1

#define MBEDTLS_PSA_KEY_SLOT_COUNT (22 + 1 + SL_PSA_KEY_USER_SLOT_COUNT + 1)
#ifndef SL_PSA_ITS_MAX_FILES
#define SL_PSA_ITS_MAX_FILES ( + SL_PSA_ITS_USER_MAX_FILES)
#endif

#endif // SLI_PSA_CONFIG_AUTOGEN_H
10 changes: 7 additions & 3 deletions matter/si91x/siwx917/BRD2605A/config/RTE_Device_917.h
Original file line number Diff line number Diff line change
Expand Up @@ -2858,7 +2858,7 @@
#define RTE_GSPI_MASTER_MOSI_PIN GSPI_MASTER_MOSI__PIN
#if (GSPI_MASTER_MOSI_LOC == 16)
#define RTE_GSPI_MASTER_MOSI_MUX 4
#define RTE_GSPI_MASTER_MOSI_PAD 1
#define RTE_GSPI_MASTER_MOSI_PAD 7
#endif
#if (GSPI_MASTER_MOSI_LOC == 17)
#define RTE_GSPI_MASTER_MOSI_MUX 4
Expand Down Expand Up @@ -2956,8 +2956,8 @@
// </e>(Generic SPI master)[Driver_GSPI_MASTER]

// <o>(State Configurable Timer) Interface
#define SCT_CLOCK_SOURCE M4_SOCCLKFOROTHERCLKSCT
#define SCT_CLOCK_DIV_FACT 1
#define SCT_CLOCK_SOURCE CT_INTFPLLCLK
#define SCT_CLOCK_DIV_FACT 2

//SCT_IN_0 <0=>GPIO_25 <1=>GPIO_64 <2=>GPIO_68

Expand Down Expand Up @@ -4651,3 +4651,7 @@

#define RTE_MEMLCD_ENABLE_DISPLAY_PIN 0 // Memlcd display enable pin
#define RTE_MEMLCD_ENABLE_DISPLAY_PORT 0 // Memlcd display enable port

// GPIO as enable pin for Mic
#define RTE_MIC_ENABLE_PORT RTE_UULP_GPIO_0_PORT
#define RTE_MIC_ENABLE_PIN RTE_UULP_GPIO_0_PIN
3 changes: 3 additions & 0 deletions matter/si91x/siwx917/BRD2605A/config/pin_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
// $[GPIO]
// [GPIO]$

// $[QEI]
// [QEI]$

// $[CUSTOM_PIN_NAME]
#ifndef _PORT
#define _PORT 0
Expand Down
Loading

0 comments on commit 94d5791

Please sign in to comment.