Skip to content

Commit

Permalink
[Silabs] Wi-fi folders moved.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcasallas-silabs committed Mar 26, 2024
1 parent 6f4d473 commit dc140d6
Show file tree
Hide file tree
Showing 48 changed files with 177 additions and 257 deletions.
21 changes: 10 additions & 11 deletions examples/chef/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ assert(current_os == "freertos")

chef_project_dir = "${chip_root}/examples/chef"
efr32_project_dir = "${chef_project_dir}/efr32"
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"
examples_plat_dir = "${chip_root}/examples/platform/silabs"
app_data_model = "${efr32_project_dir}:chef-comon"
import("${examples_plat_dir}/args.gni")
import("${examples_plat_dir}/efr32/args.gni")

declare_args() {
# Dump memory usage at link time.
Expand All @@ -54,20 +53,20 @@ chip_data_model("chef-common") {
efr32_sdk("sdk") {
sources = [
"${efr32_project_dir}/include/CHIPProjectConfig.h",
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${examples_plat_dir}/FreeRTOSConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/efr32",
"${efr32_project_dir}/include",
"${examples_plat_dir}",
"${examples_plat_dir}/efr32",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"${examples_plat_dir}",
]

if (use_wf200) {
# TODO efr32_sdk should not need a header from this location
include_dirs += [ "${examples_plat_dir}/wf200" ]
include_dirs += [ "${examples_plat_dir}/efr32/wf200" ]
}

defines = []
Expand Down Expand Up @@ -113,8 +112,8 @@ silabs_executable("chef_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
]

deps += [
Expand All @@ -132,7 +131,7 @@ silabs_executable("chef_app") {
"${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc",
"${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs",
"${examples_plat_dir}/pw_sys_io:pw_sys_io_silabs",
]

deps += pw_build_LINK_DEPS
Expand All @@ -143,7 +142,7 @@ silabs_executable("chef_app") {
]
}

ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down
42 changes: 15 additions & 27 deletions examples/light-switch-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ if (chip_enable_pw_rpc) {
assert(current_os == "freertos")

silabs_project_dir = "${chip_root}/examples/light-switch-app/silabs"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

if (wifi_soc) {
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917"
} else {
import("${efr32_sdk_build_root}/efr32_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
}

import("${examples_common_plat_dir}/args.gni")
import("${examples_plat_dir}/args.gni")

declare_args() {
# Dump memory usage at link time.
Expand All @@ -52,16 +49,16 @@ declare_args() {
if (wifi_soc) {
siwx917_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${examples_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/SiWx917",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${examples_plat_dir}/wifi",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"${examples_plat_dir}",
]

defines = []
Expand All @@ -75,30 +72,21 @@ if (wifi_soc) {
} else {
efr32_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${examples_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/efr32",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${examples_plat_dir}/efr32",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"${examples_plat_dir}",
]

if (use_wf200) {
# TODO efr32_sdk should not need a header from this location
include_dirs += [ "${examples_plat_dir}/wf200" ]
}

if (chip_enable_ble_rs911x) {
# TODO efr32_sdk should not need a header from this location
include_dirs += [
"${chip_root}/src/platform/silabs/efr32/rs911x",
"${examples_plat_dir}/rs911x",
"${examples_plat_dir}/rs911x/hal",
]
include_dirs += [ "${examples_plat_dir}/wifi/wf200" ]
}

defines = []
Expand All @@ -117,7 +105,7 @@ silabs_executable("light_switch_app") {
defines = []

sources = [
"${examples_common_plat_dir}/main.cpp",
"${examples_plat_dir}/main.cpp",
"src/AppTask.cpp",
"src/BindingHandler.cpp",
"src/LightSwitchMgr.cpp",
Expand All @@ -130,9 +118,9 @@ silabs_executable("light_switch_app") {
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}:siwx917-common" ]
deps += [ "${examples_plat_dir}/wifi/siwx917:siwx917-common" ]
} else {
deps += [ "${examples_plat_dir}:efr32-common" ]
deps += [ "${examples_plat_dir}/efr32:efr32-common" ]
}

if (chip_build_libshell) {
Expand All @@ -152,8 +140,8 @@ silabs_executable("light_switch_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
]

deps += [
Expand All @@ -171,7 +159,7 @@ silabs_executable("light_switch_app") {
if (wifi_soc) {
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ]
} else {
deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
}

deps += pw_build_LINK_DEPS
Expand All @@ -182,7 +170,7 @@ silabs_executable("light_switch_app") {
]
}

ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down
41 changes: 15 additions & 26 deletions examples/lighting-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@ if (chip_enable_pw_rpc) {
assert(current_os == "freertos")

silabs_project_dir = "${chip_root}/examples/lighting-app/silabs"
examples_common_plat_dir = "${chip_root}/examples/platform/silabs"

if (wifi_soc) {
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917"
} else {
import("${efr32_sdk_build_root}/efr32_sdk.gni")
examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
}

import("${examples_common_plat_dir}/args.gni")
import("${examples_plat_dir}/args.gni")

declare_args() {
# Dump memory usage at link time.
Expand All @@ -68,16 +65,16 @@ if (slc_generate) {
if (wifi_soc) {
siwx917_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${examples_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/SiWx917",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${examples_plat_dir}/wifi",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"${examples_plat_dir}",
]

defines = []
Expand All @@ -91,29 +88,21 @@ if (wifi_soc) {
} else {
efr32_sdk("sdk") {
sources = [
"${examples_common_plat_dir}/FreeRTOSConfig.h",
"${examples_plat_dir}/FreeRTOSConfig.h",
"${silabs_project_dir}/include/CHIPProjectConfig.h",
]

include_dirs = [
"${chip_root}/src/platform/silabs/efr32",
"${silabs_project_dir}/include",
"${examples_plat_dir}",
"${examples_plat_dir}/efr32",
"${chip_root}/src/lib",
"${examples_common_plat_dir}",
"${examples_plat_dir}",
]

if (use_wf200) {
# TODO efr32_sdk should not need a header from this location
include_dirs += [ "${examples_plat_dir}/wf200" ]
}

if (chip_enable_ble_rs911x) {
# TODO efr32_sdk should not need a header from this location
include_dirs += [
"${examples_plat_dir}/rs911x",
"${examples_plat_dir}/rs911x/hal",
]
include_dirs += [ "${examples_plat_dir}/wifi/wf200" ]
}

defines = []
Expand All @@ -135,7 +124,7 @@ silabs_executable("lighting_app") {
}

sources = [
"${examples_common_plat_dir}/main.cpp",
"${examples_plat_dir}/main.cpp",
"src/AppTask.cpp",
"src/LightingManager.cpp",
"src/ZclCallbacks.cpp",
Expand All @@ -147,9 +136,9 @@ silabs_executable("lighting_app") {
]

if (wifi_soc) {
deps += [ "${examples_plat_dir}:siwx917-common" ]
deps += [ "${examples_plat_dir}/wifi/siwx917:siwx917-common" ]
} else {
deps += [ "${examples_plat_dir}:efr32-common" ]
deps += [ "${examples_plat_dir}/efr32:efr32-common" ]
}

if (chip_enable_pw_rpc) {
Expand All @@ -168,8 +157,8 @@ silabs_executable("lighting_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp",
"${examples_common_plat_dir}/PigweedLogger.cpp",
"${examples_common_plat_dir}/Rpc.cpp",
"${examples_plat_dir}/PigweedLogger.cpp",
"${examples_plat_dir}/Rpc.cpp",
]

deps += [
Expand All @@ -192,7 +181,7 @@ silabs_executable("lighting_app") {
if (wifi_soc) {
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ]
} else {
deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_silabs" ]
}

deps += pw_build_LINK_DEPS
Expand All @@ -203,7 +192,7 @@ silabs_executable("lighting_app") {
]
}

ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld"
ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld"

inputs = [ ldscript ]

Expand Down
Loading

0 comments on commit dc140d6

Please sign in to comment.