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"
|
"std"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"supported_application_profiles": [
|
||||||
|
"rtos",
|
||||||
|
"bare-metal"
|
||||||
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"console-uart": {
|
"console-uart": {
|
||||||
"help": "Target has UART console on pins STDIO_UART_TX, STDIO_UART_RX. Value is only significant if target has SERIAL device.",
|
"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",
|
"c_lib": "small",
|
||||||
"supported_application_profiles": ["bare-metal"],
|
"supported_application_profiles": [
|
||||||
|
"bare-metal"
|
||||||
|
],
|
||||||
"device_name": "LPC1114FN28/102",
|
"device_name": "LPC1114FN28/102",
|
||||||
"detect_code": [
|
"detect_code": [
|
||||||
"1114"
|
"1114"
|
||||||
|
@ -4745,6 +4751,7 @@
|
||||||
"inherits": [
|
"inherits": [
|
||||||
"Target"
|
"Target"
|
||||||
],
|
],
|
||||||
|
"public": false,
|
||||||
"core": "Cortex-A9",
|
"core": "Cortex-A9",
|
||||||
"supported_toolchains": [
|
"supported_toolchains": [
|
||||||
"ARM",
|
"ARM",
|
||||||
|
|
|
@ -400,7 +400,7 @@ def transform_release_toolchains(target, version):
|
||||||
else:
|
else:
|
||||||
return target.supported_toolchains
|
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
|
""" Given a release version string, return a tuple that contains a target
|
||||||
and the supported toolchains for that release.
|
and the supported toolchains for that release.
|
||||||
Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')),
|
Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')),
|
||||||
|
@ -411,26 +411,26 @@ def get_mbed_official_release(version):
|
||||||
RELEASE_VERSIONS
|
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 = (
|
mbed_official_release = (
|
||||||
tuple(
|
tuple(
|
||||||
tuple(
|
tuple(
|
||||||
[
|
[
|
||||||
TARGET_MAP[target].name,
|
TARGET_MAP[target].name,
|
||||||
tuple(transform_release_toolchains(
|
tuple(['ARM', 'GCC_ARM'])
|
||||||
TARGET_MAP[target], version))
|
|
||||||
]
|
]
|
||||||
) for target in TARGET_NAMES \
|
) for target in TARGET_NAMES \
|
||||||
if (hasattr(TARGET_MAP[target], 'release_versions')
|
if not profile or profile in TARGET_MAP[target].supported_application_profiles
|
||||||
and version in TARGET_MAP[target].release_versions)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
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
|
return mbed_official_release
|
||||||
|
|
||||||
def target_supports_toolchain(target, toolchain_name):
|
def target_supports_toolchain(target, toolchain_name):
|
||||||
|
|
Loading…
Reference in New Issue