Skip to content

Commit

Permalink
Merge pull request ARMmbed#9994 from theotherjimmy/fix-iar-dfpu
Browse files Browse the repository at this point in the history
Correct FPU settings traceback found by IAR
  • Loading branch information
0xc0170 committed Mar 14, 2019
2 parents 79c7fc8 + 35479e8 commit 4c7fc65
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/export/cmsis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class DeviceCMSIS():
Encapsulates target information retrieved by arm-pack-manager"""

# TODO: This class uses the TARGET_MAP. Usage of the target map may
# not work in the online compiler or may work but give the incorrect
# information.
CACHE = Cache(True, False)
def __init__(self, target):
target_info = self.check_supported(target)
Expand All @@ -44,10 +47,14 @@ def __init__(self, target):
)
self.dname = target_info["name"]
self.core = target_info["_core"]
self.dfpu = None
try:
self.dfpu = target_info['processor']['Symmetric']['fpu']
except KeyError:
self.dfpu = target_info['processor']['Asymmetric']['fpu']
cmsis_core = self.core.replace("F", "").replace("-", "")
for proc in target_info['processor']['Asymmetric'].values():
if proc['core'] == cmsis_core:
self.dfpu = proc['fpu']
self.debug, self.dvendor = self.vendor_debug(
target_info.get('vendor') or target_info['from_pack']['vendor']
)
Expand Down

0 comments on commit 4c7fc65

Please sign in to comment.