Skip to content

Commit e665df9

Browse files
authored
Merge pull request #10045 from bridadan/uvision_exporter_fixes
Uvision exporter fixes for Python 3, CPM updates, and Windows path issues
2 parents 4cf22b3 + 5ea3b32 commit e665df9

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tools/export/exporters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def __init__(self, target, export_dir, project_name, toolchain,
9292
self.toolchain = toolchain
9393
jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
9494
self.jinja_environment = Environment(loader=jinja_loader)
95+
resources.win_to_unix()
9596
self.resources = resources
9697
self.generated_files = []
9798
self.static_files = (

tools/export/uvision/__init__.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def generate_flash_dll(self):
8585
# Default according to Keil developer
8686
ramsize = '1000'
8787
if len(RAMS) >= 1:
88-
ramstart = RAMS[0][0]
88+
ramstart = '{:x}'.format(RAMS[0][0])
8989
extra_flags = []
9090
for info in self.target_info["algorithms"]:
9191
if not info:
@@ -103,9 +103,9 @@ def generate_flash_dll(self):
103103
rom_start_flag = "-FS" + str(fl_count) + str(start)
104104
rom_size_flag = "-FL" + str(fl_count) + str(size)
105105

106-
if info["ramstart"] is not None and info["ramsize"] is not None:
107-
ramstart = '{:x}'.format(info["ramstart"])
108-
ramsize = '{:x}'.format(info["ramsize"])
106+
if info["ram_start"] is not None and info["ram_size"] is not None:
107+
ramstart = '{:x}'.format(info["ram_start"])
108+
ramsize = '{:x}'.format(info["ram_size"])
109109

110110
path_flag = "-FP{}($$Device:{}${})".format(
111111
str(fl_count), self.dname, name
@@ -238,7 +238,7 @@ def generate(self):
238238
'project_files': sorted(list(self.format_src(srcs).items()),
239239
key=lambda tuple: tuple[0].lower()),
240240
'include_paths': ';'.join(self.filter_dot(d) for d in
241-
self.resources.inc_dirs).encode('utf-8'),
241+
self.resources.inc_dirs),
242242
'device': DeviceUvision(self.target),
243243
}
244244
sct_name, sct_path = self.resources.get_file_refs(
@@ -319,8 +319,8 @@ def is_target_supported(cls, target_name):
319319
else:
320320
if not (set(target.supported_toolchains).intersection(
321321
set(["ARM", "uARM"]))):
322-
return False
323-
322+
return False
323+
324324
if not DeviceCMSIS.check_supported(target_name):
325325
return False
326326
if "Cortex-A" in target.core:
@@ -348,7 +348,7 @@ def is_target_supported(cls, target_name):
348348
else:
349349
if "ARMC6" not in target.supported_toolchains:
350350
return False
351-
351+
352352
if not DeviceCMSIS.check_supported(target_name):
353353
return False
354354
if "Cortex-A" in target.core:

0 commit comments

Comments
 (0)