Skip to content

Commit 603ef3d

Browse files
theotherjimmysg-
authored andcommitted
Correct FPU setting for Cortex-M7FD
They had floating point turned off before
1 parent 64baee8 commit 603ef3d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/export/uvision/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ def generate(self):
209209
}
210210
core = ctx['device'].core
211211
ctx['cputype'] = core.rstrip("FD")
212-
# Turn on FPU optimizations if the core has an FPU
213-
ctx['fpu_setting'] = 1 if 'F' not in core or 'D' in core else 2
212+
if core.endswith("FD"):
213+
ctx['fpu_setting'] = 3
214+
elif core.endswith("F"):
215+
ctx['fpu_setting'] = 2
216+
else:
217+
ctx['fpu_setting'] = 1
214218
ctx['fputype'] = self.format_fpu(core)
215219
ctx.update(self.format_flags())
216220
self.gen_file('uvision/uvision.tmpl', ctx, self.project_name+".uvprojx")

0 commit comments

Comments
 (0)