Skip to content

Alphabetize UVision groups #3562

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
Jan 12, 2017
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
6 changes: 4 additions & 2 deletions tools/export/uvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ def format_src(self, srcs):
"""Make sources into the named tuple for use in the template"""
grouped = self.group_project_files(srcs)
for group, files in grouped.items():
grouped[group] = self.uv_files(files)
grouped[group] = sorted(list(self.uv_files(files)),
key=lambda (_, __, name): name.lower())
return grouped

def generate(self):
Expand All @@ -198,7 +199,8 @@ def generate(self):
'name': self.project_name,
# project_files => dict of generators - file group to generator of
# UVFile tuples defined above
'project_files': self.format_src(srcs),
'project_files': sorted(list(self.format_src(srcs).iteritems()),
key=lambda (group, _): group.lower()),
'linker_script':self.resources.linker_script,
'include_paths': '; '.join(self.resources.inc_dirs).encode('utf-8'),
'device': DeviceUvision(self.target),
Expand Down
2 changes: 1 addition & 1 deletion tools/export/uvision/uvision.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
</TargetArmAds>
</TargetOption>
<Groups>
{% for group, files in project_files.iteritems() %}
{% for group, files in project_files %}
<Group>
<GroupName>{{group}}</GroupName>
<Files>
Expand Down