Skip to content

Commit 2a907d2

Browse files
committed
Fix Uvision CPU type error for DP and FPU targets.
1 parent b1c8aac commit 2a907d2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/export/uvision/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def generate(self):
130130
'device': DeviceUvision(self.target),
131131
}
132132
# Turn on FPU optimizations if the core has an FPU
133-
ctx['fpu_setting'] = 1 if 'f' not in ctx['device'].core.lower() else 2
133+
ctx['fpu_setting'] = 1 if 'f' not in ctx['device'].core.lower() \
134+
or 'd' in ctx['device'].core.lower() else 2
134135
ctx.update(self.format_flags())
135136
self.gen_file('uvision/uvision.tmpl', ctx, self.project_name+".uvprojx")
136137

tools/export/uvision/uvision.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
<AdsLsxf>1</AdsLsxf>
214214
<RvctClst>0</RvctClst>
215215
<GenPPlst>0</GenPPlst>
216-
<AdsCpuType>"{{device.core}}"</AdsCpuType>
216+
<AdsCpuType>"{{device.core.replace("D","").replace("F","")}}"</AdsCpuType>
217217
<RvctDeviceName></RvctDeviceName>
218218
<mOS>0</mOS>
219219
<uocRom>0</uocRom>

0 commit comments

Comments
 (0)