@@ -400,7 +400,7 @@ def transform_release_toolchains(target, version):
400
400
else :
401
401
return target .supported_toolchains
402
402
403
- def get_mbed_official_release (version ):
403
+ def get_mbed_official_release (version , profile = None ):
404
404
""" Given a release version string, return a tuple that contains a target
405
405
and the supported toolchains for that release.
406
406
Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')),
@@ -411,26 +411,26 @@ def get_mbed_official_release(version):
411
411
RELEASE_VERSIONS
412
412
"""
413
413
414
+ # we ignore version for Mbed 6 as all targets in targets.json file are being supported
415
+ # if someone passes 2, we return empty tuple, if 5, we keep the behavior the same as
416
+ # release version is deprecated and all targets are being supported that are present
417
+ # in targets.json file
418
+
419
+ if version == '2' :
420
+ return tuple (tuple ([]))
421
+
414
422
mbed_official_release = (
415
423
tuple (
416
424
tuple (
417
425
[
418
426
TARGET_MAP [target ].name ,
419
- tuple (transform_release_toolchains (
420
- TARGET_MAP [target ], version ))
427
+ tuple (['ARM' , 'GCC_ARM' ])
421
428
]
422
429
) for target in TARGET_NAMES \
423
- if (hasattr (TARGET_MAP [target ], 'release_versions' )
424
- and version in TARGET_MAP [target ].release_versions )
430
+ if not profile or profile in TARGET_MAP [target ].supported_application_profiles
425
431
)
426
432
)
427
433
428
- for target in mbed_official_release :
429
- is_official , reason = is_official_target (target [0 ], version )
430
-
431
- if not is_official :
432
- raise InvalidReleaseTargetException (reason )
433
-
434
434
return mbed_official_release
435
435
436
436
def target_supports_toolchain (target , toolchain_name ):
0 commit comments