mirror of https://github.com/ARMmbed/mbed-os.git
IAR export will not fail in the absence of a CMSIS pack
parent
c8c01f0c5c
commit
dc864132ab
|
@ -29,8 +29,7 @@ class IAR(Exporter):
|
||||||
#iar_definitions.json
|
#iar_definitions.json
|
||||||
TARGETS = [target for target, obj in TARGET_MAP.iteritems()
|
TARGETS = [target for target, obj in TARGET_MAP.iteritems()
|
||||||
if hasattr(obj, 'device_name') and
|
if hasattr(obj, 'device_name') and
|
||||||
obj.device_name in IAR_DEFS.keys() and "IAR" in obj.supported_toolchains
|
obj.device_name in IAR_DEFS.keys() and "IAR" in obj.supported_toolchains]
|
||||||
and DeviceCMSIS.check_supported(target)]
|
|
||||||
|
|
||||||
SPECIAL_TEMPLATES = {
|
SPECIAL_TEMPLATES = {
|
||||||
'rz_a1h' : 'iar/iar_rz_a1h.ewp.tmpl',
|
'rz_a1h' : 'iar/iar_rz_a1h.ewp.tmpl',
|
||||||
|
@ -106,6 +105,12 @@ class IAR(Exporter):
|
||||||
#Optimizations
|
#Optimizations
|
||||||
if '-Oh' in flags['c_flags']:
|
if '-Oh' in flags['c_flags']:
|
||||||
flags['c_flags'].remove('-Oh')
|
flags['c_flags'].remove('-Oh')
|
||||||
|
|
||||||
|
try:
|
||||||
|
debugger = DeviceCMSIS(self.target).debug.replace('-','').upper()
|
||||||
|
except:
|
||||||
|
debugger = "CMSISDAP"
|
||||||
|
|
||||||
ctx = {
|
ctx = {
|
||||||
'name': self.project_name,
|
'name': self.project_name,
|
||||||
'groups': self.iar_groups(self.format_src(srcs)),
|
'groups': self.iar_groups(self.format_src(srcs)),
|
||||||
|
@ -113,7 +118,7 @@ class IAR(Exporter):
|
||||||
'include_paths': [self.format_file(src) for src in self.resources.inc_dirs],
|
'include_paths': [self.format_file(src) for src in self.resources.inc_dirs],
|
||||||
'device': self.iar_device(),
|
'device': self.iar_device(),
|
||||||
'ewp': sep+self.project_name + ".ewp",
|
'ewp': sep+self.project_name + ".ewp",
|
||||||
'debugger': DeviceCMSIS(self.target).debug.replace('-','').upper()
|
'debugger': debugger
|
||||||
}
|
}
|
||||||
ctx.update(flags)
|
ctx.update(flags)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue