@@ -191,8 +191,8 @@ def is_official_target(target_name, version):
191
191
if hasattr (target , 'release_versions' ) \
192
192
and version in target .release_versions :
193
193
if version == '2' :
194
- # For version 2, either ARM or uARM toolchain support is required
195
- required_toolchains = set (['ARM' , 'uARM' ])
194
+ # For version 2, one of the ARM toolchains(ARM, ARMC6, ARMC5 or uARM) support is required
195
+ required_toolchains = set (['ARM' , 'ARMC5' , 'ARMC6' , ' uARM' ])
196
196
197
197
if not len (required_toolchains .intersection (
198
198
set (target .supported_toolchains ))) > 0 :
@@ -251,20 +251,28 @@ def is_official_target(target_name, version):
251
251
252
252
return result , reason
253
253
254
- def transform_release_toolchains (toolchains , version ):
255
- """ Given a list of toolchains and a release version , return a list of
254
+ def transform_release_toolchains (target , version ):
255
+ """ Given a release version and target , return a list of
256
256
only the supported toolchains for that release
257
257
258
258
Positional arguments:
259
259
toolchains - The list of toolchains
260
260
version - The release version string. Should be a string contained within
261
261
RELEASE_VERSIONS
262
262
"""
263
- if version == '5' :
264
- return ['ARM' , 'GCC_ARM' , 'IAR' ]
263
+ if int (target .build_tools_metadata ["version" ]) > 0 :
264
+ if version == '5' :
265
+ if 'ARMC5' in target .supported_toolchains :
266
+ return ['ARMC5' , 'GCC_ARM' , 'IAR' ]
267
+ else :
268
+ return ['ARM' , 'ARMC6' , 'GCC_ARM' , 'IAR' ]
269
+ else :
270
+ return target .supported_toolchains
265
271
else :
266
- return toolchains
267
-
272
+ if version == '5' :
273
+ return ['ARM' , 'GCC_ARM' , 'IAR' ]
274
+ else :
275
+ return target .supported_toolchains
268
276
269
277
def get_mbed_official_release (version ):
270
278
""" Given a release version string, return a tuple that contains a target
@@ -283,7 +291,7 @@ def get_mbed_official_release(version):
283
291
[
284
292
TARGET_MAP [target ].name ,
285
293
tuple (transform_release_toolchains (
286
- TARGET_MAP [target ]. supported_toolchains , version ))
294
+ TARGET_MAP [target ], version ))
287
295
]
288
296
) for target in TARGET_NAMES \
289
297
if (hasattr (TARGET_MAP [target ], 'release_versions' )
@@ -1241,6 +1249,11 @@ def mcu_toolchain_matrix(verbose_html=False, platform_filter=None,
1241
1249
1242
1250
unique_supported_toolchains = get_unique_supported_toolchains (
1243
1251
release_targets )
1252
+ #Add ARMC5 column as well to the matrix to help with showing which targets are in ARMC5
1253
+ #ARMC5 is not a toolchain class but yet we use that as a toolchain id in supported_toolchains in targets.json
1254
+ #capture that info in a separate column
1255
+ unique_supported_toolchains .append ('ARMC5' )
1256
+
1244
1257
prepend_columns = ["Target" ] + ["mbed OS %s" % x for x in RELEASE_VERSIONS ]
1245
1258
1246
1259
# All tests status table print
@@ -1283,8 +1296,7 @@ def mcu_toolchain_matrix(verbose_html=False, platform_filter=None,
1283
1296
(unique_toolchain == "ARMC6" and
1284
1297
"ARM" in tgt_obj .supported_toolchains ) or
1285
1298
(unique_toolchain == "ARM" and
1286
- "ARMC6" in tgt_obj .supported_toolchains and
1287
- CORE_ARCH [tgt_obj .core ] == 8 )):
1299
+ "ARMC6" in tgt_obj .supported_toolchains )):
1288
1300
text = "Supported"
1289
1301
perm_counter += 1
1290
1302
else :
0 commit comments