Merge pull request #4172 from theotherjimmy/iar-no-linker-scirpt

Fail IAR exports without linker scirpts with NotSupportedException
pull/3066/merge
Anna Bridge 2017-04-20 16:27:58 +01:00 committed by GitHub
commit 8344adf48a
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ from tools.targets import TARGET_MAP
from tools.export.exporters import Exporter, TargetNotSupportedException from tools.export.exporters import Exporter, TargetNotSupportedException
import json import json
from tools.export.cmsis import DeviceCMSIS from tools.export.cmsis import DeviceCMSIS
from tools.utils import NotSupportedException
from multiprocessing import cpu_count from multiprocessing import cpu_count
class IAR(Exporter): class IAR(Exporter):
@ -100,6 +101,8 @@ class IAR(Exporter):
def generate(self): def generate(self):
"""Generate the .eww, .ewd, and .ewp files""" """Generate the .eww, .ewd, and .ewp files"""
if not self.resources.linker_script:
raise NotSupportedException("No linker script found.")
srcs = self.resources.headers + self.resources.s_sources + \ srcs = self.resources.headers + self.resources.s_sources + \
self.resources.c_sources + self.resources.cpp_sources + \ self.resources.c_sources + self.resources.cpp_sources + \
self.resources.objects + self.resources.libraries self.resources.objects + self.resources.libraries