Skip to content

Commit 1c9b2ae

Browse files
committed
Update build script according to the latest framework version
1 parent 4db3175 commit 1c9b2ae

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

mbed.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,25 @@ def get_dynamic_manifest(name, config, extra_inc_dirs=[]):
9696
if name == "netsocket":
9797
manifest['build']['flags'].extend(["-DMBED_CONF_EVENTS_PRESENT"])
9898
manifest['dependencies'] = {
99-
"mbed-LWIP": "*",
99+
"mbed-lwipstack": "*",
100100
"mbed-events": "*"
101101
}
102102

103103
# arm_random_module_init
104104
if name == "mbed-client-randlib":
105-
manifest['dependencies'] = {"mbed-nanostack": "*"}
105+
manifest['dependencies'] = {"mbed-nanostack-interface": "*"}
106+
107+
if name == "nfc":
108+
manifest['dependencies'] = {"mbed-events": "*"}
106109

107110
return manifest
108111

109112

110-
def process_global_lib(libname, mbed_config):
111-
if not libname or not mbed_config:
113+
def process_global_lib(libname, lib_configs):
114+
if not libname or not lib_configs:
112115
return
113-
lib_config = mbed_config.get("libs").get(libname, {})
116+
117+
lib_config = lib_configs.get(libname, {})
114118
if not lib_config:
115119
return
116120
lib_includes = [
@@ -169,6 +173,7 @@ def process_global_lib(libname, mbed_config):
169173

170174
# There is no difference in processing between lib and feature
171175
libs = mbed_config.get("libs").copy()
176+
libs.update(mbed_config.get("components"))
172177
libs.update(mbed_config.get("features"))
173178
libs.update(mbed_config.get("frameworks"))
174179

@@ -195,15 +200,20 @@ def process_global_lib(libname, mbed_config):
195200
env.get("CPPDEFINES", []))
196201

197202
if MBED_RTOS:
203+
if not libs.get("rtos"):
204+
print "Warning! This board doesn't support Mbed OS!"
198205
env.Append(CPPDEFINES=["MBED_CONF_RTOS_PRESENT"])
199-
process_global_lib("rtos", mbed_config)
206+
process_global_lib("rtos", libs)
200207

201208
MBED_EVENTS = "PIO_FRAMEWORK_MBED_EVENTS_PRESENT" in env.Flatten(
202209
env.get("CPPDEFINES", []))
203210

204211
if MBED_EVENTS:
205212
env.Append(CPPDEFINES=["MBED_CONF_EVENTS_PRESENT"])
206-
process_global_lib("events", mbed_config)
213+
process_global_lib("events", libs)
214+
215+
if "FEATURE_CRYPTOCELL310" in env.Flatten(env.get("CPPDEFINES", [])):
216+
process_global_lib("FEATURE_CRYPTOCELL310", libs)
207217

208218
core_src_files = mbed_config.get("core").get("s_sources") + mbed_config.get(
209219
"core").get("c_sources") + mbed_config.get("core").get("cpp_sources")
@@ -248,11 +258,10 @@ def process_global_lib(libname, mbed_config):
248258
#
249259

250260
for lib, lib_config in libs.items():
261+
if not lib_config:
262+
continue
251263
extra_includes = []
252264
env.Append(EXTRA_LIB_BUILDERS=[
253265
CustomLibBuilder(env, join(FRAMEWORK_DIR, lib_config.get("dir")),
254266
get_dynamic_manifest(lib, lib_config, extra_includes))
255267
])
256-
257-
if lib == "mbedtls":
258-
env.Append(LIB_DEPS=["mbed-mbedtls"])

0 commit comments

Comments
 (0)