Skip to content

Commit dc86413

Browse files
committed
IAR export will not fail in the absence of a CMSIS pack
1 parent c8c01f0 commit dc86413

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tools/export/iar/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class IAR(Exporter):
2929
#iar_definitions.json
3030
TARGETS = [target for target, obj in TARGET_MAP.iteritems()
3131
if hasattr(obj, 'device_name') and
32-
obj.device_name in IAR_DEFS.keys() and "IAR" in obj.supported_toolchains
33-
and DeviceCMSIS.check_supported(target)]
32+
obj.device_name in IAR_DEFS.keys() and "IAR" in obj.supported_toolchains]
3433

3534
SPECIAL_TEMPLATES = {
3635
'rz_a1h' : 'iar/iar_rz_a1h.ewp.tmpl',
@@ -106,14 +105,20 @@ def generate(self):
106105
#Optimizations
107106
if '-Oh' in flags['c_flags']:
108107
flags['c_flags'].remove('-Oh')
108+
109+
try:
110+
debugger = DeviceCMSIS(self.target).debug.replace('-','').upper()
111+
except:
112+
debugger = "CMSISDAP"
113+
109114
ctx = {
110115
'name': self.project_name,
111116
'groups': self.iar_groups(self.format_src(srcs)),
112117
'linker_script': self.format_file(self.resources.linker_script),
113118
'include_paths': [self.format_file(src) for src in self.resources.inc_dirs],
114119
'device': self.iar_device(),
115120
'ewp': sep+self.project_name + ".ewp",
116-
'debugger': DeviceCMSIS(self.target).debug.replace('-','').upper()
121+
'debugger': debugger
117122
}
118123
ctx.update(flags)
119124

0 commit comments

Comments
 (0)