Uvision FPU setting added to template

pull/2708/head
Sarah Marsh 2016-09-23 16:05:51 -05:00
parent 4bc70c0c5f
commit 9bec4181d9
2 changed files with 4 additions and 3 deletions

View File

@ -122,14 +122,15 @@ class Uvision(Exporter):
srcs = self.resources.headers + self.resources.s_sources + \
self.resources.c_sources + self.resources.cpp_sources + \
self.resources.objects + self.resources.libraries
ctx = {
'name': self.project_name,
'project_files': self.format_src(srcs),
'linker_script':self.resources.linker_script,
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
'device': DeviceUvision(self.target)
'device': DeviceUvision(self.target),
}
# Turn on FPU optimizations if the core has an FPU
ctx['fpu_setting'] = 1 if 'f' not in ctx['device'].core.lower() else 2
ctx.update(self.format_flags())
self.gen_file('uvision/uvision.tmpl', ctx, self.project_name+".uvprojx")

View File

@ -222,7 +222,7 @@
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>2</RvdsVP>
<RvdsVP>{{fpu_setting}}</RvdsVP>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>