@@ -31,7 +31,8 @@ def print_stuff(name, lst):
31
31
SUPPORTED_TOOLCHAINS = ["ARM" , "IAR" , "GCC_ARM" ]
32
32
33
33
34
- def target_cross_toolchain (required_features , allowed_toolchains ):
34
+ def target_cross_toolchain (allowed_toolchains ,
35
+ features = [], targets = TARGET_MAP .keys ()):
35
36
"""Generate pairs of target and toolchains
36
37
37
38
Args:
@@ -42,8 +43,9 @@ def target_cross_toolchain(required_features, allowed_toolchains):
42
43
for target , toolchains in get_mbed_official_release ("5" ):
43
44
for toolchain in toolchains :
44
45
if (toolchain in allowed_toolchains and
46
+ target in targets and
45
47
all (feature in TARGET_MAP [target ].features
46
- for feature in required_features )):
48
+ for feature in features )):
47
49
yield target , toolchain
48
50
49
51
@@ -59,11 +61,11 @@ def main():
59
61
60
62
failures = []
61
63
sucesses = []
62
- for example , build_features in EXAMPLES .iteritems ():
64
+ for example , requirements in EXAMPLES .iteritems ():
63
65
subprocess .call (["mbed-cli" , "import" , example ])
64
66
os .chdir (basename (example ))
65
- for target , toolchain in target_cross_toolchain (build_features ,
66
- args . toolchains ):
67
+ for target , toolchain in target_cross_toolchain (args . toolchains ,
68
+ ** requirements ):
67
69
proc = subprocess .Popen (["mbed-cli" , "compile" , "-t" ,
68
70
toolchain , "-m" , target ])
69
71
proc .wait ()
0 commit comments