Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -313,7 +317,9 @@
]
},
"c_lib": "small",
"supported_application_profiles": ["bare-metal"],
"supported_application_profiles": [
"bare-metal"
],
"device_name": "LPC1114FN28/102",
"detect_code": [
"1114"
Expand Down Expand Up @@ -4745,6 +4751,7 @@
"inherits": [
"Target"
],
"public": false,
"core": "Cortex-A9",
"supported_toolchains": [
"ARM",
Expand Down Expand Up @@ -7496,4 +7503,4 @@
"version": "1",
"public": false
}
}
}
22 changes: 11 additions & 11 deletions tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand All @@ -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 = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure the syntax is correct here. Can you run the script with your changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was checking what CI expected and seems to be as it is here. will study CI results once we get some, if all is being tested as it should

tuple(
tuple(
[
TARGET_MAP[target].name,
tuple(transform_release_toolchains(
TARGET_MAP[target], version))
tuple(['ARM', 'GCC_ARM'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wonder why do we use hard-coded tuple here? instead of calling the function? and IAR been dropped?
We can fix the function if need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid refactoring at the moment (so changes just to one function to get the functionality needed). transform_release_toolchains does not have much meaning anymore as only ARM or GCC ARM is supported, so this can be hardcoded here

]
) 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):
Expand Down