Correct FPU setting for Cortex-M7FD

They had floating point turned off before
pull/4445/head
Jimmy Brisson 2017-06-08 16:10:52 -05:00 committed by Sam Grove
parent 64baee8ac7
commit 603ef3d75e
1 changed files with 6 additions and 2 deletions

View File

@ -209,8 +209,12 @@ class Uvision(Exporter):
}
core = ctx['device'].core
ctx['cputype'] = core.rstrip("FD")
# Turn on FPU optimizations if the core has an FPU
ctx['fpu_setting'] = 1 if 'F' not in core or 'D' in core else 2
if core.endswith("FD"):
ctx['fpu_setting'] = 3
elif core.endswith("F"):
ctx['fpu_setting'] = 2
else:
ctx['fpu_setting'] = 1
ctx['fputype'] = self.format_fpu(core)
ctx.update(self.format_flags())
self.gen_file('uvision/uvision.tmpl', ctx, self.project_name+".uvprojx")