mirror of https://github.com/ARMmbed/mbed-os.git
Use mapping of core->arch ver. for tc picking
parent
c030c6a52b
commit
ae033da12f
|
@ -44,7 +44,7 @@ from .paths import (MBED_CMSIS_PATH, MBED_TARGETS_PATH, MBED_LIBRARIES,
|
||||||
BUILD_DIR)
|
BUILD_DIR)
|
||||||
from .resources import Resources, FileType, FileRef
|
from .resources import Resources, FileType, FileRef
|
||||||
from .notifier.mock import MockNotifier
|
from .notifier.mock import MockNotifier
|
||||||
from .targets import TARGET_NAMES, TARGET_MAP
|
from .targets import TARGET_NAMES, TARGET_MAP, CORE_ARCH
|
||||||
from .libraries import Library
|
from .libraries import Library
|
||||||
from .toolchains import TOOLCHAIN_CLASSES
|
from .toolchains import TOOLCHAIN_CLASSES
|
||||||
from .config import Config
|
from .config import Config
|
||||||
|
@ -316,9 +316,7 @@ def prepare_toolchain(src_paths, build_dir, target, toolchain_name,
|
||||||
raise NotSupportedException(
|
raise NotSupportedException(
|
||||||
"Target {} is not supported by toolchain {}".format(
|
"Target {} is not supported by toolchain {}".format(
|
||||||
target.name, toolchain_name))
|
target.name, toolchain_name))
|
||||||
if (toolchain_name == "ARM" and
|
if (toolchain_name == "ARM" and CORE_ARCH[target.core] == 8):
|
||||||
target.core in ("Cortex-M23", "Cortex-M23-NS",
|
|
||||||
"Cortex-M33", "Cortex-M33-NS")):
|
|
||||||
toolchain_name = "ARMC6"
|
toolchain_name = "ARMC6"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -30,7 +30,7 @@ from tools.paths import TOOLS_BOOTLOADERS
|
||||||
from tools.utils import json_file_to_dict
|
from tools.utils import json_file_to_dict
|
||||||
|
|
||||||
__all__ = ["target", "TARGETS", "TARGET_MAP", "TARGET_NAMES", "CORE_LABELS",
|
__all__ = ["target", "TARGETS", "TARGET_MAP", "TARGET_NAMES", "CORE_LABELS",
|
||||||
"HookError", "generate_py_target", "Target",
|
"CORE_ARCH", "HookError", "generate_py_target", "Target",
|
||||||
"CUMULATIVE_ATTRIBUTES", "get_resolution_order"]
|
"CUMULATIVE_ATTRIBUTES", "get_resolution_order"]
|
||||||
|
|
||||||
CORE_LABELS = {
|
CORE_LABELS = {
|
||||||
|
@ -50,6 +50,23 @@ CORE_LABELS = {
|
||||||
"Cortex-M33-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"]
|
"Cortex-M33-NS": ["M33", "M33_NS", "CORTEX_M", "LIKE_CORTEX_M33", "CORTEX"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CORE_ARCH = {
|
||||||
|
"Cortex-M0": 6,
|
||||||
|
"Cortex-M0+": 6,
|
||||||
|
"Cortex-M1": 6,
|
||||||
|
"Cortex-M3": 7,
|
||||||
|
"Cortex-M4": 7,
|
||||||
|
"Cortex-M4F": 7,
|
||||||
|
"Cortex-M7": 7,
|
||||||
|
"Cortex-M7F": 7,
|
||||||
|
"Cortex-M7FD": 7,
|
||||||
|
"Cortex-A9": 7,
|
||||||
|
"Cortex-M23": 8,
|
||||||
|
"Cortex-M23-NS": 8,
|
||||||
|
"Cortex-M33": 8,
|
||||||
|
"Cortex-M33-NS": 8,
|
||||||
|
}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Generic Target class that reads and interprets the data in targets.json
|
# Generic Target class that reads and interprets the data in targets.json
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue