Merge pull request #3661 from theotherjimmy/uvision-add-cpu

[Exporters] Add core to uvision exporter template
pull/3602/merge
Sam Grove 2017-02-02 10:58:53 -06:00 committed by GitHub
commit 7083dc5339
2 changed files with 2 additions and 1 deletions

View File

@ -197,6 +197,7 @@ class Uvision(Exporter):
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
'device': DeviceUvision(self.target),
}
ctx['cputype'] = ctx['device'].core.rstrip("FD")
# Turn on FPU optimizations if the core has an FPU
ctx['fpu_setting'] = 1 if 'f' not in ctx['device'].core.lower() \
or 'd' in ctx['device'].core.lower() else 2

View File

@ -16,7 +16,7 @@
<Vendor>{{device.dvendor}}</Vendor>
<PackID>{{device.pack_id}}</PackID>
<PackURL>{{device.pack_url}}</PackURL>
<Cpu></Cpu>
<Cpu>CPUTYPE("{{cputype}}")</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>{{device.flash_dll}}</FlashDriverDll>