Skip to content

Commit

Permalink
Try to regroup all _include_dir together. List MCU include before ncp…
Browse files Browse the repository at this point in the history
…'s for wifi ncp combos
  • Loading branch information
jmartinez-silabs committed Jul 3, 2024
1 parent eb4c125 commit 5c4749d
Showing 1 changed file with 88 additions and 88 deletions.
176 changes: 88 additions & 88 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,90 @@ template("efr32_sdk") {
"${sl_ot_libs_path}/config",
]

if (is_series_2) {
_include_dirs += [
"${efr32_sdk_root}/platform/emdrv/dmadrv/inc/s2_signals",
"${efr32_sdk_root}/platform/driver/debug/inc/",
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/",
"${efr32_sdk_root}/platform/service/device_init/config/s2/",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
]

libs += [
"${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a",
"${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a",
]

if (!chip_enable_ble_rs911x) {
libs += [
"${sdk_support_root}/protocol/bluetooth/bgcommon/lib/build/gcc/cortex-m33/bgcommon/release/libbgcommon.a",
"${sdk_support_root}/protocol/bluetooth/build/gcc/cortex-m33/bt_host/release/libbt_host.a",
"${sdk_support_root}/protocol/bluetooth/build/gcc/cortex-m33/bt_host/hal/release/libbt_hal_series2.a",
]
}
}

if (silabs_family == "efr32mg24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
"${efr32_sdk_root}/platform/emdrv/spidrv/inc",
"${efr32_sdk_root}/platform/emdrv/spidrv/config",
]

libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a" ]

if (!chip_enable_ble_rs911x) {
libs += [ "${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a" ]
}
} else if (silabs_family == "mgm24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
]

libs += [
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a",
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a",
]

if (silabs_mcu == "MGM240PB32VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb32vna_gcc.a" ]
} else if (silabs_mcu == "MGM240PB22VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb22vna_gcc.a" ]
} else if (silabs_mcu == "MGM240L022RNF") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240l022rnf_gcc.a" ]
} else if (silabs_mcu == "MGM240SD22VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240sd22vna_gcc.a" ]
defines += [ "SLI_RADIOAES_REQUIRES_MASKING=1" ]
}
} else if (silabs_family == "efr32mg26") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG26/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26/config",
]

libs += [
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg26_gcc_release.a",
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg26_gcc_release.a",
]
}

if (use_wf200) {
_include_dirs += [
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/firmware",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/pds/brd8022a",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/secure_link",
]
}

if (use_SiWx917) {
_include_dirs += [
# si91x component
Expand Down Expand Up @@ -277,6 +361,10 @@ template("efr32_sdk") {
}
}

if (invoker.enable_dic) {
_include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ]
}

# Note that we're setting the mbedTLS and PSA configuration files through a
# define. This means the build system by default does not pick up changes in
# the content of these, only when changing the filename itself.
Expand Down Expand Up @@ -517,98 +605,10 @@ template("efr32_sdk") {
]
}

if (invoker.enable_dic) {
_include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ]
}

if (sl_use_subscription_synching) {
defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ]
}

if (is_series_2) {
_include_dirs += [
"${efr32_sdk_root}/platform/emdrv/dmadrv/inc/s2_signals",
"${efr32_sdk_root}/platform/driver/debug/inc/",
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/",
"${efr32_sdk_root}/platform/service/device_init/config/s2/",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
]

libs += [
"${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a",
"${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a",
]

if (!chip_enable_ble_rs911x) {
libs += [
"${sdk_support_root}/protocol/bluetooth/bgcommon/lib/build/gcc/cortex-m33/bgcommon/release/libbgcommon.a",
"${sdk_support_root}/protocol/bluetooth/build/gcc/cortex-m33/bt_host/release/libbt_host.a",
"${sdk_support_root}/protocol/bluetooth/build/gcc/cortex-m33/bt_host/hal/release/libbt_hal_series2.a",
]
}
}

if (silabs_family == "efr32mg24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
"${efr32_sdk_root}/platform/emdrv/spidrv/inc",
"${efr32_sdk_root}/platform/emdrv/spidrv/config",
]

libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a" ]

if (!chip_enable_ble_rs911x) {
libs += [ "${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a" ]
}
} else if (silabs_family == "mgm24") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
]

libs += [
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg24_gcc_release.a",
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a",
]

if (silabs_mcu == "MGM240PB32VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb32vna_gcc.a" ]
} else if (silabs_mcu == "MGM240PB22VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb22vna_gcc.a" ]
} else if (silabs_mcu == "MGM240L022RNF") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240l022rnf_gcc.a" ]
} else if (silabs_mcu == "MGM240SD22VNA") {
libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240sd22vna_gcc.a" ]
defines += [ "SLI_RADIOAES_REQUIRES_MASKING=1" ]
}
} else if (silabs_family == "efr32mg26") {
_include_dirs += [
"${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG26/Include",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg26/config",
]

libs += [
"${sdk_support_root}/protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg26_gcc_release.a",
"${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg26_gcc_release.a",
]
}

if (use_wf200) {
_include_dirs += [
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/bus",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/firmware",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/pds/brd8022a",
"${efr32_sdk_root}/platform/radio/wifi/wfx_fmac_driver/secure_link",
]
}

cflags = []
foreach(include_dir, _include_dirs) {
cflags += [ "-isystem" + rebase_path(include_dir, root_build_dir) ]
Expand Down

0 comments on commit 5c4749d

Please sign in to comment.