Skip to content

Commit

Permalink
[slc] add ot_stack_features_config component to ot-efr32 extension
Browse files Browse the repository at this point in the history
This adds a new component that generates a config file for SL_OPENTHREAD_STACK_FEATURES_CONFIG_FILE

This is essentially a copy of the ot_stack_ftd/mtd/rcp components except it doesn't define a `OPENTHREAD_<DEVICE_TYPE>` macro
https://github.com/SiliconLabs/gecko_sdk/blob/124fa19de8c8b3961d21c20857f7df32239786da/protocol/openthread/component/ot_stack_ftd.slcc#L21-L26

The component also uses the [validation script](https://github.com/SiliconLabs/gecko_sdk/blob/gsdk_4.4/protocol/openthread/component/script/ot_log_validation.lua) to ensure [`ot_rtt_log`](https://github.com/SiliconLabs/gecko_sdk/blob/gsdk_4.4/protocol/openthread/component/ot_rtt_log.slcc) is in a project if the `OPENTHREAD_CONFIG_LOG_OUTPUT` is set to `OPENTHREAD_CONFIG_LOG_PLATFORM_DEFINED`
  • Loading branch information
lmnotran committed Dec 20, 2023
1 parent a14188a commit 96e6253
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ quality: production
component:
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: ot_ncp_spidrv
- id: rail_util_pti

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ quality: production
component:
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down
4 changes: 2 additions & 2 deletions ot-efr32.slce
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
id: ot-efr32
version: 0.0.1
description: "ot-efr32 extension for Gecko SDK Suite"
label: "Silicon Labs Matter"
label: "Silicon Labs OpenThread"
sdk:
id: gecko_sdk
version: 4.2.1
version: 4.4.0
component_path:
- path: slc/component
24 changes: 24 additions & 0 deletions slc/component/ot_stack_features_config.slcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
id: ot_stack_features_config
label: Stack Features Config
package: OpenThread
category: OpenThread
quality: production
description: This component provides the OpenThread stack features configuration
provides:
- name: ot_stack_features_config
config_file:
- path: third_party/silabs/gecko_sdk/protocol/openthread/config/sl_openthread_features_config.h
file_id: openthread_features
unless: [ot_reference_device]
- path: third_party/silabs/gecko_sdk/protocol/openthread/config/sl_openthread_reference_device_config.h
file_id: openthread_features
condition: [ot_reference_device]
validation_helper:
- path: third_party/silabs/gecko_sdk/protocol/openthread/component/script/ot_log_validation.lua
define:
- name: SL_OPENTHREAD_STACK_FEATURES_CONFIG_FILE
value: "\"sl_openthread_features_config.h\""
unless: [ot_reference_device]
- name: SL_OPENTHREAD_STACK_FEATURES_CONFIG_FILE
value: "\"sl_openthread_reference_device_config.h\""
condition: [ot_reference_device]
6 changes: 6 additions & 0 deletions src/platform_projects/openthread-efr32-rcp-spi.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ quality: production
component:
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: ot_ncp_spidrv
- id: rail_util_pti

Expand All @@ -20,3 +22,7 @@ define:
value: 1
- name: OPENTHREAD_RADIO
value: 1

sdk_extension:
- id: ot-efr32
version: 0.0.1
6 changes: 6 additions & 0 deletions src/platform_projects/openthread-efr32-rcp-uart.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ quality: production
component:
- id: ot_platform_abstraction_core
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand All @@ -22,3 +24,7 @@ define:
value: 1
- name: OPENTHREAD_RADIO
value: 1

sdk_extension:
- id: ot-efr32
version: 0.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down Expand Up @@ -53,3 +55,7 @@ configuration:
define:
- name: OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
value: 1

sdk_extension:
- id: ot-efr32
version: 0.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down Expand Up @@ -49,3 +51,7 @@ configuration:
condition: [freertos]
- name: SL_STACK_SIZE
value: 4608

sdk_extension:
- id: ot-efr32
version: 0.0.1
6 changes: 6 additions & 0 deletions src/platform_projects/openthread-efr32-soc-with-buttons.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand Down Expand Up @@ -48,3 +50,7 @@ configuration:
condition: [freertos]
- name: SL_STACK_SIZE
value: 4608

sdk_extension:
- id: ot-efr32
version: 0.0.1
6 changes: 6 additions & 0 deletions src/platform_projects/openthread-efr32-soc.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ component:
- id: ot_platform_abstraction_core
- id: ot_psa_crypto
- id: ot_mbedtls
- id: ot_stack_features_config
from: ot-efr32
- id: uartdrv_usart
instance:
- vcom
Expand All @@ -35,3 +37,7 @@ configuration:
condition: [freertos]
- name: SL_STACK_SIZE
value: 4608

sdk_extension:
- id: ot-efr32
version: 0.0.1

0 comments on commit 96e6253

Please sign in to comment.