mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12982 from 0xc0170/fix_release_version
build api: fix release versionpull/12996/head
commit
f478a21de2
|
@ -32,6 +32,10 @@
|
|||
"std"
|
||||
]
|
||||
},
|
||||
"supported_application_profiles": [
|
||||
"rtos",
|
||||
"bare-metal"
|
||||
],
|
||||
"config": {
|
||||
"console-uart": {
|
||||
"help": "Target has UART console on pins STDIO_UART_TX, STDIO_UART_RX. Value is only significant if target has SERIAL device.",
|
||||
|
@ -313,7 +317,9 @@
|
|||
]
|
||||
},
|
||||
"c_lib": "small",
|
||||
"supported_application_profiles": ["bare-metal"],
|
||||
"supported_application_profiles": [
|
||||
"bare-metal"
|
||||
],
|
||||
"device_name": "LPC1114FN28/102",
|
||||
"detect_code": [
|
||||
"1114"
|
||||
|
@ -4745,6 +4751,7 @@
|
|||
"inherits": [
|
||||
"Target"
|
||||
],
|
||||
"public": false,
|
||||
"core": "Cortex-A9",
|
||||
"supported_toolchains": [
|
||||
"ARM",
|
||||
|
@ -7496,4 +7503,4 @@
|
|||
"version": "1",
|
||||
"public": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ def transform_release_toolchains(target, version):
|
|||
else:
|
||||
return target.supported_toolchains
|
||||
|
||||
def get_mbed_official_release(version):
|
||||
def get_mbed_official_release(version, profile=None):
|
||||
""" Given a release version string, return a tuple that contains a target
|
||||
and the supported toolchains for that release.
|
||||
Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')),
|
||||
|
@ -411,26 +411,26 @@ def get_mbed_official_release(version):
|
|||
RELEASE_VERSIONS
|
||||
"""
|
||||
|
||||
# we ignore version for Mbed 6 as all targets in targets.json file are being supported
|
||||
# if someone passes 2, we return empty tuple, if 5, we keep the behavior the same as
|
||||
# release version is deprecated and all targets are being supported that are present
|
||||
# in targets.json file
|
||||
|
||||
if version == '2':
|
||||
return tuple(tuple([]))
|
||||
|
||||
mbed_official_release = (
|
||||
tuple(
|
||||
tuple(
|
||||
[
|
||||
TARGET_MAP[target].name,
|
||||
tuple(transform_release_toolchains(
|
||||
TARGET_MAP[target], version))
|
||||
tuple(['ARM', 'GCC_ARM'])
|
||||
]
|
||||
) for target in TARGET_NAMES \
|
||||
if (hasattr(TARGET_MAP[target], 'release_versions')
|
||||
and version in TARGET_MAP[target].release_versions)
|
||||
if not profile or profile in TARGET_MAP[target].supported_application_profiles
|
||||
)
|
||||
)
|
||||
|
||||
for target in mbed_official_release:
|
||||
is_official, reason = is_official_target(target[0], version)
|
||||
|
||||
if not is_official:
|
||||
raise InvalidReleaseTargetException(reason)
|
||||
|
||||
return mbed_official_release
|
||||
|
||||
def target_supports_toolchain(target, toolchain_name):
|
||||
|
|
Loading…
Reference in New Issue