From b43fc0cf1a3d76df8d91d6a23eff37e35062d59e Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 10:23:20 +0100 Subject: [PATCH 1/9] build: target toolchain return Revert back to the toolchain function. Although it should be refactored (return just list of toolchains from a target). --- tools/build_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build_api.py b/tools/build_api.py index 20ec02f4c4..52f39cec48 100755 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -424,7 +424,8 @@ def get_mbed_official_release(version, profile=None): tuple( [ TARGET_MAP[target].name, - tuple(['ARM', 'GCC_ARM']) + tuple(transform_release_toolchains( +- TARGET_MAP[target], version)) ] ) for target in TARGET_NAMES \ if not profile or profile in TARGET_MAP[target].supported_application_profiles From dd6ed6c968ba897c040e38c97449f95669355f49 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 10:26:48 +0100 Subject: [PATCH 2/9] Revert "targets: enable baremetal by default" This reverts commit 9b4cddd16a31d153ad4e2e0275233a05c095b0a0. Not all targets can be enabled, will need more work. --- targets/targets.json | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/targets/targets.json b/targets/targets.json index 6dba5b75b2..fb9cdab44b 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -33,8 +33,7 @@ ] }, "supported_application_profiles": [ - "rtos", - "bare-metal" + "rtos" ], "config": { "console-uart": { @@ -317,9 +316,12 @@ ] }, "c_lib": "small", - "supported_application_profiles": [ + "supported_application_profiles_add": [ "bare-metal" ], + "supported_application_profiles_remove": [ + "rtos" + ], "device_name": "LPC1114FN28/102", "detect_code": [ "1114" @@ -1231,9 +1233,12 @@ ], "public": false, "c_lib": "small", - "supported_application_profiles": [ + "supported_application_profiles_add": [ "bare-metal" ], + "supported_application_profiles_remove": [ + "rtos" + ], "overrides": { "boot-stack-size": "0x400" } @@ -5921,9 +5926,12 @@ ] }, "c_lib": "small", - "supported_application_profiles": [ + "supported_application_profiles_add": [ "bare-metal" ], + "supported_application_profiles_remove": [ + "rtos" + ], "sectors": [ [ 0, @@ -6029,9 +6037,12 @@ ] }, "c_lib": "small", - "supported_application_profiles": [ + "supported_application_profiles_add": [ "bare-metal" ], + "supported_application_profiles_remove": [ + "rtos" + ], "device_name": "NANO130KE3BN", "overrides": { "deep-sleep-latency": 1, From 6ca3c4294265b75848ee5184e9bd878f8d978219 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 10:34:19 +0100 Subject: [PATCH 3/9] targets: profiles remove/add not functional, replace it It might be a bug as it should work. --- targets/targets.json | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/targets/targets.json b/targets/targets.json index fb9cdab44b..6769d7f973 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -316,12 +316,9 @@ ] }, "c_lib": "small", - "supported_application_profiles_add": [ + "supported_application_profiles": [ "bare-metal" ], - "supported_application_profiles_remove": [ - "rtos" - ], "device_name": "LPC1114FN28/102", "detect_code": [ "1114" @@ -1233,12 +1230,9 @@ ], "public": false, "c_lib": "small", - "supported_application_profiles_add": [ + "supported_application_profiles": [ "bare-metal" ], - "supported_application_profiles_remove": [ - "rtos" - ], "overrides": { "boot-stack-size": "0x400" } @@ -5926,12 +5920,9 @@ ] }, "c_lib": "small", - "supported_application_profiles_add": [ + "supported_application_profiles": [ "bare-metal" ], - "supported_application_profiles_remove": [ - "rtos" - ], "sectors": [ [ 0, @@ -6037,12 +6028,9 @@ ] }, "c_lib": "small", - "supported_application_profiles_add": [ + "supported_application_profiles": [ "bare-metal" ], - "supported_application_profiles_remove": [ - "rtos" - ], "device_name": "NANO130KE3BN", "overrides": { "deep-sleep-latency": 1, From ada878122cb14bf641316e2393f1de5287bf7ee1 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 10:37:13 +0100 Subject: [PATCH 4/9] targets: fix indent --- targets/targets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/targets.json b/targets/targets.json index 6769d7f973..3ba0dac742 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -34,7 +34,7 @@ }, "supported_application_profiles": [ "rtos" - ], + ], "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.", From 3847373660d0cee49404fe8e5e7fb644581400cb Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 10:45:43 +0100 Subject: [PATCH 5/9] targets: add baremetal to some known tested targets --- targets/targets.json | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/targets/targets.json b/targets/targets.json index 3ba0dac742..0e10b4628a 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -829,7 +829,10 @@ "iar": [ "std" ] - } + }, + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "SDT64B": { "inherits": [ @@ -1496,7 +1499,10 @@ "MPU" ], "bootloader_supported": true, - "device_name": "STM32F303RE" + "device_name": "STM32F303RE", + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "NUCLEO_F303ZE": { "inherits": [ @@ -1647,7 +1653,10 @@ "MPU" ], "device_name": "STM32F411RE", - "bootloader_supported": true + "bootloader_supported": true, + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "MTS_DRAGONFLY_F411RE": { "inherits": [ @@ -1999,7 +2008,10 @@ "bootloader_supported": true, "overrides": { "network-default-interface-type": "ETHERNET" - } + }, + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "DISCO_F429ZI": { "inherits": [ @@ -3473,7 +3485,10 @@ "BLE" ], "device_name": "STM32L475VG", - "bootloader_supported": true + "bootloader_supported": true, + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "NUCLEO_L476RG": { "inherits": [ @@ -5715,7 +5730,10 @@ "help": "Enable inclusion of objects_extensions.h", "value": false } - } + }, + "supported_application_profiles": [ + "rtos", "bare-metal" + ] }, "ARDUINO_NANO33BLE": { "inherits": [ From 5a9ad74818d4828fab6a25e22d650b92818d57b2 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 11:14:18 +0100 Subject: [PATCH 6/9] targets: add version 6 to the toolchain --- tools/build_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build_api.py b/tools/build_api.py index 52f39cec48..48cec7e333 100755 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -385,7 +385,7 @@ def transform_release_toolchains(target, version): RELEASE_VERSIONS """ if int(target.build_tools_metadata["version"]) > 0: - if version == '5': + if version in ['5', '6']: toolchains = copy(target.supported_toolchains) if "ARM" in toolchains: @@ -395,7 +395,7 @@ def transform_release_toolchains(target, version): return toolchains return target.supported_toolchains else: - if version == '5': + if version in ['5', '6']: return ['ARM', 'GCC_ARM', 'IAR'] else: return target.supported_toolchains From 12cadc2e91d2da2330432a3c6c55e5aea3ddd97e Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 12:43:24 +0100 Subject: [PATCH 7/9] tools build: remove git diff typo --- tools/build_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_api.py b/tools/build_api.py index 48cec7e333..16c621131e 100755 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -425,7 +425,7 @@ def get_mbed_official_release(version, profile=None): [ TARGET_MAP[target].name, tuple(transform_release_toolchains( -- TARGET_MAP[target], version)) + TARGET_MAP[target], version)) ] ) for target in TARGET_NAMES \ if not profile or profile in TARGET_MAP[target].supported_application_profiles From bcfa1f97e0b428a95f9b2f3ac971bf5bdd3fc8e1 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 12:59:55 +0100 Subject: [PATCH 8/9] tools build: add 6 to the version check --- tools/build_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build_api.py b/tools/build_api.py index 16c621131e..6e8e1bd15b 100755 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -51,7 +51,7 @@ from .toolchains.arm import UARM_TOOLCHAIN_WARNING from .toolchains.mbed_toolchain import should_replace_small_c_lib from .config import Config -RELEASE_VERSIONS = ['2', '5'] +RELEASE_VERSIONS = ['2', '5', '6'] def prep_report(report, target_name, toolchain_name, id_name): """Setup report keys @@ -328,7 +328,7 @@ def is_official_target(target_name, version): ("following toolchains: %s" % ", ".join(target.supported_toolchains)) - elif version == '5': + elif version in ['5', '6']: # For version 5, ARM, GCC_ARM, and IAR toolchain support is required required_toolchains = [ set(['ARM', 'GCC_ARM']), From 1088fa06274aae0740a4ca76c688f40d3ac3feb8 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Tue, 19 May 2020 14:28:26 +0100 Subject: [PATCH 9/9] build tools: remove version 6 --- tools/build_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/build_api.py b/tools/build_api.py index 6e8e1bd15b..5153567c33 100755 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -51,7 +51,7 @@ from .toolchains.arm import UARM_TOOLCHAIN_WARNING from .toolchains.mbed_toolchain import should_replace_small_c_lib from .config import Config -RELEASE_VERSIONS = ['2', '5', '6'] +RELEASE_VERSIONS = ['2', '5'] def prep_report(report, target_name, toolchain_name, id_name): """Setup report keys @@ -328,7 +328,7 @@ def is_official_target(target_name, version): ("following toolchains: %s" % ", ".join(target.supported_toolchains)) - elif version in ['5', '6']: + elif version == '5': # For version 5, ARM, GCC_ARM, and IAR toolchain support is required required_toolchains = [ set(['ARM', 'GCC_ARM']), @@ -385,7 +385,7 @@ def transform_release_toolchains(target, version): RELEASE_VERSIONS """ if int(target.build_tools_metadata["version"]) > 0: - if version in ['5', '6']: + if version == '5': toolchains = copy(target.supported_toolchains) if "ARM" in toolchains: @@ -395,7 +395,7 @@ def transform_release_toolchains(target, version): return toolchains return target.supported_toolchains else: - if version in ['5', '6']: + if version == '5': return ['ARM', 'GCC_ARM', 'IAR'] else: return target.supported_toolchains