mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10045 from bridadan/uvision_exporter_fixes
Uvision exporter fixes for Python 3, CPM updates, and Windows path issuespull/10005/head
commit
e665df9c47
|
@ -92,6 +92,7 @@ class Exporter(object):
|
||||||
self.toolchain = toolchain
|
self.toolchain = toolchain
|
||||||
jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
|
jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
|
||||||
self.jinja_environment = Environment(loader=jinja_loader)
|
self.jinja_environment = Environment(loader=jinja_loader)
|
||||||
|
resources.win_to_unix()
|
||||||
self.resources = resources
|
self.resources = resources
|
||||||
self.generated_files = []
|
self.generated_files = []
|
||||||
self.static_files = (
|
self.static_files = (
|
||||||
|
|
|
@ -85,7 +85,7 @@ class DeviceUvision(DeviceCMSIS):
|
||||||
# Default according to Keil developer
|
# Default according to Keil developer
|
||||||
ramsize = '1000'
|
ramsize = '1000'
|
||||||
if len(RAMS) >= 1:
|
if len(RAMS) >= 1:
|
||||||
ramstart = RAMS[0][0]
|
ramstart = '{:x}'.format(RAMS[0][0])
|
||||||
extra_flags = []
|
extra_flags = []
|
||||||
for info in self.target_info["algorithms"]:
|
for info in self.target_info["algorithms"]:
|
||||||
if not info:
|
if not info:
|
||||||
|
@ -103,9 +103,9 @@ class DeviceUvision(DeviceCMSIS):
|
||||||
rom_start_flag = "-FS" + str(fl_count) + str(start)
|
rom_start_flag = "-FS" + str(fl_count) + str(start)
|
||||||
rom_size_flag = "-FL" + str(fl_count) + str(size)
|
rom_size_flag = "-FL" + str(fl_count) + str(size)
|
||||||
|
|
||||||
if info["ramstart"] is not None and info["ramsize"] is not None:
|
if info["ram_start"] is not None and info["ram_size"] is not None:
|
||||||
ramstart = '{:x}'.format(info["ramstart"])
|
ramstart = '{:x}'.format(info["ram_start"])
|
||||||
ramsize = '{:x}'.format(info["ramsize"])
|
ramsize = '{:x}'.format(info["ram_size"])
|
||||||
|
|
||||||
path_flag = "-FP{}($$Device:{}${})".format(
|
path_flag = "-FP{}($$Device:{}${})".format(
|
||||||
str(fl_count), self.dname, name
|
str(fl_count), self.dname, name
|
||||||
|
@ -238,7 +238,7 @@ class Uvision(Exporter):
|
||||||
'project_files': sorted(list(self.format_src(srcs).items()),
|
'project_files': sorted(list(self.format_src(srcs).items()),
|
||||||
key=lambda tuple: tuple[0].lower()),
|
key=lambda tuple: tuple[0].lower()),
|
||||||
'include_paths': ';'.join(self.filter_dot(d) for d in
|
'include_paths': ';'.join(self.filter_dot(d) for d in
|
||||||
self.resources.inc_dirs).encode('utf-8'),
|
self.resources.inc_dirs),
|
||||||
'device': DeviceUvision(self.target),
|
'device': DeviceUvision(self.target),
|
||||||
}
|
}
|
||||||
sct_name, sct_path = self.resources.get_file_refs(
|
sct_name, sct_path = self.resources.get_file_refs(
|
||||||
|
@ -319,8 +319,8 @@ class UvisionArmc5(Uvision):
|
||||||
else:
|
else:
|
||||||
if not (set(target.supported_toolchains).intersection(
|
if not (set(target.supported_toolchains).intersection(
|
||||||
set(["ARM", "uARM"]))):
|
set(["ARM", "uARM"]))):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not DeviceCMSIS.check_supported(target_name):
|
if not DeviceCMSIS.check_supported(target_name):
|
||||||
return False
|
return False
|
||||||
if "Cortex-A" in target.core:
|
if "Cortex-A" in target.core:
|
||||||
|
@ -348,7 +348,7 @@ class UvisionArmc6(Uvision):
|
||||||
else:
|
else:
|
||||||
if "ARMC6" not in target.supported_toolchains:
|
if "ARMC6" not in target.supported_toolchains:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not DeviceCMSIS.check_supported(target_name):
|
if not DeviceCMSIS.check_supported(target_name):
|
||||||
return False
|
return False
|
||||||
if "Cortex-A" in target.core:
|
if "Cortex-A" in target.core:
|
||||||
|
|
Loading…
Reference in New Issue