Skip to content

Commit 54e1e55

Browse files
theotherjimmyadbridge
authored andcommitted
Fail IAR exports without linker scirpts with NotSupportedException
1 parent ad8faab commit 54e1e55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/export/iar/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from tools.export.exporters import Exporter, TargetNotSupportedException
1111
import json
1212
from tools.export.cmsis import DeviceCMSIS
13+
from tools.utils import NotSupportedException
1314
from multiprocessing import cpu_count
1415

1516
class IAR(Exporter):
@@ -100,6 +101,8 @@ def format_src(self, srcs):
100101

101102
def generate(self):
102103
"""Generate the .eww, .ewd, and .ewp files"""
104+
if not self.resources.linker_script:
105+
raise NotSupportedException("No linker script found.")
103106
srcs = self.resources.headers + self.resources.s_sources + \
104107
self.resources.c_sources + self.resources.cpp_sources + \
105108
self.resources.objects + self.resources.libraries

0 commit comments

Comments
 (0)