Skip to content

Commit 43eaa88

Browse files
thashokjmartinez-silabs
authored andcommitted
Pull request project-chip#233: build fix for onoff_plug_app
Merge in WMN_TOOLS/matter from bugfix/onoff_plug_app to silabs Squashed commit of the following: commit a32eda9d2ebc796b77e2a8b6274cad49af8f227f Author: srningap <Srishylam.Ningapuram@silabs.com> Date: Fri Oct 28 17:34:00 2022 +0530 adding ipv flag changes to other custom examples commit 0f5772ef4f07d792c32cad019e26dfe6066700a5 Author: thashok <Thota.Ashok@silabs.com> Date: Thu Oct 27 21:49:34 2022 +0530 build fix for onoff_plug_app
1 parent 088c430 commit 43eaa88

File tree

4 files changed

+92
-32
lines changed

4 files changed

+92
-32
lines changed

silabs_examples/lighting-lite-app/efr32/BUILD.gn

+23-8
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ assert(!(use_wf200 && chip_enable_openthread))
8080
if (chip_enable_wifi) {
8181
assert(use_rs911x || use_wf200)
8282
enable_openthread_cli = false
83+
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
8384
}
8485

8586
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -98,14 +99,28 @@ if (chip_enable_wifi) {
9899
}
99100
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
100101
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
101-
efr32_lwip_defs += [
102-
"LWIP_IPV4=1",
103-
"LWIP_ARP=1",
104-
"LWIP_ICMP=1",
105-
"LWIP_DHCP=1",
106-
"LWIP_IPV6_ND=1",
107-
"LWIP_IGMP=1",
108-
]
102+
103+
if (lwip_ipv4) {
104+
efr32_lwip_defs += [
105+
"LWIP_IPV4=1",
106+
# adds following options to provide
107+
# them to .cpp source files
108+
# flags ported from lwipopts file
109+
# TODO: move lwipopts to one location
110+
"LWIP_ARP=1",
111+
"LWIP_ICMP=1",
112+
"LWIP_IGMP=1",
113+
"LWIP_DHCP=1",
114+
"LWIP_DNS=0",
115+
]
116+
} else {
117+
efr32_lwip_defs += [ "LWIP_IPV4=0" ]
118+
}
119+
if (lwip_ipv6) {
120+
efr32_lwip_defs += [ "LWIP_IPV6=1" ]
121+
} else {
122+
efr32_lwip_defs += [ "LWIP_IPV6=0" ]
123+
}
109124

110125
if (use_rs911x) {
111126
wiseconnect_sdk_root =

silabs_examples/onoff-plug-app/efr32/BUILD.gn

+23-8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ assert(!(use_wf200 && chip_enable_openthread))
7979
if (chip_enable_wifi) {
8080
assert(use_rs911x || use_wf200)
8181
enable_openthread_cli = false
82+
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
8283
}
8384

8485
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -97,14 +98,28 @@ if (chip_enable_wifi) {
9798
}
9899
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
99100
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
100-
efr32_lwip_defs += [
101-
"LWIP_IPV4=1",
102-
"LWIP_ARP=1",
103-
"LWIP_ICMP=1",
104-
"LWIP_DHCP=1",
105-
"LWIP_IPV6_ND=1",
106-
"LWIP_IGMP=1",
107-
]
101+
102+
if (lwip_ipv4) {
103+
efr32_lwip_defs += [
104+
"LWIP_IPV4=1",
105+
# adds following options to provide
106+
# them to .cpp source files
107+
# flags ported from lwipopts file
108+
# TODO: move lwipopts to one location
109+
"LWIP_ARP=1",
110+
"LWIP_ICMP=1",
111+
"LWIP_IGMP=1",
112+
"LWIP_DHCP=1",
113+
"LWIP_DNS=0",
114+
]
115+
} else {
116+
efr32_lwip_defs += [ "LWIP_IPV4=0" ]
117+
}
118+
if (lwip_ipv6) {
119+
efr32_lwip_defs += [ "LWIP_IPV6=1" ]
120+
} else {
121+
efr32_lwip_defs += [ "LWIP_IPV6=0" ]
122+
}
108123

109124
if (use_rs911x) {
110125
wiseconnect_sdk_root =

silabs_examples/sl-newLight/efr32/BUILD.gn

+23-8
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ assert(!(use_wf200 && chip_enable_openthread))
8282
if (chip_enable_wifi) {
8383
assert(use_rs911x || use_wf200)
8484
enable_openthread_cli = false
85+
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
8586
}
8687

8788
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -107,14 +108,28 @@ if (chip_enable_wifi) {
107108
}
108109
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
109110
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
110-
efr32_lwip_defs += [
111-
"LWIP_IPV4=1",
112-
"LWIP_ARP=1",
113-
"LWIP_ICMP=1",
114-
"LWIP_DHCP=1",
115-
"LWIP_IPV6_ND=1",
116-
"LWIP_IGMP=1",
117-
]
111+
112+
if (lwip_ipv4) {
113+
efr32_lwip_defs += [
114+
"LWIP_IPV4=1",
115+
# adds following options to provide
116+
# them to .cpp source files
117+
# flags ported from lwipopts file
118+
# TODO: move lwipopts to one location
119+
"LWIP_ARP=1",
120+
"LWIP_ICMP=1",
121+
"LWIP_IGMP=1",
122+
"LWIP_DHCP=1",
123+
"LWIP_DNS=0",
124+
]
125+
} else {
126+
efr32_lwip_defs += [ "LWIP_IPV4=0" ]
127+
}
128+
if (lwip_ipv6) {
129+
efr32_lwip_defs += [ "LWIP_IPV6=1" ]
130+
} else {
131+
efr32_lwip_defs += [ "LWIP_IPV6=0" ]
132+
}
118133

119134
if (use_rs911x) {
120135
wiseconnect_sdk_root =

silabs_examples/template/efr32/BUILD.gn

+23-8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ assert(!(use_wf200 && chip_enable_openthread))
7979
if (chip_enable_wifi) {
8080
assert(use_rs911x || use_wf200)
8181
enable_openthread_cli = false
82+
import("${chip_root}/src/platform/EFR32/wifi_args.gni")
8283
}
8384

8485
# ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD)
@@ -97,14 +98,28 @@ if (chip_enable_wifi) {
9798
}
9899
wifi_sdk_dir = "${chip_root}/src/platform/EFR32/wifi"
99100
efr32_lwip_defs = [ "LWIP_NETIF_API=1" ]
100-
efr32_lwip_defs += [
101-
"LWIP_IPV4=1",
102-
"LWIP_ARP=1",
103-
"LWIP_ICMP=1",
104-
"LWIP_DHCP=1",
105-
"LWIP_IPV6_ND=1",
106-
"LWIP_IGMP=1",
107-
]
101+
102+
if (lwip_ipv4) {
103+
efr32_lwip_defs += [
104+
"LWIP_IPV4=1",
105+
# adds following options to provide
106+
# them to .cpp source files
107+
# flags ported from lwipopts file
108+
# TODO: move lwipopts to one location
109+
"LWIP_ARP=1",
110+
"LWIP_ICMP=1",
111+
"LWIP_IGMP=1",
112+
"LWIP_DHCP=1",
113+
"LWIP_DNS=0",
114+
]
115+
} else {
116+
efr32_lwip_defs += [ "LWIP_IPV4=0" ]
117+
}
118+
if (lwip_ipv6) {
119+
efr32_lwip_defs += [ "LWIP_IPV6=1" ]
120+
} else {
121+
efr32_lwip_defs += [ "LWIP_IPV6=0" ]
122+
}
108123

109124
if (use_rs911x) {
110125
wiseconnect_sdk_root =

0 commit comments

Comments
 (0)