Skip to content

uvision exporter - fix - asm does not like string defined macros #1623

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 1 commit into from
Mar 24, 2016
Merged
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 workspace_tools/export/uvision4.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ def generate(self):

project_data['tool_specific'] = {}
project_data['tool_specific'].update(tool_specific)
# armasm does not like floating numbers in macros, timestamp to int
i = 0
for macro in project_data['common']['macros']:
# armasm does not like floating numbers in macros, timestamp to int
if macro.startswith('MBED_BUILD_TIMESTAMP'):
timestamp = macro[len('MBED_BUILD_TIMESTAMP='):]
project_data['common']['macros'][i] = 'MBED_BUILD_TIMESTAMP=' + str(int(float(timestamp)))
break
# armasm does not even accept MACRO=string
if macro.startswith('MBED_USERNAME'):
project_data['common']['macros'].pop(i)
i += 1
project_data['common']['macros'].append('__ASSERT_MSG')
self.progen_gen_file('uvision', project_data)
Expand Down