Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: export/iar/__init__.py
- Revision:
- 36:96847d42f010
- Parent:
- 35:da9c89f8be7d
- Child:
- 38:399953da035d
diff -r da9c89f8be7d -r 96847d42f010 export/iar/__init__.py
--- a/export/iar/__init__.py Wed Feb 15 13:53:18 2017 -0600
+++ b/export/iar/__init__.py Thu Jun 22 11:12:28 2017 -0500
@@ -10,6 +10,7 @@
from tools.export.exporters import Exporter, TargetNotSupportedException
import json
from tools.export.cmsis import DeviceCMSIS
+from tools.utils import NotSupportedException
from multiprocessing import cpu_count
class IAR(Exporter):
@@ -18,8 +19,7 @@
#iar_definitions.json location
def_loc = os.path.join(
- os.path.dirname(os.path.abspath(__file__)), '..', '..', '..',
- 'tools','export', 'iar', 'iar_definitions.json')
+ os.path.dirname(os.path.abspath(__file__)), 'iar_definitions.json')
#create a dictionary of the definitions
with open(def_loc, 'r') as f:
@@ -78,6 +78,9 @@
"FPU2": 0,
"NrRegs": 0,
"NEON": '',
+ "CExtraOptionsCheck": 0,
+ "CExtraOptions": "",
+ "CMSISDAPJtagSpeedList": 0,
}
iar_defaults.update(device_info)
@@ -97,6 +100,8 @@
def generate(self):
"""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 + \
self.resources.c_sources + self.resources.cpp_sources + \
self.resources.objects + self.resources.libraries
@@ -108,7 +113,7 @@
template = ["--vla", "--no_static_destruction"]
# Flag invalid if set in template
# Optimizations are also set in template
- invalid_flag = lambda x: x in template or re.match("-O(\d|time|n)", x)
+ invalid_flag = lambda x: x in template or re.match("-O(\d|time|n|hz?)", x)
flags['c_flags'] = [flag for flag in c_flags if not invalid_flag(flag)]
try:
