Check for support in ARMC6

pull/4949/head
Jimmy Brisson 2017-08-31 09:56:07 -05:00
parent d72f6dbfe4
commit 887d29372b
1 changed files with 4 additions and 1 deletions

View File

@ -22,7 +22,7 @@ from tempfile import mkstemp
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
from tools.hooks import hook_tool
from tools.utils import mkdir
from tools.utils import mkdir, NotSupportedException
class ARM(mbedToolchain):
LINKER_EXT = '.sct'
@ -276,6 +276,9 @@ class ARMC6(ARM_STD):
def __init__(self, target, *args, **kwargs):
mbedToolchain.__init__(self, target, *args, **kwargs)
if "ARM" not in target.supported_toolchains:
raise NotSupportedException("ARM compiler support is required for ARMC6 support")
if target.core.lower().endswith("fd"):
self.flags['common'].append("-mcpu=%s" % target.core.lower()[:-2])
self.flags['ld'].append("--cpu=%s" % target.core.lower()[:-2])