From 2ce7eab989e75f81f1828d69e955f21e1092df5f Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Fri, 5 Feb 2016 00:59:00 -0600 Subject: [PATCH 1/2] add mbed os defines to mbed targets --- workspace_tools/targets.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 1416de0320..3204bcaba6 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -16,16 +16,16 @@ limitations under the License. """ CORE_LABELS = { - "ARM7TDMI-S": ["ARM7"], - "Cortex-M0" : ["M0", "CORTEX_M"], - "Cortex-M0+": ["M0P", "CORTEX_M"], - "Cortex-M1" : ["M1", "CORTEX_M"], - "Cortex-M3" : ["M3", "CORTEX_M"], - "Cortex-M4" : ["M4", "CORTEX_M", "RTOS_M4_M7"], - "Cortex-M4F" : ["M4", "CORTEX_M", "RTOS_M4_M7"], - "Cortex-M7" : ["M7", "CORTEX_M", "RTOS_M4_M7"], - "Cortex-M7F" : ["M7", "CORTEX_M", "RTOS_M4_M7"], - "Cortex-A9" : ["A9", "CORTEX_A"] + "ARM7TDMI-S": ["ARM7", "TARGET_LIKE_CORTEX_ARM7"], + "Cortex-M0" : ["M0", "CORTEX_M", "TARGET_LIKE_CORTEX_M0"], + "Cortex-M0+": ["M0P", "CORTEX_M", "TARGET_LIKE_CORTEX_M0"], + "Cortex-M1" : ["M1", "CORTEX_M", "TARGET_LIKE_CORTEX_M1"], + "Cortex-M3" : ["M3", "CORTEX_M", "TARGET_LIKE_CORTEX_M3"], + "Cortex-M4" : ["M4", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M4"], + "Cortex-M4F" : ["M4", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M4"], + "Cortex-M7" : ["M7", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M7"], + "Cortex-M7F" : ["M7", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M7"], + "Cortex-A9" : ["A9", "CORTEX_A", "TARGET_LIKE_CORTEX_A9"] } import os From 715fca0178fd8b7797241a4ab0ec8e92c3b069bc Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Fri, 5 Feb 2016 01:19:48 -0600 Subject: [PATCH 2/2] add extra mbed identifier. correct duplicate target --- workspace_tools/targets.py | 22 +++++++++++----------- workspace_tools/toolchains/__init__.py | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 3204bcaba6..75d412317c 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -1,6 +1,6 @@ """ mbed SDK -Copyright (c) 2011-2015 ARM Limited +Copyright (c) 2011-2016 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,16 +16,16 @@ limitations under the License. """ CORE_LABELS = { - "ARM7TDMI-S": ["ARM7", "TARGET_LIKE_CORTEX_ARM7"], - "Cortex-M0" : ["M0", "CORTEX_M", "TARGET_LIKE_CORTEX_M0"], - "Cortex-M0+": ["M0P", "CORTEX_M", "TARGET_LIKE_CORTEX_M0"], - "Cortex-M1" : ["M1", "CORTEX_M", "TARGET_LIKE_CORTEX_M1"], - "Cortex-M3" : ["M3", "CORTEX_M", "TARGET_LIKE_CORTEX_M3"], - "Cortex-M4" : ["M4", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M4"], - "Cortex-M4F" : ["M4", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M4"], - "Cortex-M7" : ["M7", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M7"], - "Cortex-M7F" : ["M7", "CORTEX_M", "RTOS_M4_M7", "TARGET_LIKE_CORTEX_M7"], - "Cortex-A9" : ["A9", "CORTEX_A", "TARGET_LIKE_CORTEX_A9"] + "ARM7TDMI-S": ["ARM7", "LIKE_CORTEX_ARM7"], + "Cortex-M0" : ["M0", "CORTEX_M", "LIKE_CORTEX_M0"], + "Cortex-M0+": ["M0P", "CORTEX_M", "LIKE_CORTEX_M0"], + "Cortex-M1" : ["M1", "CORTEX_M", "LIKE_CORTEX_M1"], + "Cortex-M3" : ["M3", "CORTEX_M", "LIKE_CORTEX_M3"], + "Cortex-M4" : ["M4", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M4"], + "Cortex-M4F" : ["M4", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M4"], + "Cortex-M7" : ["M7", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M7"], + "Cortex-M7F" : ["M7", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M7"], + "Cortex-A9" : ["A9", "CORTEX_A", "LIKE_CORTEX_A9"] } import os diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index 6e9e8c53b8..e8156bbe70 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -292,7 +292,7 @@ class mbedToolchain: self.symbols.extend(mbedToolchain.CORTEX_SYMBOLS[self.target.core]) # Symbols defined by the on-line build.system - self.symbols.extend(['MBED_BUILD_TIMESTAMP=%s' % self.timestamp, '__MBED__=1']) + self.symbols.extend(['MBED_BUILD_TIMESTAMP=%s' % self.timestamp, 'TARGET_LIKE_MBED', '__MBED__=1']) if MBED_ORG_USER: self.symbols.append('MBED_USERNAME=' + MBED_ORG_USER)