Skip to content

Uvision exporter fixes for Python 3, CPM updates, and Windows path issues #10045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/export/exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def __init__(self, target, export_dir, project_name, toolchain,
self.toolchain = toolchain
jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
self.jinja_environment = Environment(loader=jinja_loader)
resources.win_to_unix()
self.resources = resources
self.generated_files = []
self.static_files = (
Expand Down
16 changes: 8 additions & 8 deletions tools/export/uvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def generate_flash_dll(self):
# Default according to Keil developer
ramsize = '1000'
if len(RAMS) >= 1:
ramstart = RAMS[0][0]
ramstart = '{:x}'.format(RAMS[0][0])
extra_flags = []
for info in self.target_info["algorithms"]:
if not info:
Expand All @@ -103,9 +103,9 @@ def generate_flash_dll(self):
rom_start_flag = "-FS" + str(fl_count) + str(start)
rom_size_flag = "-FL" + str(fl_count) + str(size)

if info["ramstart"] is not None and info["ramsize"] is not None:
ramstart = '{:x}'.format(info["ramstart"])
ramsize = '{:x}'.format(info["ramsize"])
if info["ram_start"] is not None and info["ram_size"] is not None:
ramstart = '{:x}'.format(info["ram_start"])
ramsize = '{:x}'.format(info["ram_size"])

path_flag = "-FP{}($$Device:{}${})".format(
str(fl_count), self.dname, name
Expand Down Expand Up @@ -237,7 +237,7 @@ def generate(self):
'project_files': sorted(list(self.format_src(srcs).items()),
key=lambda tuple: tuple[0].lower()),
'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),
}
sct_name, sct_path = self.resources.get_file_refs(
Expand Down Expand Up @@ -318,8 +318,8 @@ def is_target_supported(cls, target_name):
else:
if not (set(target.supported_toolchains).intersection(
set(["ARM", "uARM"]))):
return False
return False

if not DeviceCMSIS.check_supported(target_name):
return False
if "Cortex-A" in target.core:
Expand Down Expand Up @@ -347,7 +347,7 @@ def is_target_supported(cls, target_name):
else:
if "ARMC6" not in target.supported_toolchains:
return False

if not DeviceCMSIS.check_supported(target_name):
return False
if "Cortex-A" in target.core:
Expand Down