Skip to content

Commit e876170

Browse files
ivankravetsdevyte
authored andcommitted
Use "PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY" as default lwIP profile for @platformio (#5305)
1 parent 8ae0746 commit e876170

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools/platformio-build.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,10 @@ def scons_patched_match_splitext(path, suffixes=None):
135135
#
136136
# lwIP
137137
#
138-
if "PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY" in flatten_cppdefines:
138+
if "PIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH" in flatten_cppdefines:
139139
env.Append(
140-
CPPDEFINES=[("TCP_MSS", 536), ("LWIP_FEATURES", 1)],
141-
CPPPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lwip2", "include")],
142-
LIBS=["lwip2-536-feat"]
140+
CPPPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lwip", "include")],
141+
LIBS=["lwip_gcc"]
143142
)
144143
elif "PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH" in flatten_cppdefines:
145144
env.Append(
@@ -159,10 +158,12 @@ def scons_patched_match_splitext(path, suffixes=None):
159158
CPPPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lwip2", "include")],
160159
LIBS=["lwip2-1460"]
161160
)
161+
# PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY (default)
162162
else:
163163
env.Append(
164-
CPPPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lwip", "include")],
165-
LIBS=["lwip_gcc"]
164+
CPPDEFINES=[("TCP_MSS", 536), ("LWIP_FEATURES", 1)],
165+
CPPPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lwip2", "include")],
166+
LIBS=["lwip2-536-feat"]
166167
)
167168

168169
#

0 commit comments

Comments
 (0)