Skip to content

Commit 7083dc5

Browse files
authored
Merge pull request #3661 from theotherjimmy/uvision-add-cpu
[Exporters] Add core to uvision exporter template
2 parents 5d946c4 + eadbe71 commit 7083dc5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tools/export/uvision/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def generate(self):
197197
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
198198
'device': DeviceUvision(self.target),
199199
}
200+
ctx['cputype'] = ctx['device'].core.rstrip("FD")
200201
# Turn on FPU optimizations if the core has an FPU
201202
ctx['fpu_setting'] = 1 if 'f' not in ctx['device'].core.lower() \
202203
or 'd' in ctx['device'].core.lower() else 2

tools/export/uvision/uvision.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Vendor>{{device.dvendor}}</Vendor>
1717
<PackID>{{device.pack_id}}</PackID>
1818
<PackURL>{{device.pack_url}}</PackURL>
19-
<Cpu></Cpu>
19+
<Cpu>CPUTYPE("{{cputype}}")</Cpu>
2020
<FlashUtilSpec></FlashUtilSpec>
2121
<StartupFile></StartupFile>
2222
<FlashDriverDll>{{device.flash_dll}}</FlashDriverDll>

0 commit comments

Comments
 (0)