Skip to content

Commit 4c7fc65

Browse files
authored
Merge pull request #9994 from theotherjimmy/fix-iar-dfpu
Correct FPU settings traceback found by IAR
2 parents 79c7fc8 + 35479e8 commit 4c7fc65

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/export/cmsis/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class DeviceCMSIS():
3131
3232
Encapsulates target information retrieved by arm-pack-manager"""
3333

34+
# TODO: This class uses the TARGET_MAP. Usage of the target map may
35+
# not work in the online compiler or may work but give the incorrect
36+
# information.
3437
CACHE = Cache(True, False)
3538
def __init__(self, target):
3639
target_info = self.check_supported(target)
@@ -44,10 +47,14 @@ def __init__(self, target):
4447
)
4548
self.dname = target_info["name"]
4649
self.core = target_info["_core"]
50+
self.dfpu = None
4751
try:
4852
self.dfpu = target_info['processor']['Symmetric']['fpu']
4953
except KeyError:
50-
self.dfpu = target_info['processor']['Asymmetric']['fpu']
54+
cmsis_core = self.core.replace("F", "").replace("-", "")
55+
for proc in target_info['processor']['Asymmetric'].values():
56+
if proc['core'] == cmsis_core:
57+
self.dfpu = proc['fpu']
5158
self.debug, self.dvendor = self.vendor_debug(
5259
target_info.get('vendor') or target_info['from_pack']['vendor']
5360
)

0 commit comments

Comments
 (0)